-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
82 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
package virtualcluster | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/urfave/cli" | ||
) | ||
|
||
var nodepoolCommand = cli.Command{ | ||
Name: "nodepool", | ||
Usage: "Manage virtual node pools", | ||
Flags: []cli.Flag{ | ||
cli.StringFlag{ | ||
Name: "kubeconfig", | ||
Usage: "Path to the kubeconfig file", | ||
}, | ||
}, | ||
Subcommands: []cli.Command{ | ||
nodepoolAddCommand, | ||
nodepoolDelCommand, | ||
nodepoolListCommand, | ||
}, | ||
} | ||
|
||
var nodepoolAddCommand = cli.Command{ | ||
Name: "add", | ||
Usage: "Add a virtual node pool", | ||
ArgsUsage: "NAME", | ||
Flags: []cli.Flag{ | ||
cli.IntFlag{ | ||
Name: "nodes", | ||
Usage: "The number of virtual nodes", | ||
Value: 10, | ||
}, | ||
cli.IntFlag{ | ||
Name: "cpu", | ||
Usage: "The allocatable CPU resource per node", | ||
Value: 8, | ||
}, | ||
cli.IntFlag{ | ||
Name: "memory", | ||
Usage: "The allocatable Memory resource per node (GiB)", | ||
Value: 16, | ||
}, | ||
}, | ||
Action: func(cliCtx *cli.Context) error { | ||
return fmt.Errorf("nodepool add - not implemented") | ||
}, | ||
} | ||
|
||
var nodepoolDelCommand = cli.Command{ | ||
Name: "delete", | ||
ShortName: "del", | ||
ArgsUsage: "NAME", | ||
Usage: "Delete a virtual node pool", | ||
Action: func(cliCtx *cli.Context) error { | ||
return fmt.Errorf("nodepool delete - not implemented") | ||
}, | ||
} | ||
|
||
var nodepoolListCommand = cli.Command{ | ||
Name: "list", | ||
Usage: "List virtual node pools", | ||
Action: func(cliCtx *cli.Context) error { | ||
return fmt.Errorf("nodepool list - not implemented") | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package virtualcluster | ||
|
||
import "github.com/urfave/cli" | ||
|
||
// const namespace = "kperf-virtualcluster" | ||
|
||
// Command represents virtualcluster subcommand. | ||
var Command = cli.Command{ | ||
Name: "virtualcluster", | ||
ShortName: "vc", | ||
Usage: "Setup virtual cluster and run workload on that", | ||
Subcommands: []cli.Command{ | ||
nodepoolCommand, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters