Skip to content

Commit e0c3378

Browse files
committed
Fix tolerations for Kubernetes after ~1.24
Around Kubernetes 1.24, the toleration was renamed to "control-plane". Add the new toleration and kept the old one to stay compatible with older Kubernetes.
1 parent 7e6f098 commit e0c3378

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

charts/glouton/templates/daemonset.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ spec:
1919
spec:
2020
{{- if eq .Values.run_on_master true }}
2121
tolerations:
22+
- key: node-role.kubernetes.io/control-plane
23+
effect: NoSchedule
24+
- key: node-role.kubernetes.io/etcd
25+
effect: NoExecute
26+
# "master nodes" was the previous name for "control plane nodes" before Kubernetes ~1.24
2227
- key: node-role.kubernetes.io/master
2328
effect: NoSchedule
2429
{{- end }}

k8s.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,15 @@ spec:
8585
app: glouton
8686
spec:
8787
tolerations:
88+
# this toleration is to have the daemonset runnable on control plane nodes
89+
# remove it if your control plane nodes can't run pods
90+
- key: node-role.kubernetes.io/control-plane
91+
effect: NoSchedule
92+
- key: node-role.kubernetes.io/etcd
93+
effect: NoExecute
8894
# this toleration is to have the daemonset runnable on master nodes
8995
# remove it if your masters can't run pods
96+
# "master nodes" was the previous name for "control plane nodes" before Kubernetes ~1.24
9097
- key: node-role.kubernetes.io/master
9198
effect: NoSchedule
9299
serviceAccountName: glouton

0 commit comments

Comments
 (0)