Skip to content

Commit

Permalink
operator-sdk/cmd: add up command
Browse files Browse the repository at this point in the history
  • Loading branch information
fanminshi committed May 2, 2018
1 parent 0b429fb commit 52f101b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions commands/operator-sdk/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ func NewRootCmd() *cobra.Command {
cmd.AddCommand(NewNewCmd())
cmd.AddCommand(NewBuildCmd())
cmd.AddCommand(NewGenerateCmd())
cmd.AddCommand(NewUpCmd())

return cmd
}
26 changes: 26 additions & 0 deletions commands/operator-sdk/cmd/up.go
Original file line number Diff line number Diff line change
@@ -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) {
}

0 comments on commit 52f101b

Please sign in to comment.