Add enabled flags for health probes in web and api deployments
Some checks failed
Helm Chart Build / lint-only (push) Has been skipped
Build and Deploy / build-web (push) Failing after 7s
Helm Chart Build / build-helm (push) Successful in 8s
Build and Deploy / build-api (push) Successful in 42s

This commit is contained in:
d.viti
2025-10-08 13:04:15 +02:00
parent 7ca15fe1a5
commit 0935010f89
3 changed files with 22 additions and 6 deletions

View File

@@ -39,10 +39,14 @@ spec:
- name: http - name: http
containerPort: {{ .Values.api.service.targetPort }} containerPort: {{ .Values.api.service.targetPort }}
protocol: TCP protocol: TCP
{{- if and .Values.api.healthProbes.enabled .Values.api.livenessProbe.enabled }}
livenessProbe: livenessProbe:
{{- toYaml .Values.api.livenessProbe | nindent 12 }} {{- omit .Values.api.livenessProbe "enabled" | toYaml | nindent 12 }}
{{- end }}
{{- if and .Values.api.healthProbes.enabled .Values.api.readinessProbe.enabled }}
readinessProbe: readinessProbe:
{{- toYaml .Values.api.readinessProbe | nindent 12 }} {{- omit .Values.api.readinessProbe "enabled" | toYaml | nindent 12 }}
{{- end }}
resources: resources:
{{- toYaml .Values.api.resources | nindent 12 }} {{- toYaml .Values.api.resources | nindent 12 }}
env: env:
@@ -74,4 +78,4 @@ spec:
tolerations: tolerations:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
{{- end }} {{- end }}

View File

@@ -39,10 +39,14 @@ spec:
- name: http - name: http
containerPort: {{ .Values.web.service.targetPort }} containerPort: {{ .Values.web.service.targetPort }}
protocol: TCP protocol: TCP
{{- if and .Values.web.healthProbes.enabled .Values.web.livenessProbe.enabled }}
livenessProbe: livenessProbe:
{{- toYaml .Values.web.livenessProbe | nindent 12 }} {{- omit .Values.web.livenessProbe "enabled" | toYaml | nindent 12 }}
{{- end }}
{{- if and .Values.web.healthProbes.enabled .Values.web.readinessProbe.enabled }}
readinessProbe: readinessProbe:
{{- toYaml .Values.web.readinessProbe | nindent 12 }} {{- omit .Values.web.readinessProbe "enabled" | toYaml | nindent 12 }}
{{- end }}
resources: resources:
{{- toYaml .Values.web.resources | nindent 12 }} {{- toYaml .Values.web.resources | nindent 12 }}
env: env:
@@ -74,4 +78,4 @@ spec:
tolerations: tolerations:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
{{- end }} {{- end }}

View File

@@ -48,7 +48,10 @@ web:
env: [] env: []
# Liveness and readiness probes # Liveness and readiness probes
healthProbes:
enabled: true # Set to false to disable both probes
livenessProbe: livenessProbe:
enabled: true # Set to false to disable liveness probe
httpGet: httpGet:
path: /docs path: /docs
port: http port: http
@@ -56,6 +59,7 @@ web:
periodSeconds: 10 periodSeconds: 10
readinessProbe: readinessProbe:
enabled: true # Set to false to disable readiness probe
httpGet: httpGet:
path: /docs path: /docs
port: http port: http
@@ -104,7 +108,10 @@ api:
value: "info" value: "info"
# Liveness and readiness probes # Liveness and readiness probes
healthProbes:
enabled: true # Set to false to disable both probes
livenessProbe: livenessProbe:
enabled: true # Set to false to disable liveness probe
httpGet: httpGet:
path: /health path: /health
port: http port: http
@@ -112,6 +119,7 @@ api:
periodSeconds: 10 periodSeconds: 10
readinessProbe: readinessProbe:
enabled: true # Set to false to disable readiness probe
httpGet: httpGet:
path: /ready path: /ready
port: http port: http