cmd.PersistentFlags().StringVar(&kubeConfigFile,"kubeconfig",filepath.Join(kubeadmconstants.KubernetesDir,kubeadmconstants.AdminKubeConfigFileName),"The KubeConfig file to use when talking to the cluster.")
fs.StringVar(kubeConfigFile,"kubeconfig",*kubeConfigFile,"The KubeConfig file to use when talking to the cluster")
fs.StringVar(kubeConfigFile,"kubeconfig",*kubeConfigFile,"The KubeConfig file to use when talking to the cluster. If the flag is not set, a set of standard locations are searched for an existing KubeConfig file.")
}
}
// AddConfigFlag adds the --config flag to the given flagset
// AddConfigFlag adds the --config flag to the given flagset
cmd.Flags().StringVar(&kubeConfigFile,"kubeconfig",filepath.Join(kubeadmconstants.KubernetesDir,kubeadmconstants.AdminKubeConfigFileName),"The KubeConfig file to use when talking to the cluster")
// runAddonsCmdFunc creates a cobra.Command Run function, by composing the call to the given cmdFunc with necessary additional steps (e.g preparation of input parameters)
// runAddonsCmdFunc creates a cobra.Command Run function, by composing the call to the given cmdFunc with necessary additional steps (e.g preparation of input parameters)
cmd.PersistentFlags().StringVar(&kubeConfigFile,"kubeconfig",filepath.Join(kubeadmconstants.KubernetesDir,kubeadmconstants.AdminKubeConfigFileName),"The KubeConfig file to use when talking to the cluster")
cmd.Flags().StringVar(&kubeConfigFile,"kubeconfig",filepath.Join(kubeadmconstants.KubernetesDir,kubeadmconstants.AdminKubeConfigFileName),"The KubeConfig file to use when talking to the cluster")
// flags that are not bound to the configuration object
// flags that are not bound to the configuration object
// Note: All flags that are not bound to the cfg object should be whitelisted in cmd/kubeadm/app/apis/kubeadm/validation/validation.go
// Note: All flags that are not bound to the cfg object should be whitelisted in cmd/kubeadm/app/apis/kubeadm/validation/validation.go
cmd.Flags().StringVar(&kubeConfigFile,"kubeconfig",filepath.Join(kubeadmconstants.KubernetesDir,kubeadmconstants.AdminKubeConfigFileName),"The KubeConfig file to use when talking to the cluster")
cmd.Flags().StringVar(&kubeConfigFile,"kubeconfig",filepath.Join(kubeadmconstants.KubernetesDir,kubeadmconstants.AdminKubeConfigFileName),"The KubeConfig file to use when talking to the cluster")
"kubeconfig",filepath.Join(kubeadmconstants.KubernetesDir,kubeadmconstants.AdminKubeConfigFileName),"The KubeConfig file to use when talking to the cluster. If the flag is not set a set of standard locations are searched for an existing KubeConfig file")
tokenCmd.PersistentFlags().BoolVar(&dryRun,
tokenCmd.PersistentFlags().BoolVar(&dryRun,
"dry-run",dryRun,"Whether to enable dry-run mode or not")
"dry-run",dryRun,"Whether to enable dry-run mode or not")