Skip to content

Commit 9b02457

Browse files
authored
fix: Remove deprecated toleration for node-role.kubernetes.io/master (#895)
This was removed in Kubernetes v1.24 so is no longer needed and actually throws a warning now if it is kept when applying manifests: ``` [KubeAPIWarningLogger] spec.template.spec.affinity.nodeAffinity.preferredDuringSchedulingIgnoredDuringExecution[1].preference.matchExpressions[0].key: node-role.kubernetes.io/master is use "node-role.kubernetes.io/control-plane" instead ``` Removal note in https://kubernetes.io/blog/2022/04/07/upcoming-changes-in-kubernetes-1-24/#api-removals-deprecations-and-other-changes-for-kubernetes-1-24. Blocked by #893.
1 parent 73b1648 commit 9b02457

File tree

21 files changed

+26
-59
lines changed

21 files changed

+26
-59
lines changed

charts/cluster-api-runtime-extensions-nutanix/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,4 @@ A Helm chart for cluster-api-runtime-extensions-nutanix
100100
| service.annotations | object | `{}` | |
101101
| service.port | int | `443` | |
102102
| service.type | string | `"ClusterIP"` | |
103-
| tolerations | list | `[{"effect":"NoSchedule","key":"node-role.kubernetes.io/master","operator":"Equal"},{"effect":"NoSchedule","key":"node-role.kubernetes.io/control-plane","operator":"Equal"}]` | Kubernetes pod tolerations |
103+
| tolerations | list | `[{"effect":"NoSchedule","key":"node-role.kubernetes.io/control-plane","operator":"Equal"}]` | Kubernetes pod tolerations |

charts/cluster-api-runtime-extensions-nutanix/templates/ccm/aws/manifests/aws-ccm-v1.27.9-configmap.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,6 @@ data:
177177
- effect: NoSchedule
178178
key: node.cloudprovider.kubernetes.io/uninitialized
179179
value: "true"
180-
- effect: NoSchedule
181-
key: node-role.kubernetes.io/master
182180
- effect: NoSchedule
183181
key: node-role.kubernetes.io/control-plane
184182
updateStrategy:

charts/cluster-api-runtime-extensions-nutanix/templates/ccm/aws/manifests/aws-ccm-v1.28.9-configmap.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,6 @@ data:
177177
- effect: NoSchedule
178178
key: node.cloudprovider.kubernetes.io/uninitialized
179179
value: "true"
180-
- effect: NoSchedule
181-
key: node-role.kubernetes.io/master
182180
- effect: NoSchedule
183181
key: node-role.kubernetes.io/control-plane
184182
updateStrategy:

charts/cluster-api-runtime-extensions-nutanix/templates/ccm/aws/manifests/aws-ccm-v1.29.6-configmap.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,6 @@ data:
177177
- effect: NoSchedule
178178
key: node.cloudprovider.kubernetes.io/uninitialized
179179
value: "true"
180-
- effect: NoSchedule
181-
key: node-role.kubernetes.io/master
182180
- effect: NoSchedule
183181
key: node-role.kubernetes.io/control-plane
184182
updateStrategy:

charts/cluster-api-runtime-extensions-nutanix/templates/ccm/aws/manifests/aws-ccm-v1.30.2-configmap.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,6 @@ data:
177177
- effect: NoSchedule
178178
key: node.cloudprovider.kubernetes.io/uninitialized
179179
value: "true"
180-
- effect: NoSchedule
181-
key: node-role.kubernetes.io/master
182180
- effect: NoSchedule
183181
key: node-role.kubernetes.io/control-plane
184182
updateStrategy:

charts/cluster-api-runtime-extensions-nutanix/templates/ccm/aws/manifests/aws-ccm-v1.31.0-configmap.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,6 @@ data:
177177
- effect: NoSchedule
178178
key: node.cloudprovider.kubernetes.io/uninitialized
179179
value: "true"
180-
- effect: NoSchedule
181-
key: node-role.kubernetes.io/master
182180
- effect: NoSchedule
183181
key: node-role.kubernetes.io/control-plane
184182
updateStrategy:

charts/cluster-api-runtime-extensions-nutanix/templates/ccm/aws/manifests/helm-addon-installation.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,13 @@ data:
3131
{{ "{{" }}$ccmVersion := get $k8sMinorVersionToCCMVersion ( print $clusterSemver.Major "." $clusterSemver.Minor ) {{ "}}" }}
3232
image:
3333
tag: {{ "{{ " }} $ccmVersion {{ "}}" }}
34+
35+
tolerations:
36+
- key: node.cloudprovider.kubernetes.io/uninitialized
37+
value: "true"
38+
effect: NoSchedule
39+
- key: node-role.kubernetes.io/control-plane
40+
effect: NoSchedule
41+
42+
3443
{{- end -}}

charts/cluster-api-runtime-extensions-nutanix/templates/csi/aws-ebs/manifests/aws-ebs-csi-configmap.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -786,9 +786,6 @@ data:
786786
- effect: NoExecute
787787
operator: Exists
788788
tolerationSeconds: 300
789-
- effect: NoSchedule
790-
key: node-role.kubernetes.io/master
791-
operator: Exists
792789
- effect: NoSchedule
793790
key: node-role.kubernetes.io/control-plane
794791
operator: Exists

charts/cluster-api-runtime-extensions-nutanix/templates/csi/aws-ebs/manifests/helm-addon-installation.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ data:
2222
- effect: NoExecute
2323
operator: Exists
2424
tolerationSeconds: 300
25-
- effect: NoSchedule
26-
key: node-role.kubernetes.io/master
27-
operator: Exists
2825
- effect: NoSchedule
2926
key: node-role.kubernetes.io/control-plane
3027
operator: Exists

charts/cluster-api-runtime-extensions-nutanix/templates/csi/local-path/manifests/helm-addon-installation.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ data:
1919
- effect: NoExecute
2020
operator: Exists
2121
tolerationSeconds: 300
22-
- effect: NoSchedule
23-
key: node-role.kubernetes.io/master
24-
operator: Exists
2522
- effect: NoSchedule
2623
key: node-role.kubernetes.io/control-plane
2724
operator: Exists

charts/cluster-api-runtime-extensions-nutanix/templates/csi/local-path/manifests/local-path-provisioner-csi-configmap.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,6 @@ data:
248248
- effect: NoExecute
249249
operator: Exists
250250
tolerationSeconds: 300
251-
- effect: NoSchedule
252-
key: node-role.kubernetes.io/master
253-
operator: Exists
254251
- effect: NoSchedule
255252
key: node-role.kubernetes.io/control-plane
256253
operator: Exists

charts/cluster-api-runtime-extensions-nutanix/templates/csi/nutanix/manifests/helm-addon-installation.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ data:
2020
- effect: NoExecute
2121
operator: Exists
2222
tolerationSeconds: 300
23-
- effect: NoSchedule
24-
key: node-role.kubernetes.io/master
25-
operator: Exists
2623
- effect: NoSchedule
2724
key: node-role.kubernetes.io/control-plane
2825
operator: Exists

charts/cluster-api-runtime-extensions-nutanix/templates/csi/snapshot-controller/manifests/helm-addon-installation.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ data:
1616
- effect: NoExecute
1717
operator: Exists
1818
tolerationSeconds: 300
19-
- effect: NoSchedule
20-
key: node-role.kubernetes.io/master
21-
operator: Exists
2219
- effect: NoSchedule
2320
key: node-role.kubernetes.io/control-plane
2421
operator: Exists

charts/cluster-api-runtime-extensions-nutanix/templates/nfd/manifests/helm-addon-installation.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,12 @@ data:
2222
- "class"
2323
- "vendor"
2424
tolerations:
25-
- effect: NoSchedule
26-
key: node-role.kubernetes.io/master
2725
- effect: NoSchedule
2826
key: node-role.kubernetes.io/control-plane
2927
### <NFD-WORKER-CONF-END-DO-NOT-REMOVE>
3028
3129
gc:
3230
tolerations:
33-
- effect: NoSchedule
34-
key: node-role.kubernetes.io/master
3531
- effect: NoSchedule
3632
key: node-role.kubernetes.io/control-plane
3733
{{- end -}}

charts/cluster-api-runtime-extensions-nutanix/templates/nfd/manifests/node-feature-discovery-configmap.yaml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,8 +1079,6 @@ data:
10791079
securityContext: {}
10801080
serviceAccountName: node-feature-discovery-worker
10811081
tolerations:
1082-
- effect: NoSchedule
1083-
key: node-role.kubernetes.io/master
10841082
- effect: NoSchedule
10851083
key: node-role.kubernetes.io/control-plane
10861084
volumes:
@@ -1145,13 +1143,6 @@ data:
11451143
affinity:
11461144
nodeAffinity:
11471145
preferredDuringSchedulingIgnoredDuringExecution:
1148-
- preference:
1149-
matchExpressions:
1150-
- key: node-role.kubernetes.io/master
1151-
operator: In
1152-
values:
1153-
- ""
1154-
weight: 1
11551146
- preference:
11561147
matchExpressions:
11571148
- key: node-role.kubernetes.io/control-plane
@@ -1287,8 +1278,6 @@ data:
12871278
securityContext: {}
12881279
serviceAccountName: node-feature-discovery-gc
12891280
tolerations:
1290-
- effect: NoSchedule
1291-
key: node-role.kubernetes.io/master
12921281
- effect: NoSchedule
12931282
key: node-role.kubernetes.io/control-plane
12941283
kind: ConfigMap

charts/cluster-api-runtime-extensions-nutanix/values.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,6 @@ nodeSelector: {}
170170

171171
# -- Kubernetes pod tolerations
172172
tolerations:
173-
- key: node-role.kubernetes.io/master
174-
operator: Equal
175-
effect: NoSchedule
176173
- key: node-role.kubernetes.io/control-plane
177174
operator: Equal
178175
effect: NoSchedule

hack/addons/kustomize/aws-ccm/helm-values.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,10 @@ args:
1515
- --v=2
1616
- --cloud-provider=aws
1717
- --configure-cloud-routes=false
18+
19+
tolerations:
20+
- key: node.cloudprovider.kubernetes.io/uninitialized
21+
value: "true"
22+
effect: NoSchedule
23+
- key: node-role.kubernetes.io/control-plane
24+
effect: NoSchedule

hack/addons/kustomize/aws-ebs-csi/helm-values.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ controller:
1616
- effect: NoExecute
1717
operator: Exists
1818
tolerationSeconds: 300
19-
- effect: NoSchedule
20-
key: node-role.kubernetes.io/master
21-
operator: Exists
2219
- effect: NoSchedule
2320
key: node-role.kubernetes.io/control-plane
2421
operator: Exists

hack/addons/kustomize/local-path-provisioner-csi/helm-values.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ tolerations:
1313
- effect: NoExecute
1414
operator: Exists
1515
tolerationSeconds: 300
16-
- effect: NoSchedule
17-
key: node-role.kubernetes.io/master
18-
operator: Exists
1916
- effect: NoSchedule
2017
key: node-role.kubernetes.io/control-plane
2118
operator: Exists

hack/addons/kustomize/nfd/helm-values.yaml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ master:
77
- nvidia.com
88
- beta.amd.com
99
- amd.com
10+
affinity:
11+
nodeAffinity:
12+
preferredDuringSchedulingIgnoredDuringExecution:
13+
- weight: 1
14+
preference:
15+
matchExpressions:
16+
- key: "node-role.kubernetes.io/control-plane"
17+
operator: In
18+
values: [""]
1019

1120
worker: ### <NFD-WORKER-CONF-START-DO-NOT-REMOVE>
1221
config:
@@ -16,15 +25,11 @@ worker: ### <NFD-WORKER-CONF-START-DO-NOT-REMOVE>
1625
- "class"
1726
- "vendor"
1827
tolerations:
19-
- effect: NoSchedule
20-
key: node-role.kubernetes.io/master
2128
- effect: NoSchedule
2229
key: node-role.kubernetes.io/control-plane
2330
### <NFD-WORKER-CONF-END-DO-NOT-REMOVE>
2431

2532
gc:
2633
tolerations:
27-
- effect: NoSchedule
28-
key: node-role.kubernetes.io/master
2934
- effect: NoSchedule
3035
key: node-role.kubernetes.io/control-plane

pkg/handlers/generic/lifecycle/ccm/aws/handler_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ spec:
6969
- effect: NoSchedule
7070
key: node.cloudprovider.kubernetes.io/uninitialized
7171
value: "true"
72-
- effect: NoSchedule
73-
key: node-role.kubernetes.io/master
7472
- effect: NoSchedule
7573
key: node-role.kubernetes.io/control-plane
7674
updateStrategy:

0 commit comments

Comments
 (0)