github.com/jlmeeker/kismatic@v1.10.1-0.20180612190640-57f9005a1f1a/pkg/cli/install.go (about) 1 package cli 2 3 import ( 4 "io" 5 6 "github.com/spf13/cobra" 7 ) 8 9 type installOpts struct { 10 planFilename string 11 } 12 13 // NewCmdInstall creates a new install command 14 func NewCmdInstall(in io.Reader, out io.Writer) *cobra.Command { 15 opts := &installOpts{} 16 17 cmd := &cobra.Command{ 18 Use: "install", 19 Short: "install your Kubernetes cluster", 20 Run: func(cmd *cobra.Command, args []string) { 21 cmd.Help() 22 }, 23 } 24 25 // Subcommands 26 cmd.AddCommand(NewCmdPlan(in, out, opts)) 27 cmd.AddCommand(NewCmdValidate(out, opts)) 28 cmd.AddCommand(NewCmdApply(out, opts)) 29 cmd.AddCommand(NewCmdAddNode(out, opts)) 30 cmd.AddCommand(NewCmdStep(out, opts)) 31 32 // PersistentFlags 33 addPlanFileFlag(cmd.PersistentFlags(), &opts.planFilename) 34 35 return cmd 36 }