Skip to content

Commit

Permalink
add demoapp-frontend health probes
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-gilber committed Nov 9, 2023
1 parent 6204e84 commit e4e3008
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
15 changes: 14 additions & 1 deletion charts/demoapp-frontend/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,27 @@ spec:
- name: http
containerPort: {{ .Values.service.port }}
protocol: TCP
livenessProbe:
startupProbe:
httpGet:
path: /
port: http
{{- with .Values.startupProbe }}
{{- toYaml . | nindent 12 }}
{{- end }}
readinessProbe:
httpGet:
path: /
port: http
{{- with .Values.readinessProbe }}
{{- toYaml . | nindent 12 }}
{{- end }}
livenessProbe:
httpGet:
path: /
port: http
{{- with .Values.livenessProbe }}
{{- toYaml . | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.volumeMounts }}
Expand Down
21 changes: 21 additions & 0 deletions charts/demoapp-frontend/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,27 @@ env:
# https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#environment-variables
envFrom: {}

# Health probes
# Startup Probe protects (blocks readiness and liveness) the application during start-up
startupProbe:
# Allows up to 5 minutes start-up time (periodSeconds X failureThreshold)
failureThreshold: 20
periodSeconds: 15
successThreshold: 1
timeoutSeconds: 3

readinessProbe:
failureThreshold: 3
periodSeconds: 15
successThreshold: 1
timeoutSeconds: 3

livenessProbe:
failureThreshold: 3
periodSeconds: 15
successThreshold: 1
timeoutSeconds: 3

serviceAccount:
# Specifies whether a service account should be created
create: true
Expand Down

0 comments on commit e4e3008

Please sign in to comment.