From 5bcf0845c71e9f4409268bf7bf07a931450b54b9 Mon Sep 17 00:00:00 2001 From: moelsayed Date: Tue, 5 Dec 2017 21:44:17 +0200 Subject: [PATCH] Fix bug in setting service defaults --- cluster/cluster.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/cluster/cluster.go b/cluster/cluster.go index 4c78fc2c0..1c1583527 100644 --- a/cluster/cluster.go +++ b/cluster/cluster.go @@ -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) } }