Skip to content

Commit

Permalink
Fix ClusterNetwork defaulting (#396)
Browse files Browse the repository at this point in the history
Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>
  • Loading branch information
xmudrii authored and kubermatic-bot committed May 1, 2019
1 parent 7691554 commit 349ece0
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions pkg/apis/kubeone/v1alpha1/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,18 @@ func SetDefaults_APIEndpoints(obj *KubeOneCluster) {
}

func SetDefaults_ClusterNetwork(obj *KubeOneCluster) {
obj.ClusterNetwork.PodSubnet = DefaultPodSubnet
obj.ClusterNetwork.ServiceSubnet = DefaultServiceSubnet
obj.ClusterNetwork.ServiceDomainName = DefaultServiceDNS
obj.ClusterNetwork.NodePortRange = DefaultNodePortRange
if len(obj.ClusterNetwork.PodSubnet) == 0 {
obj.ClusterNetwork.PodSubnet = DefaultPodSubnet
}
if len(obj.ClusterNetwork.ServiceSubnet) == 0 {
obj.ClusterNetwork.ServiceSubnet = DefaultServiceSubnet
}
if len(obj.ClusterNetwork.ServiceDomainName) == 0 {
obj.ClusterNetwork.ServiceDomainName = DefaultServiceDNS
}
if len(obj.ClusterNetwork.NodePortRange) == 0 {
obj.ClusterNetwork.NodePortRange = DefaultNodePortRange
}
}

func SetDefaults_MachineController(obj *KubeOneCluster) {
Expand Down

0 comments on commit 349ece0

Please sign in to comment.