1
0
mirror of https://github.com/rancher/rke.git synced 2025-08-31 14:36:32 +00:00

Fix bug in setting service defaults

This commit is contained in:
moelsayed
2017-12-05 21:44:17 +02:00
parent 28d961d83e
commit 5bcf0845c7

View File

@@ -130,17 +130,17 @@ func (c *Cluster) setClusterDefaults() {
}
func (c *Cluster) setClusterServicesDefaults() {
serviceConfigDefaultsMap := map[string]string{
c.Services.KubeAPI.ServiceClusterIPRange: DefaultServiceClusterIPRange,
c.Services.KubeController.ServiceClusterIPRange: DefaultServiceClusterIPRange,
c.Services.KubeController.ClusterCIDR: DefaultClusterCIDR,
c.Services.Kubelet.ClusterDNSServer: DefaultClusterDNSService,
c.Services.Kubelet.ClusterDomain: DefaultClusterDomain,
c.Services.Kubelet.InfraContainerImage: DefaultInfraContainerImage,
c.Authentication.Strategy: DefaultAuthStrategy,
serviceConfigDefaultsMap := map[*string]string{
&c.Services.KubeAPI.ServiceClusterIPRange: DefaultServiceClusterIPRange,
&c.Services.KubeController.ServiceClusterIPRange: DefaultServiceClusterIPRange,
&c.Services.KubeController.ClusterCIDR: DefaultClusterCIDR,
&c.Services.Kubelet.ClusterDNSServer: DefaultClusterDNSService,
&c.Services.Kubelet.ClusterDomain: DefaultClusterDomain,
&c.Services.Kubelet.InfraContainerImage: DefaultInfraContainerImage,
&c.Authentication.Strategy: DefaultAuthStrategy,
}
for k, v := range serviceConfigDefaultsMap {
setDefaultIfEmpty(&k, v)
setDefaultIfEmpty(k, v)
}
}