Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix AWS CCM defaults for IPAM to match KCM #15670

Merged
merged 2 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
manageStorageClasses: true
cloudControllerManager:
allocateNodeCIDRs: true
clusterCIDR: 100.64.0.0/10
clusterCIDR: 100.96.0.0/11
clusterName: minimal.example.com
configureCloudRoutes: false
image: registry.k8s.io/provider-aws/cloud-controller-manager:v1.27.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
containers:
- args:
- --allocate-node-cidrs=true
- --cluster-cidr=100.64.0.0/10
- --cluster-cidr=100.96.0.0/11
- --cluster-name=minimal.example.com
- --configure-cloud-routes=false
- --leader-elect=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ spec:
version: 9.99.0
- id: k8s-1.18
manifest: aws-cloud-controller.addons.k8s.io/k8s-1.18.yaml
manifestHash: eaac3475bfd301cbce7dc31d1b3ebffc956580c879bcd84690ecb82c88641855
manifestHash: 0ff974e13ec519948db39a69d054f65ce4404b17b19206e7e7fcf28de958d80c
name: aws-cloud-controller.addons.k8s.io
selector:
k8s-addon: aws-cloud-controller.addons.k8s.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:
manageStorageClasses: true
cloudControllerManager:
allocateNodeCIDRs: true
clusterCIDR: 100.64.0.0/10
clusterCIDR: 100.96.0.0/11
clusterName: minimal.example.com
configureCloudRoutes: false
image: registry.k8s.io/provider-aws/cloud-controller-manager:v1.26.6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
containers:
- args:
- --allocate-node-cidrs=true
- --cluster-cidr=100.64.0.0/10
- --cluster-cidr=100.96.0.0/11
- --cluster-name=minimal.example.com
- --configure-cloud-routes=false
- --leader-elect=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ spec:
version: 9.99.0
- id: k8s-1.18
manifest: aws-cloud-controller.addons.k8s.io/k8s-1.18.yaml
manifestHash: 97b946fdac709c8f174e6719555910cffff4e26ca5b7028bf3007570e397b427
manifestHash: f8cc45fc5a0b2201f2811e4b21c9a4237a322fc2cf14c5322c9aeae061897cc1
name: aws-cloud-controller.addons.k8s.io
selector:
k8s-addon: aws-cloud-controller.addons.k8s.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
containers:
- args:
- --allocate-node-cidrs=true
- --cluster-cidr=100.64.0.0/10
- --cluster-cidr=100.96.0.0/11
- --cluster-name=bastionuserdata.example.com
- --configure-cloud-routes=false
- --leader-elect=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ spec:
version: 9.99.0
- id: k8s-1.18
manifest: aws-cloud-controller.addons.k8s.io/k8s-1.18.yaml
manifestHash: 4221d7d4646366d1b1077aa216df095836881b1dd6be8b9c627cc15d3232bbb7
manifestHash: f6b072cfa1a9134ca0106e856b2a70b2f0dca749991583de4cd3f87ccc7dccd3
name: aws-cloud-controller.addons.k8s.io
selector:
k8s-addon: aws-cloud-controller.addons.k8s.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
manageStorageClasses: true
cloudControllerManager:
allocateNodeCIDRs: true
clusterCIDR: 100.64.0.0/10
clusterCIDR: 100.96.0.0/11
clusterName: bastionuserdata.example.com
configureCloudRoutes: false
image: registry.k8s.io/provider-aws/cloud-controller-manager:v1.26.6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spec:
- args:
- --allocate-node-cidrs=true
- --cloud-provider=aws
- --cluster-cidr=100.64.0.0/10
- --cluster-cidr=100.96.0.0/11
- --cluster-name=cas-priority-expander-custom.example.com
- --configure-cloud-routes=false
- --leader-elect=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ spec:
version: 9.99.0
- id: k8s-1.18
manifest: aws-cloud-controller.addons.k8s.io/k8s-1.18.yaml
manifestHash: 18804ce8c98f30e1bfae1d47557d18e2641cfb4eb4b5112130815ef590686c1e
manifestHash: 399257cb8c9aa2d7401eb4e3e12aede61a31d40434718f61dec8763854b01857
name: aws-cloud-controller.addons.k8s.io
selector:
k8s-addon: aws-cloud-controller.addons.k8s.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
cloudControllerManager:
allocateNodeCIDRs: true
cloudProvider: aws
clusterCIDR: 100.64.0.0/10
clusterCIDR: 100.96.0.0/11
clusterName: cas-priority-expander-custom.example.com
configureCloudRoutes: false
image: registry.k8s.io/provider-aws/cloud-controller-manager:v1.26.6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spec:
- args:
- --allocate-node-cidrs=true
- --cloud-provider=aws
- --cluster-cidr=100.64.0.0/10
- --cluster-cidr=100.96.0.0/11
- --cluster-name=cas-priority-expander.example.com
- --configure-cloud-routes=false
- --leader-elect=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ spec:
version: 9.99.0
- id: k8s-1.18
manifest: aws-cloud-controller.addons.k8s.io/k8s-1.18.yaml
manifestHash: 1b6d82becbcf78a301a886a0a1e1f0f9b4f0ce3908feae5bf01a2684d8ca859a
manifestHash: 645e8940c7771bdf712ce127b84e68baa44097cffc8f905ac42bb2d1e284c0b5
name: aws-cloud-controller.addons.k8s.io
selector:
k8s-addon: aws-cloud-controller.addons.k8s.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
cloudControllerManager:
allocateNodeCIDRs: true
cloudProvider: aws
clusterCIDR: 100.64.0.0/10
clusterCIDR: 100.96.0.0/11
clusterName: cas-priority-expander.example.com
configureCloudRoutes: false
image: registry.k8s.io/provider-aws/cloud-controller-manager:v1.26.6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spec:
manageStorageClasses: true
cloudControllerManager:
allocateNodeCIDRs: true
clusterCIDR: 100.64.0.0/10
clusterCIDR: 100.96.0.0/11
clusterName: complex.example.com
configureCloudRoutes: false
enableLeaderMigration: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
containers:
- args:
- --allocate-node-cidrs=true
- --cluster-cidr=100.64.0.0/10
- --cluster-cidr=100.96.0.0/11
- --cluster-name=complex.example.com
- --configure-cloud-routes=false
- --enable-leader-migration=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ spec:
version: 9.99.0
- id: k8s-1.18
manifest: aws-cloud-controller.addons.k8s.io/k8s-1.18.yaml
manifestHash: 6ffef86e2c71c3ff619faf398b8e8330d0b513aaa238e4356aca7ce9289d2e8a
manifestHash: 9f2124a3cd64512b87897b80a3e8eea5bd3bff91ff77102394b1fdcb86c98686
name: aws-cloud-controller.addons.k8s.io
selector:
k8s-addon: aws-cloud-controller.addons.k8s.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
manageStorageClasses: true
cloudControllerManager:
allocateNodeCIDRs: true
clusterCIDR: 100.64.0.0/10
clusterCIDR: 100.96.0.0/11
clusterName: compress.example.com
configureCloudRoutes: false
image: registry.k8s.io/provider-aws/cloud-controller-manager:v1.26.6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
containers:
- args:
- --allocate-node-cidrs=true
- --cluster-cidr=100.64.0.0/10
- --cluster-cidr=100.96.0.0/11
- --cluster-name=compress.example.com
- --configure-cloud-routes=false
- --leader-elect=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ spec:
version: 9.99.0
- id: k8s-1.18
manifest: aws-cloud-controller.addons.k8s.io/k8s-1.18.yaml
manifestHash: 91255c7cb32728919a1e8bb018c11449b60108f45ad784aaecfea15e6f7546ca
manifestHash: 3cacb886dcc54c79396c05b19c3fe7c66842571156a3dda71e6f28a2b5d66bb9
name: aws-cloud-controller.addons.k8s.io
selector:
k8s-addon: aws-cloud-controller.addons.k8s.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
manageStorageClasses: true
cloudControllerManager:
allocateNodeCIDRs: true
clusterCIDR: 100.64.0.0/10
clusterCIDR: 100.96.0.0/11
clusterName: containerd.example.com
configureCloudRoutes: false
image: registry.k8s.io/provider-aws/cloud-controller-manager:v1.26.6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
containers:
- args:
- --allocate-node-cidrs=true
- --cluster-cidr=100.64.0.0/10
- --cluster-cidr=100.96.0.0/11
- --cluster-name=containerd.example.com
- --configure-cloud-routes=false
- --leader-elect=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ spec:
version: 9.99.0
- id: k8s-1.18
manifest: aws-cloud-controller.addons.k8s.io/k8s-1.18.yaml
manifestHash: 090f13557812c33392a17c0479ad7a5ee061049d8a6b3fa1160a3875e59f83bb
manifestHash: 48e0169d461e7b741442985ca61df93aee9f678a5072c350ffee2226ea22aa6c
name: aws-cloud-controller.addons.k8s.io
selector:
k8s-addon: aws-cloud-controller.addons.k8s.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
manageStorageClasses: true
cloudControllerManager:
allocateNodeCIDRs: true
clusterCIDR: 100.64.0.0/10
clusterCIDR: 100.96.0.0/11
clusterName: containerd.example.com
configureCloudRoutes: false
image: registry.k8s.io/provider-aws/cloud-controller-manager:v1.26.6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
containers:
- args:
- --allocate-node-cidrs=true
- --cluster-cidr=100.64.0.0/10
- --cluster-cidr=100.96.0.0/11
- --cluster-name=containerd.example.com
- --configure-cloud-routes=false
- --leader-elect=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ spec:
version: 9.99.0
- id: k8s-1.18
manifest: aws-cloud-controller.addons.k8s.io/k8s-1.18.yaml
manifestHash: 090f13557812c33392a17c0479ad7a5ee061049d8a6b3fa1160a3875e59f83bb
manifestHash: 48e0169d461e7b741442985ca61df93aee9f678a5072c350ffee2226ea22aa6c
name: aws-cloud-controller.addons.k8s.io
selector:
k8s-addon: aws-cloud-controller.addons.k8s.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
containers:
- args:
- --allocate-node-cidrs=true
- --cluster-cidr=100.64.0.0/10
- --cluster-cidr=100.96.0.0/11
- --cluster-name=123.example.com
- --configure-cloud-routes=false
- --leader-elect=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ spec:
version: 9.99.0
- id: k8s-1.18
manifest: aws-cloud-controller.addons.k8s.io/k8s-1.18.yaml
manifestHash: de417125cdf704070e3d6a4b68a419b88c630bc11177ef8bbab2c38c6844dd49
manifestHash: 423d0e938aaa568717523a529e3dada7d2c5d4b43dbea36266bdf658991fd9b1
name: aws-cloud-controller.addons.k8s.io
selector:
k8s-addon: aws-cloud-controller.addons.k8s.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
manageStorageClasses: true
cloudControllerManager:
allocateNodeCIDRs: true
clusterCIDR: 100.64.0.0/10
clusterCIDR: 100.96.0.0/11
clusterName: 123.example.com
configureCloudRoutes: false
image: registry.k8s.io/provider-aws/cloud-controller-manager:v1.26.6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
manageStorageClasses: true
cloudControllerManager:
allocateNodeCIDRs: true
clusterCIDR: 100.64.0.0/10
clusterCIDR: 100.96.0.0/11
clusterName: existing-iam.example.com
configureCloudRoutes: false
image: registry.k8s.io/provider-aws/cloud-controller-manager:v1.26.6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
containers:
- args:
- --allocate-node-cidrs=true
- --cluster-cidr=100.64.0.0/10
- --cluster-cidr=100.96.0.0/11
- --cluster-name=existing-iam.example.com
- --configure-cloud-routes=false
- --leader-elect=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ spec:
version: 9.99.0
- id: k8s-1.18
manifest: aws-cloud-controller.addons.k8s.io/k8s-1.18.yaml
manifestHash: d825d567335503cd6cf8eff2a215dd4a274ae2278c948fab5fe7dd02812153cf
manifestHash: 90172ec59c913aec647fd51bc2341c6d74ba74656655978e2e66982ed4d22cec
name: aws-cloud-controller.addons.k8s.io
selector:
k8s-addon: aws-cloud-controller.addons.k8s.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
manageStorageClasses: true
cloudControllerManager:
allocateNodeCIDRs: true
clusterCIDR: 100.64.0.0/10
clusterCIDR: 100.96.0.0/11
clusterName: existingsg.example.com
configureCloudRoutes: false
image: registry.k8s.io/provider-aws/cloud-controller-manager:v1.26.6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
containers:
- args:
- --allocate-node-cidrs=true
- --cluster-cidr=100.64.0.0/10
- --cluster-cidr=100.96.0.0/11
- --cluster-name=existingsg.example.com
- --configure-cloud-routes=false
- --leader-elect=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ spec:
version: 9.99.0
- id: k8s-1.18
manifest: aws-cloud-controller.addons.k8s.io/k8s-1.18.yaml
manifestHash: 5cb8090e61f28e0b60a2e32f46fee0c5c1f31272b1248419ce3e5942a0710033
manifestHash: 0c3538b4938e12f7f63ee5da668ba2ae8789e10b067a52b44cd0f85bccc35ae6
name: aws-cloud-controller.addons.k8s.io
selector:
k8s-addon: aws-cloud-controller.addons.k8s.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
manageStorageClasses: true
cloudControllerManager:
allocateNodeCIDRs: true
clusterCIDR: 100.64.0.0/10
clusterCIDR: 100.96.0.0/11
clusterName: minimal.example.com
configureCloudRoutes: false
image: registry.k8s.io/provider-aws/cloud-controller-manager:v1.26.6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
containers:
- args:
- --allocate-node-cidrs=true
- --cluster-cidr=100.64.0.0/10
- --cluster-cidr=100.96.0.0/11
- --cluster-name=minimal.example.com
- --configure-cloud-routes=false
- --leader-elect=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ spec:
version: 9.99.0
- id: k8s-1.18
manifest: aws-cloud-controller.addons.k8s.io/k8s-1.18.yaml
manifestHash: 7664ee5608865dda8b51b660348c7724eaaae1c2dec58f7031c75fd10d202d15
manifestHash: eff0c442541bc156d4c1d3e1632794c90f1c31e92a88f129d4b0e30baf7bc920
name: aws-cloud-controller.addons.k8s.io
selector:
k8s-addon: aws-cloud-controller.addons.k8s.io
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
manageStorageClasses: true
cloudControllerManager:
allocateNodeCIDRs: true
clusterCIDR: 100.64.0.0/10
clusterCIDR: 100.96.0.0/11
clusterName: minimal.example.com
configureCloudRoutes: false
image: registry.k8s.io/provider-aws/cloud-controller-manager:v1.26.6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
containers:
- args:
- --allocate-node-cidrs=true
- --cluster-cidr=100.64.0.0/10
- --cluster-cidr=100.96.0.0/11
- --cluster-name=minimal.example.com
- --configure-cloud-routes=false
- --leader-elect=true
Expand Down
Loading
Loading