Skip to content

Commit

Permalink
feat: add customizable probes (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
kkapper authored Oct 30, 2024
1 parent d7dd928 commit ebc335e
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 8 deletions.
2 changes: 1 addition & 1 deletion charts/databend-meta/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 10 additions & 3 deletions charts/databend-meta/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 5 additions & 0 deletions charts/databend-meta/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion charts/databend-query/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 10 additions & 3 deletions charts/databend-query/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 5 additions & 0 deletions charts/databend-query/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit ebc335e

Please sign in to comment.