diff --git a/pkg/model/components/awscloudcontrollermanager.go b/pkg/model/components/awscloudcontrollermanager.go index 08ec90003a..73e80a857b 100644 --- a/pkg/model/components/awscloudcontrollermanager.go +++ b/pkg/model/components/awscloudcontrollermanager.go @@ -55,22 +55,16 @@ func (b *AWSCloudControllerManagerOptionsBuilder) BuildOptions(o interface{}) er eccm.ClusterName = b.ClusterName - eccm.ClusterCIDR = clusterSpec.Networking.NonMasqueradeCIDR + eccm.AllocateNodeCIDRs = fi.PtrTo(!clusterSpec.IsKopsControllerIPAM()) - eccm.AllocateNodeCIDRs = fi.PtrTo(true) - eccm.ConfigureCloudRoutes = fi.PtrTo(false) + if eccm.ClusterCIDR == "" && !clusterSpec.IsKopsControllerIPAM() { + eccm.ClusterCIDR = clusterSpec.Networking.PodCIDR + } // TODO: we want to consolidate this with the logic from KCM networking := &clusterSpec.Networking if networking.Kubenet != nil { eccm.ConfigureCloudRoutes = fi.PtrTo(true) - } else if networking.GCP != nil { - eccm.ConfigureCloudRoutes = fi.PtrTo(false) - eccm.CIDRAllocatorType = fi.PtrTo("CloudAllocator") - - if eccm.ClusterCIDR == "" { - eccm.ClusterCIDR = clusterSpec.Networking.PodCIDR - } } else if networking.External != nil { eccm.ConfigureCloudRoutes = fi.PtrTo(false) } else if UsesCNI(networking) {