From 86ab1f73a34abf3da778297ce563205a1ee43724 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ronny=20Br=C3=A4unlich?= Date: Thu, 11 Jan 2024 08:00:13 +0100 Subject: [PATCH] feat: add liveness and readiness probe for ui Closes #227 --- HelmSetup.md | 2 ++ charts/devlake/templates/deployments.yaml | 8 ++++++++ charts/devlake/values.yaml | 9 +++++++++ 3 files changed, 19 insertions(+) diff --git a/HelmSetup.md b/HelmSetup.md index 47c2c59..360db86 100644 --- a/HelmSetup.md +++ b/HelmSetup.md @@ -191,6 +191,8 @@ Some useful parameters for the chart, you could also check them in values.yaml | ui.extraLabels | extra labels for ui's statefulset | {} | | ui.securityContext | pod security context values | {} | | ui.containerSecurityContext | container security context values | {} | +| ui.livenessProbe | container livenessprobe | see Values.yaml | +| ui.readinessProbe | container readinessProbe | {} | | service.type | Service type for exposed service | NodePort | | service.uiPort | Node port for config ui | 32001 | | service.ingress.enabled | If enable ingress | false | diff --git a/charts/devlake/templates/deployments.yaml b/charts/devlake/templates/deployments.yaml index 6a52c49..99ed7e9 100644 --- a/charts/devlake/templates/deployments.yaml +++ b/charts/devlake/templates/deployments.yaml @@ -52,6 +52,14 @@ spec: imagePullPolicy: {{ .Values.ui.image.pullPolicy }} ports: - containerPort: 4000 + {{- with .Values.ui.livenessProbe }} + livenessProbe: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.ui.readinessProbe }} + readinessProbe: + {{- toYaml . | nindent 12 }} + {{- end }} {{- if .Values.ui.basicAuth.enabled }} envFrom: - secretRef: diff --git a/charts/devlake/values.yaml b/charts/devlake/values.yaml index b11b3eb..e89d16d 100644 --- a/charts/devlake/values.yaml +++ b/charts/devlake/values.yaml @@ -259,6 +259,15 @@ ui: # capabilities: # drop: # - all + livenessProbe: + httpGet: + path: / + port: 4000 + scheme: HTTP + initialDelaySeconds: 60 + timeoutSeconds: 30 + + readinessProbe: { } # alpine image for some init containers alpine: