Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌱 clusterctl: always use -n as the shorthand for --[target-]namespace #6258

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/clusterctl/cmd/generate_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func init() {
"Bootstrap provider and version (e.g. kubeadm:v0.3.0)")
generateProviderCmd.Flags().StringVarP(&gpo.controlPlaneProvider, "control-plane", "c", "",
"ControlPlane provider and version (e.g. kubeadm:v0.3.0)")
generateProviderCmd.Flags().StringVar(&gpo.targetNamespace, "target-namespace", "",
generateProviderCmd.Flags().StringVarP(&gpo.targetNamespace, "target-namespace", "n", "",
"The target namespace where the provider should be deployed. If unspecified, the components default namespace is used.")
generateProviderCmd.Flags().BoolVar(&gpo.textOutput, "describe", false,
"Generate configuration without variable substitution.")
Expand Down
2 changes: 1 addition & 1 deletion cmd/clusterctl/cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func init() {
"Bootstrap providers and versions (e.g. kubeadm:v0.3.0) to add to the management cluster. If unspecified, Kubeadm bootstrap provider's latest release is used.")
initCmd.Flags().StringSliceVarP(&initOpts.controlPlaneProviders, "control-plane", "c", nil,
"Control plane providers and versions (e.g. kubeadm:v0.3.0) to add to the management cluster. If unspecified, the Kubeadm control plane provider's latest release is used.")
initCmd.Flags().StringVar(&initOpts.targetNamespace, "target-namespace", "",
initCmd.Flags().StringVarP(&initOpts.targetNamespace, "target-namespace", "n", "",
"The target namespace where the providers should be deployed. If unspecified, the provider components' default namespace is used.")
initCmd.Flags().BoolVar(&initOpts.waitProviders, "wait-providers", false,
"Wait for providers to be installed.")
Expand Down
2 changes: 1 addition & 1 deletion cmd/clusterctl/cmd/rollout/pause.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func NewCmdRolloutPause(cfgFile string) *cobra.Command {
"Path to the kubeconfig file to use for accessing the management cluster. If unspecified, default discovery rules apply.")
cmd.Flags().StringVar(&pauseOpt.kubeconfigContext, "kubeconfig-context", "",
"Context to be used within the kubeconfig file. If empty, current context will be used.")
cmd.Flags().StringVar(&pauseOpt.namespace, "namespace", "", "Namespace where the resource(s) reside. If unspecified, the defult namespace will be used.")
cmd.Flags().StringVarP(&pauseOpt.namespace, "namespace", "n", "", "Namespace where the resource(s) reside. If unspecified, the defult namespace will be used.")

return cmd
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/clusterctl/cmd/rollout/restart.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func NewCmdRolloutRestart(cfgFile string) *cobra.Command {
"Path to the kubeconfig file to use for accessing the management cluster. If unspecified, default discovery rules apply.")
cmd.Flags().StringVar(&restartOpt.kubeconfigContext, "kubeconfig-context", "",
"Context to be used within the kubeconfig file. If empty, current context will be used.")
cmd.Flags().StringVar(&restartOpt.namespace, "namespace", "", "Namespace where the resource(s) reside. If unspecified, the defult namespace will be used.")
cmd.Flags().StringVarP(&restartOpt.namespace, "namespace", "n", "", "Namespace where the resource(s) reside. If unspecified, the defult namespace will be used.")

return cmd
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/clusterctl/cmd/rollout/resume.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func NewCmdRolloutResume(cfgFile string) *cobra.Command {
"Path to the kubeconfig file to use for accessing the management cluster. If unspecified, default discovery rules apply.")
cmd.Flags().StringVar(&resumeOpt.kubeconfigContext, "kubeconfig-context", "",
"Context to be used within the kubeconfig file. If empty, current context will be used.")
cmd.Flags().StringVar(&resumeOpt.namespace, "namespace", "", "Namespace where the resource(s) reside. If unspecified, the defult namespace will be used.")
cmd.Flags().StringVarP(&resumeOpt.namespace, "namespace", "n", "", "Namespace where the resource(s) reside. If unspecified, the defult namespace will be used.")

return cmd
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/clusterctl/cmd/rollout/undo.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func NewCmdRolloutUndo(cfgFile string) *cobra.Command {
"Path to the kubeconfig file to use for accessing the management cluster. If unspecified, default discovery rules apply.")
cmd.Flags().StringVar(&undoOpt.kubeconfigContext, "kubeconfig-context", "",
"Context to be used within the kubeconfig file. If empty, current context will be used.")
cmd.Flags().StringVar(&undoOpt.namespace, "namespace", "", "Namespace where the resource(s) reside. If unspecified, the defult namespace will be used.")
cmd.Flags().StringVarP(&undoOpt.namespace, "namespace", "n", "", "Namespace where the resource(s) reside. If unspecified, the defult namespace will be used.")
cmd.Flags().Int64Var(&undoOpt.toRevision, "to-revision", undoOpt.toRevision, "The revision to rollback to. Default to 0 (last revision).")

return cmd
Expand Down