From ebc335e07153e5c6d0b5ea408bcc993b829bd614 Mon Sep 17 00:00:00 2001 From: kkapper Date: Tue, 29 Oct 2024 20:28:27 -0400 Subject: [PATCH] feat: add customizable probes (#111) --- charts/databend-meta/Chart.yaml | 2 +- charts/databend-meta/templates/statefulset.yaml | 13 ++++++++++--- charts/databend-meta/values.yaml | 5 +++++ charts/databend-query/Chart.yaml | 2 +- charts/databend-query/templates/statefulset.yaml | 13 ++++++++++--- charts/databend-query/values.yaml | 5 +++++ 6 files changed, 32 insertions(+), 8 deletions(-) diff --git a/charts/databend-meta/Chart.yaml b/charts/databend-meta/Chart.yaml index fe99f09..bfff212 100644 --- a/charts/databend-meta/Chart.yaml +++ b/charts/databend-meta/Chart.yaml @@ -26,7 +26,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.9.5 +version: 0.9.6 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/databend-meta/templates/statefulset.yaml b/charts/databend-meta/templates/statefulset.yaml index f9932c9..52821d3 100644 --- a/charts/databend-meta/templates/statefulset.yaml +++ b/charts/databend-meta/templates/statefulset.yaml @@ -94,17 +94,24 @@ spec: {{- end }} - name: raft containerPort: 28004 + {{- if .Values.livenessProbe.enabled }} livenessProbe: httpGet: path: /v1/health port: admin + initialDelaySeconds: {{ default 5 .Values.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ default 15 .Values.livenessProbe.initialDelaySeconds }} + failureThreshold: {{ default 3 .Values.livenessProbe.initialDelaySeconds }} + {{- end }} + {{- if .Values.readinessProbe.enabled }} readinessProbe: httpGet: path: /v1/health port: admin - initialDelaySeconds: 5 - periodSeconds: 15 - failureThreshold: 3 + initialDelaySeconds: {{ default 5 .Values.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ default 15 .Values.readinessProbe.initialDelaySeconds }} + failureThreshold: {{ default 3 .Values.readinessProbe.initialDelaySeconds }} + {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} env: diff --git a/charts/databend-meta/values.yaml b/charts/databend-meta/values.yaml index d247d2a..f15cfa7 100644 --- a/charts/databend-meta/values.yaml +++ b/charts/databend-meta/values.yaml @@ -33,6 +33,11 @@ serviceAccount: # If not set and create is true, a name is generated using the fullname template name: "" +livenessProbe: + enabled: true +readinessProbe: + enabled: true + service: type: ClusterIP ports: diff --git a/charts/databend-query/Chart.yaml b/charts/databend-query/Chart.yaml index e23ccbf..1da39ee 100644 --- a/charts/databend-query/Chart.yaml +++ b/charts/databend-query/Chart.yaml @@ -25,7 +25,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.10.7 +version: 0.10.8 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/databend-query/templates/statefulset.yaml b/charts/databend-query/templates/statefulset.yaml index 0b5d5b2..be018ec 100644 --- a/charts/databend-query/templates/statefulset.yaml +++ b/charts/databend-query/templates/statefulset.yaml @@ -52,17 +52,24 @@ spec: - name: {{ $key }} containerPort: {{ $val}} {{- end }} + {{- if .Values.livenessProbe.enabled }} livenessProbe: httpGet: path: /v1/health port: admin + initialDelaySeconds: {{ default 5 .Values.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ default 15 .Values.livenessProbe.initialDelaySeconds }} + failureThreshold: {{ default 3 .Values.livenessProbe.initialDelaySeconds }} + {{- end }} + {{- if .Values.readinessProbe.enabled }} readinessProbe: httpGet: path: /v1/health port: admin - initialDelaySeconds: 5 - periodSeconds: 15 - failureThreshold: 3 + initialDelaySeconds: {{ default 5 .Values.readinessProbe.initialDelaySeconds }} + periodSeconds: {{ default 15 .Values.readinessProbe.initialDelaySeconds }} + failureThreshold: {{ default 3 .Values.readinessProbe.initialDelaySeconds }} + {{- end }} resources: {{- toYaml .Values.resources | nindent 12 }} env: diff --git a/charts/databend-query/values.yaml b/charts/databend-query/values.yaml index eb0c908..bed015a 100644 --- a/charts/databend-query/values.yaml +++ b/charts/databend-query/values.yaml @@ -31,6 +31,11 @@ serviceAccount: # If not set and create is true, a name is generated using the fullname template name: "" +livenessProbe: + enabled: true +readinessProbe: + enabled: true + service: type: ClusterIP ports: