mirror of https://github.com/kubernetes/kops.git
Fix AWS CCM defaults for IPAM to match KCM
This commit is contained in:
parent
a8fa8952ba
commit
11069febb1
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue