Documentation ¶
Overview ¶
Package cmd contains the CLI-level constructs that call into the tanzu package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ConfigureCmd = &cobra.Command{ Use: "configure <cluster name>", Aliases: []string{"config", "conf"}, Short: "Generate a config file to be used in cluster creation", Long: configureDesc, RunE: configure, Args: checkSingleClusterArg, }
ConfigureCmd creates an unmanaged workload cluster.
var CreateCmd = &cobra.Command{ Use: "create <cluster name>", Short: "Create an unmanaged cluster", Long: createDesc, Run: create, Args: func(cmd *cobra.Command, args []string) error { if len(args) > 1 { return errors.New("only a single cluster name should be specified") } if len(args) == 0 && co.clusterConfigFile == "" && co.existingClusterKubeconfig == "" { return errors.New("must specify a cluster name or configuration file") } return nil }, }
CreateCmd creates an unmanaged workload cluster.
var DeleteCmd = &cobra.Command{ Use: "delete <cluster name>", Short: "Delete an unmanaged cluster", Long: deleteDesc, PreRunE: func(cmd *cobra.Command, args []string) (err error) { return nil }, RunE: destroy, Aliases: []string{"rm"}, PostRunE: func(cmd *cobra.Command, args []string) (err error) { return nil }, Args: checkSingleClusterArg, }
DeleteCmd deletes an unmanaged workload cluster.
var ListCmd = &cobra.Command{ Use: "list", Short: "List unmanaged environments", Long: listDesc, PreRunE: func(cmd *cobra.Command, args []string) (err error) { return nil }, RunE: list, Aliases: []string{"ls"}, PostRunE: func(cmd *cobra.Command, args []string) (err error) { return nil }, Args: cobra.NoArgs, }
ListCmd returns a list of existing clusters.
var StartCmd = &cobra.Command{ Use: "start <cluster name>", Short: "(experimental) Start an unmanaged cluster", Long: startDesc, PreRunE: func(cmd *cobra.Command, args []string) (err error) { return nil }, RunE: start, PostRunE: func(cmd *cobra.Command, args []string) (err error) { return nil }, Args: checkSingleClusterArg, }
StartCmd starts a stopped cluster.
var StopCmd = &cobra.Command{ Use: "stop <cluster name>", Short: "(experimental) Stop an unmanaged cluster", Long: stopDesc, PreRunE: func(cmd *cobra.Command, args []string) (err error) { return nil }, RunE: stop, PostRunE: func(cmd *cobra.Command, args []string) (err error) { return nil }, Args: checkSingleClusterArg, }
StopCmd stops a running cluster.
Functions ¶
func LoggingVerbosity ¶
LoggingVerbosity will get the configured logging level for this command.
func SetupRootCommand ¶
SetupRootCommand ensures the root cobra command is setup with our customization
func TtySetting ¶
TtySetting gets the setting to use for formatted TTY output based on whether the user explicitly set it with a command line argument, or if not, whether there is an environment variable set. If neither of these things, it will default to whether or not we detect we are running in a terminal that allows tty formatting.
Types ¶
This section is empty.