summaryrefslogtreecommitdiffstats
path: root/kubernetes/common/mariadb-galera/templates/statefulset.yaml
diff options
context:
space:
mode:
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>2021-05-05 09:20:18 +0200
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>2021-05-08 21:45:08 +0000
commit7f09e76dc0decb9019915d37d69bc4c571a8cae9 (patch)
treebb9e3dfc7eafc191c9f5abbbb3da11140718a13e /kubernetes/common/mariadb-galera/templates/statefulset.yaml
parented3e171daef2e0aba14e0d52d8c436d48e2f4f54 (diff)
[COMMON][MARIADB] Use Startup probes
Instead of long initial delay on readiness and liveness probes, use startup probes and be more aggressive on readiness and liveness. Issue-ID: OOM-2740 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com> Change-Id: I86015a4a0c4ab313929c5bd103dedced1df88ec3
Diffstat (limited to 'kubernetes/common/mariadb-galera/templates/statefulset.yaml')
-rw-r--r--kubernetes/common/mariadb-galera/templates/statefulset.yaml18
1 files changed, 16 insertions, 2 deletions
diff --git a/kubernetes/common/mariadb-galera/templates/statefulset.yaml b/kubernetes/common/mariadb-galera/templates/statefulset.yaml
index bde971ffe7..7b0d90a9aa 100644
--- a/kubernetes/common/mariadb-galera/templates/statefulset.yaml
+++ b/kubernetes/common/mariadb-galera/templates/statefulset.yaml
@@ -129,7 +129,7 @@ spec:
livenessProbe:
exec:
command:
- - bash
+ - sh
- -ec
- |
exec mysqladmin status -u$MARIADB_ROOT_USER -p$MARIADB_ROOT_PASSWORD
@@ -143,7 +143,7 @@ spec:
readinessProbe:
exec:
command:
- - bash
+ - sh
- -ec
- |
exec mysqladmin status -u$MARIADB_ROOT_USER -p$MARIADB_ROOT_PASSWORD
@@ -153,6 +153,20 @@ spec:
successThreshold: {{ .Values.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
{{- end }}
+ {{- if .Values.startupProbe.enabled }}
+ startupProbe:
+ exec:
+ command:
+ - sh
+ - -ec
+ - |
+ exec mysqladmin status -u$MARIADB_ROOT_USER -p$MARIADB_ROOT_PASSWORD
+ initialDelaySeconds: {{ .Values.startupProbe.initialDelaySeconds }}
+ periodSeconds: {{ .Values.startupProbe.periodSeconds }}
+ timeoutSeconds: {{ .Values.startupProbe.timeoutSeconds }}
+ successThreshold: {{ .Values.startupProbe.successThreshold }}
+ failureThreshold: {{ .Values.startupProbe.failureThreshold }}
+ {{- end }}
resources: {{ include "common.resources" . | nindent 12 }}
volumeMounts:
- name: previous-boot