Skip to content

Commit

Permalink
Merge pull request stefanprodan#263 from mstiri/feature/add-startup-p…
Browse files Browse the repository at this point in the history
…robe

chart: Add optional startupProbe values
  • Loading branch information
stefanprodan authored Apr 22, 2023
2 parents 58726f0 + 8c258bb commit 0647aea
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
16 changes: 16 additions & 0 deletions charts/podinfo/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,22 @@ spec:
containerPort: {{ .Values.service.grpcPort }}
protocol: TCP
{{- end }}
{{- if .Values.probes.startup.enable }}
startupProbe:
exec:
command:
- podcli
- check
- http
- localhost:{{ .Values.service.httpPort | default 9898 }}/healthz
{{- with .Values.probes.startup }}
initialDelaySeconds: {{ .initialDelaySeconds | default 1 }}
timeoutSeconds: {{ .timeoutSeconds | default 5 }}
failureThreshold: {{ .failureThreshold | default 3 }}
successThreshold: {{ .successThreshold | default 1 }}
periodSeconds: {{ .periodSeconds | default 10 }}
{{- end }}
{{- end }}
livenessProbe:
exec:
command:
Expand Down
7 changes: 7 additions & 0 deletions charts/podinfo/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,3 +155,10 @@ probes:
failureThreshold: 3
successThreshold: 1
periodSeconds: 10
startup:
enable: false
initialDelaySeconds: 10
timeoutSeconds: 5
failureThreshold: 20
successThreshold: 1
periodSeconds: 10

0 comments on commit 0647aea

Please sign in to comment.