Skip to content

Commit

Permalink
Merge pull request #107 from moelsayed/fix_service_defaults_bug
Browse files Browse the repository at this point in the history
Fix bug in setting service defaults
  • Loading branch information
galal-hussein authored Dec 5, 2017
2 parents 28d961d + 5bcf084 commit 43d3342
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit 43d3342

Please sign in to comment.