modify the kubeconfig description of the executable file
Signed-off-by: changzhen <changzhen5@huawei.com>
This commit is contained in:
parent
0b257a724a
commit
eeee662a05
|
@ -54,6 +54,7 @@ func NewOptions() *Options {
|
|||
// AddFlags adds flags to the specified FlagSet.
|
||||
func (o *Options) AddFlags(flags *pflag.FlagSet) {
|
||||
o.RecommendedOptions.AddFlags(flags)
|
||||
flags.Lookup("kubeconfig").Usage = "Path to karmada control plane kubeconfig file."
|
||||
|
||||
flags.StringVar(&o.karmadaConfig, "karmada-config", o.karmadaConfig, "Path to a karmada-apiserver KubeConfig.")
|
||||
// Remove it when we are in v1.2(+).
|
||||
|
|
|
@ -95,6 +95,8 @@ func NewOptions() *Options {
|
|||
|
||||
// AddFlags adds flags to the specified FlagSet.
|
||||
func (o *Options) AddFlags(flags *pflag.FlagSet, allControllers []string) {
|
||||
flags.Lookup("kubeconfig").Usage = "Path to karmada control plane kubeconfig file."
|
||||
|
||||
flags.StringSliceVar(&o.Controllers, "controllers", []string{"*"}, fmt.Sprintf(
|
||||
"A list of controllers to enable. '*' enables all on-by-default controllers, 'foo' enables the controller named 'foo', '-foo' disables the controller named 'foo'. All controllers: %s.",
|
||||
strings.Join(allControllers, ", "),
|
||||
|
|
|
@ -70,7 +70,7 @@ func (o *Options) AddFlags(fs *pflag.FlagSet) {
|
|||
|
||||
fs.BoolVar(&o.LeaderElection.LeaderElect, "leader-elect", true, "Enable leader election, which must be true when running multi instances.")
|
||||
fs.StringVar(&o.LeaderElection.ResourceNamespace, "leader-elect-resource-namespace", util.NamespaceKarmadaSystem, "The namespace of resource object that is used for locking during leader election.")
|
||||
fs.StringVar(&o.KubeConfig, "kubeconfig", o.KubeConfig, "Path to a KubeConfig. Only required if out-of-cluster.")
|
||||
fs.StringVar(&o.KubeConfig, "kubeconfig", o.KubeConfig, "Path to karmada control plane kubeconfig file.")
|
||||
fs.StringVar(&o.Master, "master", o.Master, "The address of the Kubernetes API server. Overrides any value in KubeConfig. Only required if out-of-cluster.")
|
||||
fs.StringVar(&o.BindAddress, "bind-address", defaultBindAddress, "The IP address on which to listen for the --secure-port port.")
|
||||
fs.IntVar(&o.SecurePort, "secure-port", defaultPort, "The secure port on which to serve HTTPS.")
|
||||
|
|
|
@ -41,6 +41,8 @@ func NewOptions() *Options {
|
|||
|
||||
// AddFlags adds flags to the specified FlagSet.
|
||||
func (o *Options) AddFlags(flags *pflag.FlagSet) {
|
||||
flags.Lookup("kubeconfig").Usage = "Path to karmada control plane kubeconfig file."
|
||||
|
||||
flags.StringVar(&o.BindAddress, "bind-address", defaultBindAddress,
|
||||
"The IP address on which to listen for the --secure-port port.")
|
||||
flags.IntVar(&o.SecurePort, "secure-port", defaultPort,
|
||||
|
|
Loading…
Reference in New Issue