Skip to content

Commit 02d1eb8

Browse files
authored
Merge pull request #416 from runkecheng/feature_optimize_operator_availability
Chart: optimize operator availability
2 parents e7eb189 + fdba485 commit 02d1eb8

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

charts/mysql-operator/templates/deployment.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,22 @@ spec:
7272
{{ toYaml .Values.manager.resources | indent 10 }}
7373
serviceAccountName: {{ template "serviceAccountName" . }}
7474
terminationGracePeriodSeconds: 10
75+
tolerations:
76+
- key: node.kubernetes.io/not-ready
77+
operator: Exists
78+
effect: NoExecute
79+
tolerationSeconds: {{ .Values.tolerationSeconds }}
80+
- key: node.kubernetes.io/unreachable
81+
operator: Exists
82+
effect: NoExecute
83+
tolerationSeconds: {{ .Values.tolerationSeconds }}
84+
affinity:
85+
podAntiAffinity:
86+
requiredDuringSchedulingIgnoredDuringExecution:
87+
- labelSelector:
88+
matchExpressions:
89+
- key: app
90+
operator: In
91+
values:
92+
- {{ template "mysql-operator.name" . }}
93+
topologyKey: "kubernetes.io/hostname"

charts/mysql-operator/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ nameOverride: ""
1414
fullnameOverride: ""
1515
imagePrefix: ""
1616

17+
## node.kubernetes.io/not-ready:NoExecute
18+
## node.kubernetes.io/unreachable:NoExecute
19+
## operator`s toleration time of the above two taints.
20+
tolerationSeconds: 30
21+
1722
manager:
1823
image: radondb/mysql-operator
1924
tag: latest

0 commit comments

Comments
 (0)