Merge pull request #12692 from arrikto/fix-apiserver-ips

Support changing apiserver-ips when restarting minikube
pull/13125/head
Medya Ghazizadeh 2021-12-07 15:33:24 -08:00 committed by GitHub
commit c3ea9c298c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -692,6 +692,12 @@ func updateExistingConfigFromFlags(cmd *cobra.Command, existing *config.ClusterC
cc.VerifyComponents = interpretWaitFlag(*cmd)
}
if cmd.Flags().Changed("apiserver-ips") {
// IPSlice not supported in Viper
// https://github.com/spf13/viper/issues/460
cc.KubernetesConfig.APIServerIPs = apiServerIPs
}
// Handle flags and legacy configuration upgrades that do not contain KicBaseImage
if cmd.Flags().Changed(kicBaseImage) || cc.KicBaseImage == "" {
cc.KicBaseImage = viper.GetString(kicBaseImage)