Add group by default to kubeadm token create

This commit is contained in:
Joe Beda
2017-10-05 14:42:49 -07:00
parent 3b1b19a1e2
commit e053f56d6b

View File

@@ -120,7 +120,7 @@ func NewCmdToken(out io.Writer, errW io.Writer) *cobra.Command {
createCmd.Flags().StringSliceVar(&usages, createCmd.Flags().StringSliceVar(&usages,
"usages", kubeadmconstants.DefaultTokenUsages, "The ways in which this token can be used. Valid options: [signing,authentication].") "usages", kubeadmconstants.DefaultTokenUsages, "The ways in which this token can be used. Valid options: [signing,authentication].")
createCmd.Flags().StringSliceVar(&extraGroups, createCmd.Flags().StringSliceVar(&extraGroups,
"groups", []string{}, "groups", []string{kubeadmconstants.V18NodeBootstrapTokenAuthGroup},
fmt.Sprintf("Extra groups that this token will authenticate as when used for authentication. Must match %q.", bootstrapapi.BootstrapGroupPattern)) fmt.Sprintf("Extra groups that this token will authenticate as when used for authentication. Must match %q.", bootstrapapi.BootstrapGroupPattern))
createCmd.Flags().StringVar(&description, createCmd.Flags().StringVar(&description,
"description", "", "A human friendly description of how this token is used.") "description", "", "A human friendly description of how this token is used.")