From 11069febb10e44a09041b6ee69a7119636a90be3 Mon Sep 17 00:00:00 2001 From: John Gardiner Myers Date: Tue, 18 Jul 2023 23:09:22 -0700 Subject: [PATCH] Fix AWS CCM defaults for IPAM to match KCM --- pkg/model/components/awscloudcontrollermanager.go | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) 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) {