Skip to content

Commit

Permalink
Liveness probes
Browse files Browse the repository at this point in the history
  • Loading branch information
Valentin Khramtsov committed Sep 23, 2023
1 parent 7cd16f2 commit e8a99a3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 38 deletions.
31 changes: 4 additions & 27 deletions charts/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,33 +46,10 @@ spec:
name: {{ .Release.Name }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- if .Values.livenessProbe.enabled }}
livenessProbe:
exec:
command:
- /bin/sh
- -ec
- grep -aq /app/main /proc/1/cmdline
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:
exec:
command:
- /bin/sh
- -ec
- grep -aq /app/main /proc/1/cmdline
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
successThreshold: {{ .Values.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
{{- end }}

{{- with .Values.livenessProbe }}
livenessProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
16 changes: 5 additions & 11 deletions charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,16 @@ serviceAccount:
podAnnotations: {}

livenessProbe:
enabled: false
initialDelaySeconds: 5
periodSeconds: 30
timeoutSeconds: 1
failureThreshold: 3
successThreshold: 1

readinessProbe:
enabled: false
exec:
command:
- ls
- /app/main
initialDelaySeconds: 5
periodSeconds: 30
periodSeconds: 10
timeoutSeconds: 1
failureThreshold: 3
successThreshold: 1


podSecurityContext: {}
# fsGroup: 2000

Expand Down

0 comments on commit e8a99a3

Please sign in to comment.