From 732da5784600f61945555f24074e64d1eafd56c6 Mon Sep 17 00:00:00 2001 From: jklein Date: Mon, 13 Apr 2026 12:21:52 +0200 Subject: [PATCH] feat(template): added lifecycle probes --- template-chart/templates/xxx.deployment.yaml | 7 +++++- template-chart/templates/xxx.sfs.yaml | 7 +++++- template-chart/values.yaml | 24 ++++++++++++++++++++ 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/template-chart/templates/xxx.deployment.yaml b/template-chart/templates/xxx.deployment.yaml index db5b01b..54d0a45 100644 --- a/template-chart/templates/xxx.deployment.yaml +++ b/template-chart/templates/xxx.deployment.yaml @@ -30,7 +30,12 @@ spec: - containerPort: 80 protocol: TCP name: http - # TODO: Add liveness and readiness probes + livenessProbe: + {{ toYaml .Values.xxx.livenessProbe | nindent 12 }} + readinessProbe: + {{ toYaml .Values.xxx.readinessProbe | nindent 12 }} + startupProbe: + {{ toYaml .Values.xxx.startupProbe | nindent 12 }} resources: {{ toYaml .Values.xxx.resources | nindent 12 }} securityContext: diff --git a/template-chart/templates/xxx.sfs.yaml b/template-chart/templates/xxx.sfs.yaml index 7571a33..6a038f3 100644 --- a/template-chart/templates/xxx.sfs.yaml +++ b/template-chart/templates/xxx.sfs.yaml @@ -31,7 +31,12 @@ spec: - containerPort: 80 protocol: TCP name: http - # TODO: Add liveness and readiness probes + livenessProbe: + {{ toYaml .Values.xxx.livenessProbe | nindent 12 }} + readinessProbe: + {{ toYaml .Values.xxx.readinessProbe | nindent 12 }} + startupProbe: + {{ toYaml .Values.xxx.startupProbe | nindent 12 }} {{- with .Values.xxx.resources }} resources: {{ toYaml . | nindent 12 }} diff --git a/template-chart/values.yaml b/template-chart/values.yaml index cf0d8ae..e10ac55 100644 --- a/template-chart/values.yaml +++ b/template-chart/values.yaml @@ -11,6 +11,30 @@ xxx: cpu: 1 memory: 768Mi ephemeral-storage: 100Mi + livenessProbe: + httpGet: + path: / + port: http + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 3 + readinessProbe: + httpGet: + path: / + port: http + initialDelaySeconds: 10 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 3 + startupProbe: + httpGet: + path: / + port: http + initialDelaySeconds: 30 + periodSeconds: 10 + timeoutSeconds: 5 + failureThreshold: 3 storage: amount: 10Gi