Initialize FeatureGate map for KubeProxy config. #1929

This commit is contained in:
Arvinderpal Wander 2019-11-21 20:46:25 -08:00
parent 3c5dad61f7
commit c025cfcd9c

View File

@ -63,6 +63,12 @@ func DefaultKubeProxyConfiguration(internalcfg *kubeadmapi.ClusterConfiguration)
FeatureGates: map[string]bool{},
}
}
// The below code is necessary because while KubeProxy may be defined, the user may not
// have defined any feature-gates, thus FeatureGates will be nil and the later insertion
// of any feature-gates (e.g. IPv6DualStack) will cause a panic.
if internalcfg.ComponentConfigs.KubeProxy.FeatureGates == nil {
internalcfg.ComponentConfigs.KubeProxy.FeatureGates = map[string]bool{}
}
externalproxycfg := internalcfg.ComponentConfigs.KubeProxy