Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions chart/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,27 @@ Create the name of the service account to use
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

{{/*
Determine probe path based on image tag and overrides
*/}}
{{- define "fusionauth.probePath" -}}
{{- $probeName := .probeName -}}
{{- $overridePath := "" -}}
{{- if eq $probeName "liveness" -}}
{{- $overridePath = .Values.livenessProbe.httpGet.path -}}
{{- else if eq $probeName "readiness" -}}
{{- $overridePath = .Values.readinessProbe.httpGet.path -}}
{{- else if eq $probeName "startup" -}}
{{- $overridePath = .Values.startupProbe.httpGet.path -}}
{{- end -}}
{{- if $overridePath -}}
{{- $overridePath -}}
{{- else -}}
{{- if semverCompare ">=1.52.0" .Values.image.tag -}}
/api/health
{{- else -}}
/
{{- end -}}
{{- end -}}
{{- end -}}
3 changes: 3 additions & 0 deletions chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,13 @@ spec:
containerPort: 9011
protocol: TCP
livenessProbe:
{{- $_ := set .Values.livenessProbe "path" (include "fusionauth.probePath" (dict "Values" .Values "probeName" "liveness")) }}
{{- toYaml .Values.livenessProbe | nindent 12 }}
readinessProbe:
{{- $_ := set .Values.readinessProbe "path" (include "fusionauth.probePath" (dict "Values" .Values "probeName" "readiness")) }}
{{- toYaml .Values.readinessProbe | nindent 12 }}
startupProbe:
{{- $_ := set .Values.startupProbe "path" (include "fusionauth.probePath" (dict "Values" .Values "probeName" "startup")) }}
{{- toYaml .Values.startupProbe | nindent 12 }}
{{- with .Values.lifecycle }}
lifecycle:
Expand Down
6 changes: 3 additions & 3 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -258,22 +258,22 @@ podLabels: {}
# livenessProbe -- Configures a livenessProbe to ensure fusionauth is running
livenessProbe:
httpGet:
path: /
# path: / # Defaults to / for <1.52.0, /api/health for >=1.52.0 - uncomment to override
port: http
failureThreshold: 3
periodSeconds: 30
timeoutSeconds: 5
# readinessProbe -- Configures a readinessProbe to ensure fusionauth is ready for requests
readinessProbe:
httpGet:
path: /
# path: / # Defaults to / for <1.52.0, /api/health for >=1.52.0 - uncomment to override
port: http
failureThreshold: 5
timeoutSeconds: 5
# startupProbe -- Configures a startupProbe to ensure fusionauth has finished starting up
startupProbe:
httpGet:
path: /
# path: / # Defaults to / for <1.52.0, /api/health for >=1.52.0 - uncomment to override
port: http
failureThreshold: 20
periodSeconds: 10
Expand Down