From dda8db0d021bfc373f11b75f77c6701bc2b43a67 Mon Sep 17 00:00:00 2001 From: Predrag Rogic Date: Wed, 31 Jan 2024 01:33:46 +0000 Subject: [PATCH] spowelljr: prevent user from modifying apiserver port --- cmd/minikube/cmd/start_flags.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/minikube/cmd/start_flags.go b/cmd/minikube/cmd/start_flags.go index 9ca85cbbd0..da2e5300e8 100644 --- a/cmd/minikube/cmd/start_flags.go +++ b/cmd/minikube/cmd/start_flags.go @@ -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.") } - 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.") } else { updateIntFromFlag(cmd, &cc.APIServerPort, apiServerPort)