Add liveness and readiness probe configuration options to Helm chart templates

This commit is contained in:
Simon Larsen 2024-11-18 15:07:51 +00:00
parent c4096e7000
commit 521844a5ff
No known key found for this signature in database
GPG Key ID: 96C5DCA24769DBCA
9 changed files with 41 additions and 0 deletions

View File

@ -41,6 +41,7 @@ spec:
containers:
- image: {{ printf "%s/%s/%s:%s" $.Values.image.registry $.Values.image.repository "api-reference" $.Values.image.tag }}
name: {{ printf "%s-%s" $.Release.Name "api-reference" }}
{{- if $.Values.enableLivenessProbe }}
# Liveness probe
livenessProbe:
httpGet:
@ -49,6 +50,8 @@ spec:
initialDelaySeconds: 60
periodSeconds: 10
timeoutSeconds: 30
{{- end }}
{{- if $.Values.enableReadinessProbe }}
# Readyness Probe
readinessProbe:
httpGet:
@ -57,6 +60,7 @@ spec:
initialDelaySeconds: 60
periodSeconds: 10
timeoutSeconds: 30
{{- end }}
{{- if $.Values.containerSecurityContext }}
securityContext: {{- $.Values.containerSecurityContext | toYaml | nindent 12 }}
{{- end }}

View File

@ -42,6 +42,8 @@ spec:
- image: {{ printf "%s/%s/%s:%s" $.Values.image.registry $.Values.image.repository "app" $.Values.image.tag }}
name: {{ printf "%s-%s" $.Release.Name "app" }}
# Liveness probe
{{- if $.Values.enableLivenessProbe }}
# Liveness probe
livenessProbe:
httpGet:
path: /status/live
@ -49,6 +51,8 @@ spec:
initialDelaySeconds: 60
periodSeconds: 10
timeoutSeconds: 30
{{- end }}
{{- if $.Values.enableReadinessProbe }}
# Readyness Probe
readinessProbe:
httpGet:
@ -57,6 +61,7 @@ spec:
initialDelaySeconds: 60
periodSeconds: 10
timeoutSeconds: 30
{{- end }}
{{- if $.Values.containerSecurityContext }}
securityContext: {{- $.Values.containerSecurityContext | toYaml | nindent 12 }}
{{- end }}

View File

@ -42,6 +42,8 @@ spec:
- image: {{ printf "%s/%s/%s:%s" $.Values.image.registry $.Values.image.repository "docs" $.Values.image.tag }}
name: {{ printf "%s-%s" $.Release.Name "docs" }}
# Liveness probe
{{- if $.Values.enableLivenessProbe }}
# Liveness probe
livenessProbe:
httpGet:
path: /status/live
@ -49,6 +51,8 @@ spec:
initialDelaySeconds: 60
periodSeconds: 10
timeoutSeconds: 30
{{- end }}
{{- if $.Values.enableReadinessProbe }}
# Readyness Probe
readinessProbe:
httpGet:
@ -57,6 +61,7 @@ spec:
initialDelaySeconds: 60
periodSeconds: 10
timeoutSeconds: 30
{{- end }}
{{- if $.Values.containerSecurityContext }}
securityContext: {{- $.Values.containerSecurityContext | toYaml | nindent 12 }}
{{- end }}

View File

@ -42,6 +42,8 @@ spec:
- image: {{ printf "%s/%s/%s:%s" $.Values.image.registry $.Values.image.repository "home" $.Values.image.tag }}
name: {{ printf "%s-%s" $.Release.Name "home" }}
# Liveness probe
{{- if $.Values.enableLivenessProbe }}
# Liveness probe
livenessProbe:
httpGet:
path: /status/live
@ -49,6 +51,8 @@ spec:
initialDelaySeconds: 60
periodSeconds: 10
timeoutSeconds: 30
{{- end }}
{{- if $.Values.enableReadinessProbe }}
# Readyness Probe
readinessProbe:
httpGet:
@ -57,6 +61,7 @@ spec:
initialDelaySeconds: 60
periodSeconds: 10
timeoutSeconds: 30
{{- end }}
{{- if $.Values.containerSecurityContext }}
securityContext: {{- $.Values.containerSecurityContext | toYaml | nindent 12 }}
{{- end }}

View File

@ -51,6 +51,8 @@ spec:
- image: {{ printf "%s/%s/%s:%s" $.Values.image.registry $.Values.image.repository "ingestor" $.Values.image.tag }}
name: {{ printf "%s-%s" $.Release.Name "ingestor" }}
# Liveness probe
{{- if $.Values.enableLivenessProbe }}
# Liveness probe
livenessProbe:
httpGet:
path: /status/live
@ -58,6 +60,8 @@ spec:
initialDelaySeconds: 60
periodSeconds: 10
timeoutSeconds: 30
{{- end }}
{{- if $.Values.enableReadinessProbe }}
# Readyness Probe
readinessProbe:
httpGet:
@ -66,6 +70,7 @@ spec:
initialDelaySeconds: 60
periodSeconds: 10
timeoutSeconds: 30
{{- end }}
{{- if $.Values.containerSecurityContext }}
securityContext: {{- $.Values.containerSecurityContext | toYaml | nindent 12 }}
{{- end }}

View File

@ -56,6 +56,8 @@ spec:
- image: {{ printf "%s/%s/%s:%s" $.Values.image.registry $.Values.image.repository "nginx" $.Values.image.tag }}
name: {{ printf "%s-%s" $.Release.Name "nginx" }}
# Liveness probe
{{- if $.Values.enableLivenessProbe }}
# Liveness probe
livenessProbe:
httpGet:
path: /status/live
@ -63,6 +65,8 @@ spec:
initialDelaySeconds: 60
periodSeconds: 10
timeoutSeconds: 30
{{- end }}
{{- if $.Values.enableReadinessProbe }}
# Readyness Probe
readinessProbe:
httpGet:
@ -71,6 +75,7 @@ spec:
initialDelaySeconds: 60
periodSeconds: 10
timeoutSeconds: 30
{{- end }}
volumeMounts:
- name: status-page-certs
mountPath: /etc/nginx/certs/StatusPageCerts

View File

@ -41,6 +41,7 @@ spec:
containers:
- image: {{ printf "%s/%s/%s:%s" $.Values.image.registry $.Values.image.repository "worker" $.Values.image.tag }}
name: {{ printf "%s-%s" $.Release.Name "worker" }}
{{- if $.Values.enableLivenessProbe }}
# Liveness probe
livenessProbe:
httpGet:
@ -49,6 +50,8 @@ spec:
initialDelaySeconds: 60
periodSeconds: 10
timeoutSeconds: 30
{{- end }}
{{- if $.Values.enableReadinessProbe }}
# Readyness Probe
readinessProbe:
httpGet:
@ -57,6 +60,7 @@ spec:
initialDelaySeconds: 60
periodSeconds: 10
timeoutSeconds: 30
{{- end }}
{{- if $.Values.containerSecurityContext }}
securityContext: {{- $.Values.containerSecurityContext | toYaml | nindent 12 }}
{{- end }}

View File

@ -41,6 +41,7 @@ spec:
containers:
- image: {{ printf "%s/%s/%s:%s" $.Values.image.registry $.Values.image.repository "workflow" $.Values.image.tag }}
name: {{ printf "%s-%s" $.Release.Name "workflow" }}
{{- if $.Values.enableLivenessProbe }}
# Liveness probe
livenessProbe:
httpGet:
@ -49,6 +50,8 @@ spec:
initialDelaySeconds: 60
periodSeconds: 10
timeoutSeconds: 30
{{- end }}
{{- if $.Values.enableReadinessProbe }}
# Readyness Probe
readinessProbe:
httpGet:
@ -57,6 +60,7 @@ spec:
initialDelaySeconds: 60
periodSeconds: 10
timeoutSeconds: 30
{{- end }}
{{- if $.Values.containerSecurityContext }}
securityContext: {{- $.Values.containerSecurityContext | toYaml | nindent 12 }}
{{- end }}

View File

@ -363,3 +363,7 @@ notifications:
webhooks:
# This is the webhook that will be called when a user is created or signs up.
onCreateUser:
enableLivenessProbe: true
enableReadinessProbe: true