Add client-only flag to init command, which will skip installTiller()

pull/666/head
vaikas-google 9 years ago
parent a4f00f08b9
commit 1c529d46c9

@ -16,10 +16,12 @@ Kubernetes Cluster and sets up local configuration in $HELM_HOME (default: ~/.he
var (
tillerImg string
clientOnly bool
)
func init() {
initCmd.Flags().StringVarP(&tillerImg, "tiller-image", "i", "", "override tiller image")
initCmd.Flags().BoolVarP(&clientOnly, "client-only", "c", false, "If set does not install tiller")
RootCommand.AddCommand(initCmd)
}
@ -40,9 +42,13 @@ func runInit(cmd *cobra.Command, args []string) error {
return err
}
if !clientOnly {
if err := installTiller(); err != nil {
return err
}
} else {
fmt.Println("Not installing tiller due to 'client-only' flag having been set")
}
fmt.Println("Happy Helming!")
return nil

Loading…
Cancel
Save