From 522a4d545ed1fdd8a5df679d27663ef672cb21f9 Mon Sep 17 00:00:00 2001 From: Enderson Maia Date: Fri, 1 Aug 2025 15:02:00 -0300 Subject: [PATCH] gitlab-ci-pipelines-exporter: add optional healthCheck --- .../templates/deployment.yaml | 6 ++-- .../gitlab-ci-pipelines-exporter/values.yaml | 30 +++++++++++-------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/charts/gitlab-ci-pipelines-exporter/templates/deployment.yaml b/charts/gitlab-ci-pipelines-exporter/templates/deployment.yaml index b044947..893a355 100644 --- a/charts/gitlab-ci-pipelines-exporter/templates/deployment.yaml +++ b/charts/gitlab-ci-pipelines-exporter/templates/deployment.yaml @@ -79,12 +79,14 @@ spec: - name: exporter containerPort: 8080 protocol: TCP -{{- with .Values.livenessProbe }} +{{- if .Values.healthCheck.enabled }} +{{- with .Values.healthCheck.livenessProbe }} livenessProbe: {{ toYaml . | nindent 12 }} {{- end }} -{{- with .Values.readinessProbe }} +{{- with .Values.healthCheck.readinessProbe }} readinessProbe: {{ toYaml . | nindent 12 }} {{- end }} +{{- end }} {{- with .Values.resources }} resources: {{ toYaml . | nindent 12 }} {{- end }} diff --git a/charts/gitlab-ci-pipelines-exporter/values.yaml b/charts/gitlab-ci-pipelines-exporter/values.yaml index 6b69af8..3fb2c34 100644 --- a/charts/gitlab-ci-pipelines-exporter/values.yaml +++ b/charts/gitlab-ci-pipelines-exporter/values.yaml @@ -72,19 +72,23 @@ strategy: ## Liveness and Readiness probes ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ -livenessProbe: - httpGet: - path: /health/live - port: 8080 - -readinessProbe: - httpGet: - path: /health/ready - port: 8080 - initialDelaySeconds: 5 - timeoutSeconds: 5 - failureThreshold: 3 - periodSeconds: 30 +healthCheck: + enabled: true + + livenessProbe: + enabled: true + httpGet: + path: /health/live + port: 8080 + + readinessProbe: + httpGet: + path: /health/ready + port: 8080 + initialDelaySeconds: 5 + timeoutSeconds: 5 + failureThreshold: 3 + periodSeconds: 30 # nodeSelector -- node selector for pod assignment ## ref: https://kubernetes.io/docs/user-guide/node-selection/