Skip to content

Commit

Permalink
feat(helm): add configuration for readiness & livenessProbe
Browse files Browse the repository at this point in the history
  • Loading branch information
tchiotludo committed Sep 12, 2022
1 parent b9df239 commit 5b25be0
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 4 deletions.
25 changes: 21 additions & 4 deletions helm/akhq/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,30 @@ spec:
- name: management
containerPort: 28081
protocol: TCP
{{- if $.Values.livenessProbe.enabled }}
livenessProbe:
tcpSocket:
port: management
httpGet:
path: {{ .Values.livenessProbe.prefix | default "" }}{{ $.Values.livenessProbe.path }}
port: {{ $.Values.livenessProbe.port }}
{{- if $.Values.livenessProbe.httpGetExtra }}{{ toYaml $.Values.livenessProbe.httpGetExtra | trim | nindent 14 }}{{ end }}
initialDelaySeconds: {{ $.Values.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ $.Values.livenessProbe.periodSeconds }}
timeoutSeconds: {{ $.Values.livenessProbe.timeoutSeconds }}
successThreshold: {{ $.Values.livenessProbe.successThreshold }}
failureThreshold: {{ $.Values.livenessProbe.failureThreshold }}
{{- end }}
{{- if $.Values.readinessProbe.enabled }}
readinessProbe:
httpGet:
path: {{ .Values.readinessProbe.prefix | default "" }}/health
port: management
path: {{ .Values.readinessProbe.prefix | default "" }}{{ $.Values.readinessProbe.path }}
port: {{ $.Values.readinessProbe.port }}
{{- if $.Values.readinessProbe.httpGetExtra }}{{ toYaml $.Values.readinessProbe.httpGetExtra | trim | nindent 14 }}{{ end }}
initialDelaySeconds: {{ $.Values.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ $.Values.readinessProbe.periodSeconds }}
timeoutSeconds: {{ $.Values.readinessProbe.timeoutSeconds }}
successThreshold: {{ $.Values.readinessProbe.successThreshold }}
failureThreshold: {{ $.Values.readinessProbe.failureThreshold }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
Expand Down
23 changes: 23 additions & 0 deletions helm/akhq/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,31 @@ ingress:
# hosts:
# - akhq.demo.com

### Readiness / Liveness probe config.
### ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/
readinessProbe:
enabled: true
prefix: "" # set same as `micronaut.server.context-path`
path: /health
port: management
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 3
httpGetExtra: {}

livenessProbe:
enabled: true
prefix: "" # set same as `micronaut.server.context-path`
path: /health
port: management
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 3
httpGetExtra: {}

resources: {}
# limits:
Expand Down

0 comments on commit 5b25be0

Please sign in to comment.