spowelljr: prevent user from modifying apiserver port

pull/17909/head
Predrag Rogic 2024-01-31 01:33:46 +00:00
parent 3a0ada1f6d
commit dda8db0d02
No known key found for this signature in database
GPG Key ID: F1FF5748C4855229
1 changed files with 1 additions and 1 deletions

View File

@ -747,7 +747,7 @@ func updateExistingConfigFromFlags(cmd *cobra.Command, existing *config.ClusterC
out.WarningT("Changing the HA mode of an existing minikube cluster is not currently supported. Please first delete the cluster and use 'minikube start --ha' to create new one.") out.WarningT("Changing the HA mode of an existing minikube cluster is not currently supported. Please first delete the cluster and use 'minikube start --ha' to create new one.")
} }
if cmd.Flags().Changed(apiServerPort) && viper.GetBool(ha) { if cmd.Flags().Changed(apiServerPort) && config.IsHA(*existing) {
out.WarningT("Changing the apiserver port of an existing minikube ha cluster is not currently supported. Please first delete the cluster.") out.WarningT("Changing the apiserver port of an existing minikube ha cluster is not currently supported. Please first delete the cluster.")
} else { } else {
updateIntFromFlag(cmd, &cc.APIServerPort, apiServerPort) updateIntFromFlag(cmd, &cc.APIServerPort, apiServerPort)