diff --git a/charts/podinfo/templates/deployment.yaml b/charts/podinfo/templates/deployment.yaml index 689bb0c..1344609 100644 --- a/charts/podinfo/templates/deployment.yaml +++ b/charts/podinfo/templates/deployment.yaml @@ -136,8 +136,13 @@ spec: - check - http - localhost:{{ .Values.service.httpPort | default 9898 }}/healthz - initialDelaySeconds: 1 - timeoutSeconds: 5 + {{- with .Values.probes.liveness }} + initialDelaySeconds: {{ .initialDelaySeconds | default 1 }} + timeoutSeconds: {{ .timeoutSeconds | default 5 }} + failureThreshold: {{ .failureThreshold | default 3 }} + successThreshold: {{ .successThreshold | default 1 }} + periodSeconds: {{ .periodSeconds | default 10 }} + {{- end }} readinessProbe: exec: command: @@ -145,8 +150,13 @@ spec: - check - http - localhost:{{ .Values.service.httpPort | default 9898 }}/readyz - initialDelaySeconds: 1 - timeoutSeconds: 5 + {{- with .Values.probes.readiness }} + initialDelaySeconds: {{ .initialDelaySeconds | default 1 }} + timeoutSeconds: {{ .timeoutSeconds | default 5 }} + failureThreshold: {{ .failureThreshold | default 3 }} + successThreshold: {{ .successThreshold | default 1 }} + periodSeconds: {{ .periodSeconds | default 10 }} + {{- end }} volumeMounts: - name: data mountPath: /data diff --git a/charts/podinfo/values.yaml b/charts/podinfo/values.yaml index 6e2a5c2..68ed887 100644 --- a/charts/podinfo/values.yaml +++ b/charts/podinfo/values.yaml @@ -140,3 +140,18 @@ tolerations: [] affinity: {} podAnnotations: {} + +# https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes +probes: + readiness: + initialDelaySeconds: 1 + timeoutSeconds: 5 + failureThreshold: 3 + successThreshold: 1 + periodSeconds: 10 + liveness: + initialDelaySeconds: 1 + timeoutSeconds: 5 + failureThreshold: 3 + successThreshold: 1 + periodSeconds: 10