From d630f9c52091922f857cb4eb9805bb767a9dfd5b Mon Sep 17 00:00:00 2001 From: upodroid Date: Thu, 28 Sep 2023 12:06:52 +0100 Subject: [PATCH] add missing rbac roles and don't run gkenetparamset controller --- pkg/model/components/gcpcloudcontrollermanager.go | 13 +++---------- .../aws_s3_object_cluster-completed.spec_content | 2 ++ ...ject_ha-gce.example.com-addons-bootstrap_content | 2 +- ...-cloud-controller.addons.k8s.io-k8s-1.23_content | 13 +++++++++++-- .../aws_s3_object_cluster-completed.spec_content | 2 ++ ...ect_minimal.example.com-addons-bootstrap_content | 2 +- ...-cloud-controller.addons.k8s.io-k8s-1.23_content | 13 +++++++++++-- .../aws_s3_object_cluster-completed.spec_content | 2 ++ ...minimal-gce.example.com-addons-bootstrap_content | 2 +- ...-cloud-controller.addons.k8s.io-k8s-1.23_content | 13 +++++++++++-- .../aws_s3_object_cluster-completed.spec_content | 2 ++ ...minimal-gce.example.com-addons-bootstrap_content | 2 +- ...-cloud-controller.addons.k8s.io-k8s-1.23_content | 13 +++++++++++-- .../aws_s3_object_cluster-completed.spec_content | 2 ++ ...mal-gce-ilb.example.com-addons-bootstrap_content | 2 +- ...-cloud-controller.addons.k8s.io-k8s-1.23_content | 13 +++++++++++-- .../aws_s3_object_cluster-completed.spec_content | 2 ++ ...y-long-name.example.com-addons-bootstrap_content | 2 +- ...-cloud-controller.addons.k8s.io-k8s-1.23_content | 13 +++++++++++-- .../aws_s3_object_cluster-completed.spec_content | 2 ++ ...y-long-name.example.com-addons-bootstrap_content | 2 +- ...-cloud-controller.addons.k8s.io-k8s-1.23_content | 13 +++++++++++-- .../aws_s3_object_cluster-completed.spec_content | 2 ++ ...mal-gce-plb.example.com-addons-bootstrap_content | 2 +- ...-cloud-controller.addons.k8s.io-k8s-1.23_content | 13 +++++++++++-- .../aws_s3_object_cluster-completed.spec_content | 2 ++ ...gce-private.example.com-addons-bootstrap_content | 2 +- ...-cloud-controller.addons.k8s.io-k8s-1.23_content | 13 +++++++++++-- .../k8s-1.23.yaml.template | 10 +++++++++- 29 files changed, 138 insertions(+), 38 deletions(-) diff --git a/pkg/model/components/gcpcloudcontrollermanager.go b/pkg/model/components/gcpcloudcontrollermanager.go index d4cb97f6a3a48..4333d03828186 100644 --- a/pkg/model/components/gcpcloudcontrollermanager.go +++ b/pkg/model/components/gcpcloudcontrollermanager.go @@ -61,21 +61,14 @@ func (b *GCPCloudControllerManagerOptionsBuilder) BuildOptions(options interface } if ccmConfig.Controllers == nil { - var changes []string - - // Don't run gkenetworkparamset controller, looks for some CRDs (GKENetworkParamSet and Network) which are only installed on GKE - // However, the version we're current running doesn't support this controller anyway, so we need to introduce this later, - // possibly based on the image version. - // changes = append(ccmConfig.Controllers, "-gkenetworkparams") + changes := []string{"*,-gkenetworkparamset"} // Turn off some controllers if kops-controller is running them if clusterSpec.IsKopsControllerIPAM() { - changes = append(ccmConfig.Controllers, "-nodeipam", "-route") + changes = append(changes, "-nodeipam", "-route") } - if len(changes) != 0 { - ccmConfig.Controllers = append([]string{"*"}, changes...) - } + ccmConfig.Controllers = changes } if ccmConfig.Image == "" { diff --git a/tests/integration/update_cluster/ha_gce/data/aws_s3_object_cluster-completed.spec_content b/tests/integration/update_cluster/ha_gce/data/aws_s3_object_cluster-completed.spec_content index 18ddd623b1709..a64d9a1ae1a15 100644 --- a/tests/integration/update_cluster/ha_gce/data/aws_s3_object_cluster-completed.spec_content +++ b/tests/integration/update_cluster/ha_gce/data/aws_s3_object_cluster-completed.spec_content @@ -20,6 +20,8 @@ spec: cidrAllocatorType: CloudAllocator clusterCIDR: 100.96.0.0/11 clusterName: ha-gce-example-com + controllers: + - '*,-gkenetworkparamset' image: registry.k8s.io/cloud-provider-gcp/cloud-controller-manager:v26.2.4 leaderElection: leaderElect: true diff --git a/tests/integration/update_cluster/ha_gce/data/aws_s3_object_ha-gce.example.com-addons-bootstrap_content b/tests/integration/update_cluster/ha_gce/data/aws_s3_object_ha-gce.example.com-addons-bootstrap_content index 09b7e3052cd6b..cbd3704b455a6 100644 --- a/tests/integration/update_cluster/ha_gce/data/aws_s3_object_ha-gce.example.com-addons-bootstrap_content +++ b/tests/integration/update_cluster/ha_gce/data/aws_s3_object_ha-gce.example.com-addons-bootstrap_content @@ -62,7 +62,7 @@ spec: version: 9.99.0 - id: k8s-1.23 manifest: gcp-cloud-controller.addons.k8s.io/k8s-1.23.yaml - manifestHash: b9fd0b9dde71d34a4c73ebbff89ecfefd6286232846afcdd1a2d09491900d886 + manifestHash: dacbfa4c544a4b20b9354355f260c0513352d99830e549dcf78962e089d3bcd8 name: gcp-cloud-controller.addons.k8s.io prune: kinds: diff --git a/tests/integration/update_cluster/ha_gce/data/aws_s3_object_ha-gce.example.com-addons-gcp-cloud-controller.addons.k8s.io-k8s-1.23_content b/tests/integration/update_cluster/ha_gce/data/aws_s3_object_ha-gce.example.com-addons-gcp-cloud-controller.addons.k8s.io-k8s-1.23_content index 51f6e27864aa3..1181289cc6fa9 100644 --- a/tests/integration/update_cluster/ha_gce/data/aws_s3_object_ha-gce.example.com-addons-gcp-cloud-controller.addons.k8s.io-k8s-1.23_content +++ b/tests/integration/update_cluster/ha_gce/data/aws_s3_object_ha-gce.example.com-addons-gcp-cloud-controller.addons.k8s.io-k8s-1.23_content @@ -37,6 +37,7 @@ spec: - --cidr-allocator-type=CloudAllocator - --cluster-cidr=100.96.0.0/11 - --cluster-name=ha-gce-example-com + - --controllers=*,-gkenetworkparamset - --leader-elect=true - --v=2 - --cloud-provider=gce @@ -147,6 +148,13 @@ rules: - create - patch - update +- apiGroups: + - "" + resources: + - services/status + verbs: + - patch + - update - apiGroups: - coordination.k8s.io resources: @@ -252,6 +260,8 @@ rules: resources: - configmaps verbs: + - create + - patch - get - update @@ -350,8 +360,7 @@ roleRef: kind: ClusterRole name: system:cloud-controller-manager subjects: -- apiGroup: "" - kind: ServiceAccount +- kind: ServiceAccount name: cloud-controller-manager namespace: kube-system diff --git a/tests/integration/update_cluster/many-addons-gce/data/aws_s3_object_cluster-completed.spec_content b/tests/integration/update_cluster/many-addons-gce/data/aws_s3_object_cluster-completed.spec_content index 1ab6b4bc5f80f..2630a31bc5a1e 100644 --- a/tests/integration/update_cluster/many-addons-gce/data/aws_s3_object_cluster-completed.spec_content +++ b/tests/integration/update_cluster/many-addons-gce/data/aws_s3_object_cluster-completed.spec_content @@ -22,6 +22,8 @@ spec: cidrAllocatorType: CloudAllocator clusterCIDR: 100.96.0.0/11 clusterName: minimal-example-com + controllers: + - '*,-gkenetworkparamset' image: registry.k8s.io/cloud-provider-gcp/cloud-controller-manager:v26.2.4 leaderElection: leaderElect: true diff --git a/tests/integration/update_cluster/many-addons-gce/data/aws_s3_object_minimal.example.com-addons-bootstrap_content b/tests/integration/update_cluster/many-addons-gce/data/aws_s3_object_minimal.example.com-addons-bootstrap_content index f9104b020ff5b..090ae0f47c095 100644 --- a/tests/integration/update_cluster/many-addons-gce/data/aws_s3_object_minimal.example.com-addons-bootstrap_content +++ b/tests/integration/update_cluster/many-addons-gce/data/aws_s3_object_minimal.example.com-addons-bootstrap_content @@ -133,7 +133,7 @@ spec: version: 9.99.0 - id: k8s-1.23 manifest: gcp-cloud-controller.addons.k8s.io/k8s-1.23.yaml - manifestHash: e40e89303c4872972482abd7a438cec5b374ea8afb3e69d2230c7835b59c2d33 + manifestHash: 9e80ca766c56a45af5a93a49a067740cf9d35716b95d300ac6f4aa08384f3544 name: gcp-cloud-controller.addons.k8s.io prune: kinds: diff --git a/tests/integration/update_cluster/many-addons-gce/data/aws_s3_object_minimal.example.com-addons-gcp-cloud-controller.addons.k8s.io-k8s-1.23_content b/tests/integration/update_cluster/many-addons-gce/data/aws_s3_object_minimal.example.com-addons-gcp-cloud-controller.addons.k8s.io-k8s-1.23_content index b80ca05ade93e..b2ac0d54dd196 100644 --- a/tests/integration/update_cluster/many-addons-gce/data/aws_s3_object_minimal.example.com-addons-gcp-cloud-controller.addons.k8s.io-k8s-1.23_content +++ b/tests/integration/update_cluster/many-addons-gce/data/aws_s3_object_minimal.example.com-addons-gcp-cloud-controller.addons.k8s.io-k8s-1.23_content @@ -37,6 +37,7 @@ spec: - --cidr-allocator-type=CloudAllocator - --cluster-cidr=100.96.0.0/11 - --cluster-name=minimal-example-com + - --controllers=*,-gkenetworkparamset - --leader-elect=true - --v=2 - --cloud-provider=gce @@ -147,6 +148,13 @@ rules: - create - patch - update +- apiGroups: + - "" + resources: + - services/status + verbs: + - patch + - update - apiGroups: - coordination.k8s.io resources: @@ -252,6 +260,8 @@ rules: resources: - configmaps verbs: + - create + - patch - get - update @@ -350,8 +360,7 @@ roleRef: kind: ClusterRole name: system:cloud-controller-manager subjects: -- apiGroup: "" - kind: ServiceAccount +- kind: ServiceAccount name: cloud-controller-manager namespace: kube-system diff --git a/tests/integration/update_cluster/minimal_gce/data/aws_s3_object_cluster-completed.spec_content b/tests/integration/update_cluster/minimal_gce/data/aws_s3_object_cluster-completed.spec_content index 0c3f5e0a38b98..ff8b8b18f64a8 100644 --- a/tests/integration/update_cluster/minimal_gce/data/aws_s3_object_cluster-completed.spec_content +++ b/tests/integration/update_cluster/minimal_gce/data/aws_s3_object_cluster-completed.spec_content @@ -20,6 +20,8 @@ spec: cidrAllocatorType: CloudAllocator clusterCIDR: 100.96.0.0/11 clusterName: minimal-gce-example-com + controllers: + - '*,-gkenetworkparamset' image: registry.k8s.io/cloud-provider-gcp/cloud-controller-manager:v26.2.4 leaderElection: leaderElect: true diff --git a/tests/integration/update_cluster/minimal_gce/data/aws_s3_object_minimal-gce.example.com-addons-bootstrap_content b/tests/integration/update_cluster/minimal_gce/data/aws_s3_object_minimal-gce.example.com-addons-bootstrap_content index e1a475517b437..b46b658ca4168 100644 --- a/tests/integration/update_cluster/minimal_gce/data/aws_s3_object_minimal-gce.example.com-addons-bootstrap_content +++ b/tests/integration/update_cluster/minimal_gce/data/aws_s3_object_minimal-gce.example.com-addons-bootstrap_content @@ -62,7 +62,7 @@ spec: version: 9.99.0 - id: k8s-1.23 manifest: gcp-cloud-controller.addons.k8s.io/k8s-1.23.yaml - manifestHash: 447139a03ae68fa785c155f0ec4bb0bc38cdb657fda9687039013d3e2353ab6d + manifestHash: f6318f9f355302147958c18f744391cb59d0642d3002451b7ca84d1e1210f49a name: gcp-cloud-controller.addons.k8s.io prune: kinds: diff --git a/tests/integration/update_cluster/minimal_gce/data/aws_s3_object_minimal-gce.example.com-addons-gcp-cloud-controller.addons.k8s.io-k8s-1.23_content b/tests/integration/update_cluster/minimal_gce/data/aws_s3_object_minimal-gce.example.com-addons-gcp-cloud-controller.addons.k8s.io-k8s-1.23_content index 5269e97df39be..79d65ab5933bc 100644 --- a/tests/integration/update_cluster/minimal_gce/data/aws_s3_object_minimal-gce.example.com-addons-gcp-cloud-controller.addons.k8s.io-k8s-1.23_content +++ b/tests/integration/update_cluster/minimal_gce/data/aws_s3_object_minimal-gce.example.com-addons-gcp-cloud-controller.addons.k8s.io-k8s-1.23_content @@ -37,6 +37,7 @@ spec: - --cidr-allocator-type=CloudAllocator - --cluster-cidr=100.96.0.0/11 - --cluster-name=minimal-gce-example-com + - --controllers=*,-gkenetworkparamset - --leader-elect=true - --v=2 - --cloud-provider=gce @@ -147,6 +148,13 @@ rules: - create - patch - update +- apiGroups: + - "" + resources: + - services/status + verbs: + - patch + - update - apiGroups: - coordination.k8s.io resources: @@ -252,6 +260,8 @@ rules: resources: - configmaps verbs: + - create + - patch - get - update @@ -350,8 +360,7 @@ roleRef: kind: ClusterRole name: system:cloud-controller-manager subjects: -- apiGroup: "" - kind: ServiceAccount +- kind: ServiceAccount name: cloud-controller-manager namespace: kube-system diff --git a/tests/integration/update_cluster/minimal_gce_dns-none/data/aws_s3_object_cluster-completed.spec_content b/tests/integration/update_cluster/minimal_gce_dns-none/data/aws_s3_object_cluster-completed.spec_content index 13a0c9601c52a..6788db093168b 100644 --- a/tests/integration/update_cluster/minimal_gce_dns-none/data/aws_s3_object_cluster-completed.spec_content +++ b/tests/integration/update_cluster/minimal_gce_dns-none/data/aws_s3_object_cluster-completed.spec_content @@ -24,6 +24,8 @@ spec: cidrAllocatorType: CloudAllocator clusterCIDR: 100.96.0.0/11 clusterName: minimal-gce-example-com + controllers: + - '*,-gkenetworkparamset' image: registry.k8s.io/cloud-provider-gcp/cloud-controller-manager:v26.2.4 leaderElection: leaderElect: true diff --git a/tests/integration/update_cluster/minimal_gce_dns-none/data/aws_s3_object_minimal-gce.example.com-addons-bootstrap_content b/tests/integration/update_cluster/minimal_gce_dns-none/data/aws_s3_object_minimal-gce.example.com-addons-bootstrap_content index 4f921b11d04d6..f55094dfc4342 100644 --- a/tests/integration/update_cluster/minimal_gce_dns-none/data/aws_s3_object_minimal-gce.example.com-addons-bootstrap_content +++ b/tests/integration/update_cluster/minimal_gce_dns-none/data/aws_s3_object_minimal-gce.example.com-addons-bootstrap_content @@ -55,7 +55,7 @@ spec: version: 9.99.0 - id: k8s-1.23 manifest: gcp-cloud-controller.addons.k8s.io/k8s-1.23.yaml - manifestHash: 447139a03ae68fa785c155f0ec4bb0bc38cdb657fda9687039013d3e2353ab6d + manifestHash: f6318f9f355302147958c18f744391cb59d0642d3002451b7ca84d1e1210f49a name: gcp-cloud-controller.addons.k8s.io prune: kinds: diff --git a/tests/integration/update_cluster/minimal_gce_dns-none/data/aws_s3_object_minimal-gce.example.com-addons-gcp-cloud-controller.addons.k8s.io-k8s-1.23_content b/tests/integration/update_cluster/minimal_gce_dns-none/data/aws_s3_object_minimal-gce.example.com-addons-gcp-cloud-controller.addons.k8s.io-k8s-1.23_content index 5269e97df39be..79d65ab5933bc 100644 --- a/tests/integration/update_cluster/minimal_gce_dns-none/data/aws_s3_object_minimal-gce.example.com-addons-gcp-cloud-controller.addons.k8s.io-k8s-1.23_content +++ b/tests/integration/update_cluster/minimal_gce_dns-none/data/aws_s3_object_minimal-gce.example.com-addons-gcp-cloud-controller.addons.k8s.io-k8s-1.23_content @@ -37,6 +37,7 @@ spec: - --cidr-allocator-type=CloudAllocator - --cluster-cidr=100.96.0.0/11 - --cluster-name=minimal-gce-example-com + - --controllers=*,-gkenetworkparamset - --leader-elect=true - --v=2 - --cloud-provider=gce @@ -147,6 +148,13 @@ rules: - create - patch - update +- apiGroups: + - "" + resources: + - services/status + verbs: + - patch + - update - apiGroups: - coordination.k8s.io resources: @@ -252,6 +260,8 @@ rules: resources: - configmaps verbs: + - create + - patch - get - update @@ -350,8 +360,7 @@ roleRef: kind: ClusterRole name: system:cloud-controller-manager subjects: -- apiGroup: "" - kind: ServiceAccount +- kind: ServiceAccount name: cloud-controller-manager namespace: kube-system diff --git a/tests/integration/update_cluster/minimal_gce_ilb/data/aws_s3_object_cluster-completed.spec_content b/tests/integration/update_cluster/minimal_gce_ilb/data/aws_s3_object_cluster-completed.spec_content index c795b126ffc53..63c8366495ce9 100644 --- a/tests/integration/update_cluster/minimal_gce_ilb/data/aws_s3_object_cluster-completed.spec_content +++ b/tests/integration/update_cluster/minimal_gce_ilb/data/aws_s3_object_cluster-completed.spec_content @@ -24,6 +24,8 @@ spec: cidrAllocatorType: CloudAllocator clusterCIDR: 100.96.0.0/11 clusterName: minimal-gce-ilb-example-com + controllers: + - '*,-gkenetworkparamset' image: registry.k8s.io/cloud-provider-gcp/cloud-controller-manager:v26.2.4 leaderElection: leaderElect: true diff --git a/tests/integration/update_cluster/minimal_gce_ilb/data/aws_s3_object_minimal-gce-ilb.example.com-addons-bootstrap_content b/tests/integration/update_cluster/minimal_gce_ilb/data/aws_s3_object_minimal-gce-ilb.example.com-addons-bootstrap_content index 74b4d9a9338ed..e4b3a4c0a9aa0 100644 --- a/tests/integration/update_cluster/minimal_gce_ilb/data/aws_s3_object_minimal-gce-ilb.example.com-addons-bootstrap_content +++ b/tests/integration/update_cluster/minimal_gce_ilb/data/aws_s3_object_minimal-gce-ilb.example.com-addons-bootstrap_content @@ -62,7 +62,7 @@ spec: version: 9.99.0 - id: k8s-1.23 manifest: gcp-cloud-controller.addons.k8s.io/k8s-1.23.yaml - manifestHash: f3c98b2b2ad3b91f4b82a97af7d8d58411166ac29e8a04cb04905a81ffb16ad9 + manifestHash: e28ca21950fe4c0bdd94348e91a89594c68be7e95059dbdfb0a043e33abeb0fc name: gcp-cloud-controller.addons.k8s.io prune: kinds: diff --git a/tests/integration/update_cluster/minimal_gce_ilb/data/aws_s3_object_minimal-gce-ilb.example.com-addons-gcp-cloud-controller.addons.k8s.io-k8s-1.23_content b/tests/integration/update_cluster/minimal_gce_ilb/data/aws_s3_object_minimal-gce-ilb.example.com-addons-gcp-cloud-controller.addons.k8s.io-k8s-1.23_content index f311ab36334d8..c82783f00d0bb 100644 --- a/tests/integration/update_cluster/minimal_gce_ilb/data/aws_s3_object_minimal-gce-ilb.example.com-addons-gcp-cloud-controller.addons.k8s.io-k8s-1.23_content +++ b/tests/integration/update_cluster/minimal_gce_ilb/data/aws_s3_object_minimal-gce-ilb.example.com-addons-gcp-cloud-controller.addons.k8s.io-k8s-1.23_content @@ -37,6 +37,7 @@ spec: - --cidr-allocator-type=CloudAllocator - --cluster-cidr=100.96.0.0/11 - --cluster-name=minimal-gce-ilb-example-com + - --controllers=*,-gkenetworkparamset - --leader-elect=true - --v=2 - --cloud-provider=gce @@ -147,6 +148,13 @@ rules: - create - patch - update +- apiGroups: + - "" + resources: + - services/status + verbs: + - patch + - update - apiGroups: - coordination.k8s.io resources: @@ -252,6 +260,8 @@ rules: resources: - configmaps verbs: + - create + - patch - get - update @@ -350,8 +360,7 @@ roleRef: kind: ClusterRole name: system:cloud-controller-manager subjects: -- apiGroup: "" - kind: ServiceAccount +- kind: ServiceAccount name: cloud-controller-manager namespace: kube-system diff --git a/tests/integration/update_cluster/minimal_gce_ilb_longclustername/data/aws_s3_object_cluster-completed.spec_content b/tests/integration/update_cluster/minimal_gce_ilb_longclustername/data/aws_s3_object_cluster-completed.spec_content index 6694b6aa985d5..04f45135fd198 100644 --- a/tests/integration/update_cluster/minimal_gce_ilb_longclustername/data/aws_s3_object_cluster-completed.spec_content +++ b/tests/integration/update_cluster/minimal_gce_ilb_longclustername/data/aws_s3_object_cluster-completed.spec_content @@ -24,6 +24,8 @@ spec: cidrAllocatorType: CloudAllocator clusterCIDR: 100.96.0.0/11 clusterName: minimal-gce-with-a-very-very-very-very-very-long-name-example-com + controllers: + - '*,-gkenetworkparamset' image: registry.k8s.io/cloud-provider-gcp/cloud-controller-manager:v26.2.4 leaderElection: leaderElect: true diff --git a/tests/integration/update_cluster/minimal_gce_ilb_longclustername/data/aws_s3_object_minimal-gce-with-a-very-very-very-very-very-long-name.example.com-addons-bootstrap_content b/tests/integration/update_cluster/minimal_gce_ilb_longclustername/data/aws_s3_object_minimal-gce-with-a-very-very-very-very-very-long-name.example.com-addons-bootstrap_content index c844816e8aa5f..81e5871e0570c 100644 --- a/tests/integration/update_cluster/minimal_gce_ilb_longclustername/data/aws_s3_object_minimal-gce-with-a-very-very-very-very-very-long-name.example.com-addons-bootstrap_content +++ b/tests/integration/update_cluster/minimal_gce_ilb_longclustername/data/aws_s3_object_minimal-gce-with-a-very-very-very-very-very-long-name.example.com-addons-bootstrap_content @@ -62,7 +62,7 @@ spec: version: 9.99.0 - id: k8s-1.23 manifest: gcp-cloud-controller.addons.k8s.io/k8s-1.23.yaml - manifestHash: 04674610fafbf0bf7a284d39cd3bb8c5fc5e3ff1707c218cb235d60debaf536b + manifestHash: 854e64edebc744f2d8e7ee5dff7342e3a7f5ba3dd385a2446a4c6e10fe9c23f3 name: gcp-cloud-controller.addons.k8s.io prune: kinds: diff --git a/tests/integration/update_cluster/minimal_gce_ilb_longclustername/data/aws_s3_object_minimal-gce-with-a-very-very-very-very-very-long-name.example.com-addons-gcp-cloud-controller.addons.k8s.io-k8s-1.23_content b/tests/integration/update_cluster/minimal_gce_ilb_longclustername/data/aws_s3_object_minimal-gce-with-a-very-very-very-very-very-long-name.example.com-addons-gcp-cloud-controller.addons.k8s.io-k8s-1.23_content index 355c804e9675c..fd6684648968d 100644 --- a/tests/integration/update_cluster/minimal_gce_ilb_longclustername/data/aws_s3_object_minimal-gce-with-a-very-very-very-very-very-long-name.example.com-addons-gcp-cloud-controller.addons.k8s.io-k8s-1.23_content +++ b/tests/integration/update_cluster/minimal_gce_ilb_longclustername/data/aws_s3_object_minimal-gce-with-a-very-very-very-very-very-long-name.example.com-addons-gcp-cloud-controller.addons.k8s.io-k8s-1.23_content @@ -37,6 +37,7 @@ spec: - --cidr-allocator-type=CloudAllocator - --cluster-cidr=100.96.0.0/11 - --cluster-name=minimal-gce-with-a-very-very-very-very-very-long-name-example-com + - --controllers=*,-gkenetworkparamset - --leader-elect=true - --v=2 - --cloud-provider=gce @@ -147,6 +148,13 @@ rules: - create - patch - update +- apiGroups: + - "" + resources: + - services/status + verbs: + - patch + - update - apiGroups: - coordination.k8s.io resources: @@ -252,6 +260,8 @@ rules: resources: - configmaps verbs: + - create + - patch - get - update @@ -350,8 +360,7 @@ roleRef: kind: ClusterRole name: system:cloud-controller-manager subjects: -- apiGroup: "" - kind: ServiceAccount +- kind: ServiceAccount name: cloud-controller-manager namespace: kube-system diff --git a/tests/integration/update_cluster/minimal_gce_longclustername/data/aws_s3_object_cluster-completed.spec_content b/tests/integration/update_cluster/minimal_gce_longclustername/data/aws_s3_object_cluster-completed.spec_content index 0b3827414a90e..d9c9160aa14ba 100644 --- a/tests/integration/update_cluster/minimal_gce_longclustername/data/aws_s3_object_cluster-completed.spec_content +++ b/tests/integration/update_cluster/minimal_gce_longclustername/data/aws_s3_object_cluster-completed.spec_content @@ -20,6 +20,8 @@ spec: cidrAllocatorType: CloudAllocator clusterCIDR: 100.96.0.0/11 clusterName: minimal-gce-with-a-very-very-very-very-very-long-name-example-com + controllers: + - '*,-gkenetworkparamset' image: registry.k8s.io/cloud-provider-gcp/cloud-controller-manager:v26.2.4 leaderElection: leaderElect: true diff --git a/tests/integration/update_cluster/minimal_gce_longclustername/data/aws_s3_object_minimal-gce-with-a-very-very-very-very-very-long-name.example.com-addons-bootstrap_content b/tests/integration/update_cluster/minimal_gce_longclustername/data/aws_s3_object_minimal-gce-with-a-very-very-very-very-very-long-name.example.com-addons-bootstrap_content index c844816e8aa5f..81e5871e0570c 100644 --- a/tests/integration/update_cluster/minimal_gce_longclustername/data/aws_s3_object_minimal-gce-with-a-very-very-very-very-very-long-name.example.com-addons-bootstrap_content +++ b/tests/integration/update_cluster/minimal_gce_longclustername/data/aws_s3_object_minimal-gce-with-a-very-very-very-very-very-long-name.example.com-addons-bootstrap_content @@ -62,7 +62,7 @@ spec: version: 9.99.0 - id: k8s-1.23 manifest: gcp-cloud-controller.addons.k8s.io/k8s-1.23.yaml - manifestHash: 04674610fafbf0bf7a284d39cd3bb8c5fc5e3ff1707c218cb235d60debaf536b + manifestHash: 854e64edebc744f2d8e7ee5dff7342e3a7f5ba3dd385a2446a4c6e10fe9c23f3 name: gcp-cloud-controller.addons.k8s.io prune: kinds: diff --git a/tests/integration/update_cluster/minimal_gce_longclustername/data/aws_s3_object_minimal-gce-with-a-very-very-very-very-very-long-name.example.com-addons-gcp-cloud-controller.addons.k8s.io-k8s-1.23_content b/tests/integration/update_cluster/minimal_gce_longclustername/data/aws_s3_object_minimal-gce-with-a-very-very-very-very-very-long-name.example.com-addons-gcp-cloud-controller.addons.k8s.io-k8s-1.23_content index 355c804e9675c..fd6684648968d 100644 --- a/tests/integration/update_cluster/minimal_gce_longclustername/data/aws_s3_object_minimal-gce-with-a-very-very-very-very-very-long-name.example.com-addons-gcp-cloud-controller.addons.k8s.io-k8s-1.23_content +++ b/tests/integration/update_cluster/minimal_gce_longclustername/data/aws_s3_object_minimal-gce-with-a-very-very-very-very-very-long-name.example.com-addons-gcp-cloud-controller.addons.k8s.io-k8s-1.23_content @@ -37,6 +37,7 @@ spec: - --cidr-allocator-type=CloudAllocator - --cluster-cidr=100.96.0.0/11 - --cluster-name=minimal-gce-with-a-very-very-very-very-very-long-name-example-com + - --controllers=*,-gkenetworkparamset - --leader-elect=true - --v=2 - --cloud-provider=gce @@ -147,6 +148,13 @@ rules: - create - patch - update +- apiGroups: + - "" + resources: + - services/status + verbs: + - patch + - update - apiGroups: - coordination.k8s.io resources: @@ -252,6 +260,8 @@ rules: resources: - configmaps verbs: + - create + - patch - get - update @@ -350,8 +360,7 @@ roleRef: kind: ClusterRole name: system:cloud-controller-manager subjects: -- apiGroup: "" - kind: ServiceAccount +- kind: ServiceAccount name: cloud-controller-manager namespace: kube-system diff --git a/tests/integration/update_cluster/minimal_gce_plb/data/aws_s3_object_cluster-completed.spec_content b/tests/integration/update_cluster/minimal_gce_plb/data/aws_s3_object_cluster-completed.spec_content index d8dadf3db276b..2ecb8d67dbad4 100644 --- a/tests/integration/update_cluster/minimal_gce_plb/data/aws_s3_object_cluster-completed.spec_content +++ b/tests/integration/update_cluster/minimal_gce_plb/data/aws_s3_object_cluster-completed.spec_content @@ -24,6 +24,8 @@ spec: cidrAllocatorType: CloudAllocator clusterCIDR: 100.96.0.0/11 clusterName: minimal-gce-plb-example-com + controllers: + - '*,-gkenetworkparamset' image: registry.k8s.io/cloud-provider-gcp/cloud-controller-manager:v26.2.4 leaderElection: leaderElect: true diff --git a/tests/integration/update_cluster/minimal_gce_plb/data/aws_s3_object_minimal-gce-plb.example.com-addons-bootstrap_content b/tests/integration/update_cluster/minimal_gce_plb/data/aws_s3_object_minimal-gce-plb.example.com-addons-bootstrap_content index f78512e19d7d3..5aba84f78146c 100644 --- a/tests/integration/update_cluster/minimal_gce_plb/data/aws_s3_object_minimal-gce-plb.example.com-addons-bootstrap_content +++ b/tests/integration/update_cluster/minimal_gce_plb/data/aws_s3_object_minimal-gce-plb.example.com-addons-bootstrap_content @@ -62,7 +62,7 @@ spec: version: 9.99.0 - id: k8s-1.23 manifest: gcp-cloud-controller.addons.k8s.io/k8s-1.23.yaml - manifestHash: 25977d1f21dea7d3b29bdd65ae4f1a454e2539e9e53f94ea193e5e0c543dbb41 + manifestHash: fd710d47ea12ec2f0662ec4ca628c1050d28310ea8631c811dba6baef89f14df name: gcp-cloud-controller.addons.k8s.io prune: kinds: diff --git a/tests/integration/update_cluster/minimal_gce_plb/data/aws_s3_object_minimal-gce-plb.example.com-addons-gcp-cloud-controller.addons.k8s.io-k8s-1.23_content b/tests/integration/update_cluster/minimal_gce_plb/data/aws_s3_object_minimal-gce-plb.example.com-addons-gcp-cloud-controller.addons.k8s.io-k8s-1.23_content index bf9805f2ad849..7bb37672438dc 100644 --- a/tests/integration/update_cluster/minimal_gce_plb/data/aws_s3_object_minimal-gce-plb.example.com-addons-gcp-cloud-controller.addons.k8s.io-k8s-1.23_content +++ b/tests/integration/update_cluster/minimal_gce_plb/data/aws_s3_object_minimal-gce-plb.example.com-addons-gcp-cloud-controller.addons.k8s.io-k8s-1.23_content @@ -37,6 +37,7 @@ spec: - --cidr-allocator-type=CloudAllocator - --cluster-cidr=100.96.0.0/11 - --cluster-name=minimal-gce-plb-example-com + - --controllers=*,-gkenetworkparamset - --leader-elect=true - --v=2 - --cloud-provider=gce @@ -147,6 +148,13 @@ rules: - create - patch - update +- apiGroups: + - "" + resources: + - services/status + verbs: + - patch + - update - apiGroups: - coordination.k8s.io resources: @@ -252,6 +260,8 @@ rules: resources: - configmaps verbs: + - create + - patch - get - update @@ -350,8 +360,7 @@ roleRef: kind: ClusterRole name: system:cloud-controller-manager subjects: -- apiGroup: "" - kind: ServiceAccount +- kind: ServiceAccount name: cloud-controller-manager namespace: kube-system diff --git a/tests/integration/update_cluster/minimal_gce_private/data/aws_s3_object_cluster-completed.spec_content b/tests/integration/update_cluster/minimal_gce_private/data/aws_s3_object_cluster-completed.spec_content index 2bc9bc39b1d13..6b1f5e6af1040 100644 --- a/tests/integration/update_cluster/minimal_gce_private/data/aws_s3_object_cluster-completed.spec_content +++ b/tests/integration/update_cluster/minimal_gce_private/data/aws_s3_object_cluster-completed.spec_content @@ -20,6 +20,8 @@ spec: cidrAllocatorType: CloudAllocator clusterCIDR: 100.96.0.0/11 clusterName: minimal-gce-private-example-com + controllers: + - '*,-gkenetworkparamset' image: registry.k8s.io/cloud-provider-gcp/cloud-controller-manager:v26.2.4 leaderElection: leaderElect: true diff --git a/tests/integration/update_cluster/minimal_gce_private/data/aws_s3_object_minimal-gce-private.example.com-addons-bootstrap_content b/tests/integration/update_cluster/minimal_gce_private/data/aws_s3_object_minimal-gce-private.example.com-addons-bootstrap_content index a5ffdfc0ec4f6..9412e3a190287 100644 --- a/tests/integration/update_cluster/minimal_gce_private/data/aws_s3_object_minimal-gce-private.example.com-addons-bootstrap_content +++ b/tests/integration/update_cluster/minimal_gce_private/data/aws_s3_object_minimal-gce-private.example.com-addons-bootstrap_content @@ -62,7 +62,7 @@ spec: version: 9.99.0 - id: k8s-1.23 manifest: gcp-cloud-controller.addons.k8s.io/k8s-1.23.yaml - manifestHash: 553ec14dae35de48048472c7463f696dad7cc05aa5233202ae19d4b4c53b39bf + manifestHash: 2643e77f40cb84dc4d7b873a80f88a5f682cc19d5cd9c1fd9b546bb149a8f000 name: gcp-cloud-controller.addons.k8s.io prune: kinds: diff --git a/tests/integration/update_cluster/minimal_gce_private/data/aws_s3_object_minimal-gce-private.example.com-addons-gcp-cloud-controller.addons.k8s.io-k8s-1.23_content b/tests/integration/update_cluster/minimal_gce_private/data/aws_s3_object_minimal-gce-private.example.com-addons-gcp-cloud-controller.addons.k8s.io-k8s-1.23_content index 822c706e78216..896cb958b6ef7 100644 --- a/tests/integration/update_cluster/minimal_gce_private/data/aws_s3_object_minimal-gce-private.example.com-addons-gcp-cloud-controller.addons.k8s.io-k8s-1.23_content +++ b/tests/integration/update_cluster/minimal_gce_private/data/aws_s3_object_minimal-gce-private.example.com-addons-gcp-cloud-controller.addons.k8s.io-k8s-1.23_content @@ -37,6 +37,7 @@ spec: - --cidr-allocator-type=CloudAllocator - --cluster-cidr=100.96.0.0/11 - --cluster-name=minimal-gce-private-example-com + - --controllers=*,-gkenetworkparamset - --leader-elect=true - --v=2 - --cloud-provider=gce @@ -147,6 +148,13 @@ rules: - create - patch - update +- apiGroups: + - "" + resources: + - services/status + verbs: + - patch + - update - apiGroups: - coordination.k8s.io resources: @@ -252,6 +260,8 @@ rules: resources: - configmaps verbs: + - create + - patch - get - update @@ -350,8 +360,7 @@ roleRef: kind: ClusterRole name: system:cloud-controller-manager subjects: -- apiGroup: "" - kind: ServiceAccount +- kind: ServiceAccount name: cloud-controller-manager namespace: kube-system diff --git a/upup/models/cloudup/resources/addons/gcp-cloud-controller.addons.k8s.io/k8s-1.23.yaml.template b/upup/models/cloudup/resources/addons/gcp-cloud-controller.addons.k8s.io/k8s-1.23.yaml.template index d5d7bad051ada..9f2be7b87fecd 100644 --- a/upup/models/cloudup/resources/addons/gcp-cloud-controller.addons.k8s.io/k8s-1.23.yaml.template +++ b/upup/models/cloudup/resources/addons/gcp-cloud-controller.addons.k8s.io/k8s-1.23.yaml.template @@ -123,6 +123,13 @@ rules: - create - patch - update +- apiGroups: + - "" + resources: + - services/status + verbs: + - patch + - update - apiGroups: - coordination.k8s.io resources: @@ -222,6 +229,8 @@ rules: resourceNames: - cloud-controller-manager verbs: + - create + - patch - get - update --- @@ -306,7 +315,6 @@ roleRef: name: system:cloud-controller-manager subjects: - kind: ServiceAccount - apiGroup: "" name: cloud-controller-manager namespace: kube-system ---