From 1c22e90d85008abbf60e71d6ec22b690a8ac6c5f Mon Sep 17 00:00:00 2001 From: Markus Pesch Date: Tue, 24 Sep 2024 21:23:25 +0200 Subject: [PATCH] feat: add option to customize probes --- templates/deployment.yaml | 14 ++++++-------- values.yaml | 12 ++++++++++++ 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/templates/deployment.yaml b/templates/deployment.yaml index 872ca83..52374de 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -26,20 +26,18 @@ spec: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} + {{- with .Values.livenessProbe }} livenessProbe: - httpGet: - scheme: HTTP - path: /healthz - port: http + {{- toYaml . | nindent 12 }} + {{- end }} ports: - name: http containerPort: {{ .Values.config.ATHENS_PORT | default 3000 }} protocol: TCP + {{- with .Values.readinessProbe }} readinessProbe: - httpGet: - scheme: HTTP - path: /healthz - port: http + {{- toYaml . | nindent 12 }} + {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} {{- with .Values.extraVolumeMounts }} diff --git a/values.yaml b/values.yaml index 10d6d20..43ef460 100644 --- a/values.yaml +++ b/values.yaml @@ -102,6 +102,12 @@ config: {} # MY_S3_BUCKET_NAME: # PROXY_FORCE_SSL: +livenessProbe: + httpGet: + scheme: HTTP + path: /healthz + port: http + replicaCount: 1 serviceAccount: @@ -137,6 +143,12 @@ ingress: hosts: - "your-hostname" +readinessProbe: + httpGet: + scheme: HTTP + path: /healthz + port: http + resources: {} # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little