diff --git a/commands/operator-sdk/cmd/root.go b/commands/operator-sdk/cmd/root.go index 2f09596d755..4424872b0d3 100644 --- a/commands/operator-sdk/cmd/root.go +++ b/commands/operator-sdk/cmd/root.go @@ -25,6 +25,7 @@ func NewRootCmd() *cobra.Command { cmd.AddCommand(NewNewCmd()) cmd.AddCommand(NewBuildCmd()) cmd.AddCommand(NewGenerateCmd()) + cmd.AddCommand(NewUpCmd()) return cmd } diff --git a/commands/operator-sdk/cmd/up.go b/commands/operator-sdk/cmd/up.go new file mode 100644 index 00000000000..fd36bc1fda2 --- /dev/null +++ b/commands/operator-sdk/cmd/up.go @@ -0,0 +1,26 @@ +package cmd + +import "github.com/spf13/cobra" + +var ( + kubeConfig string +) + +func NewUpCmd() *cobra.Command { + upCmd := &cobra.Command{ + Use: "up [Flags]", + Short: "Launches the operator locally", + Long: `The operator-sdk up command launches the operator on the local machine +by building the operator binary with the ability to access a +kubernetes cluster using a Kubernete config file. +`, + Run: upFunc, + } + + upCmd.Flags().StringVar(&kubeConfig, "kubeconfig", "~/.kube/config", "The file path to kubernetes configuration file.") + + return upCmd +} + +func upFunc(cmd *cobra.Command, args []string) { +}