Skip to content

Commit

Permalink
Fix AWS CCM defaults for IPAM to match KCM
Browse files Browse the repository at this point in the history
  • Loading branch information
johngmyers committed Jul 29, 2023
1 parent a8fa895 commit 11069fe
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions pkg/model/components/awscloudcontrollermanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 11069fe

Please sign in to comment.