Skip to content

Commit

Permalink
add deprecation msg
Browse files Browse the repository at this point in the history
  • Loading branch information
uzaxirr committed Jan 27, 2025
1 parent 63d39de commit 2b6f8e2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/kubernetes/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ func init() {

kubernetesConfigCmd.Flags().BoolVarP(&saveConfig, "save", "s", false, "save the config")
kubernetesConfigCmd.Flags().BoolVarP(&switchConfig, "switch", "i", false, "switch context to newly-created cluster")
kubernetesConfigCmd.Flags().MarkDeprecated("switch", "this flag is deprecated, KUBECONFIG is automatically switched to the newly created cluster config if the --save flag is set")
kubernetesConfigCmd.Flags().MarkHidden("switch")
kubernetesConfigCmd.Flags().BoolVarP(&overwriteConfig, "overwrite", "w", false, "overwrite the kubeconfig file")
kubernetesConfigCmd.Flags().StringVarP(&localPathConfig, "local-path", "p", fmt.Sprintf("%s/.kube/config", home), "local path to save the kubeconfig file")

Expand All @@ -92,6 +94,8 @@ func init() {
kubernetesCreateCmd.Flags().BoolVarP(&waitKubernetes, "wait", "w", false, "a simple flag (e.g. --wait) that will cause the CLI to spin and wait for the cluster to be ACTIVE")
kubernetesCreateCmd.Flags().BoolVarP(&saveConfigKubernetes, "save", "", false, "save the config")
kubernetesCreateCmd.Flags().BoolVarP(&mergeConfigKubernetes, "merge", "m", false, "merge the config with existing kubeconfig if it already exists.")
kubernetesCreateCmd.Flags().MarkDeprecated("merge", "this flag is deprecated, KUBECONFIG is automatically merged with the newly created cluster config if the --save flag is set")
kubernetesCreateCmd.Flags().MarkHidden("merge")
kubernetesCreateCmd.Flags().BoolVarP(&switchConfigKubernetes, "switch", "", false, "switch context to newly-created cluster")
kubernetesCreateCmd.Flags().StringVarP(&existingFirewall, "existing-firewall", "e", "", "optional, ID of existing firewall to use")
kubernetesCreateCmd.Flags().StringVarP(&rulesFirewall, "firewall-rules", "u", "default", "optional, can be used if the --create-firewall flag is set, semicolon-separated list of ports to open")
Expand Down

0 comments on commit 2b6f8e2

Please sign in to comment.