fix(reconciler): simplify health check probe configuration in deployment template

- Updated liveness and readiness probe configurations to directly reference the HTTP GET settings from the values, improving clarity and reducing unnecessary nesting.
- Ensures that the deployment template remains consistent and easier to maintain.

Signed-off-by: zhenyus <zhenyus@mathmast.com>
This commit is contained in:
zhenyus 2025-07-31 23:58:53 +08:00
parent 8f6e8d57b3
commit cf50da8e5a

View File

@ -43,10 +43,8 @@ spec:
{{- include "freeleaps-devops-reconciler.env" . | nindent 12 }}
{{- if .Values.healthcheck.livenessProbe.enabled }}
livenessProbe:
{{- with .Values.healthcheck.livenessProbe.httpGet }}
httpGet:
{{- toYaml . | nindent 14 }}
{{- end }}
{{- toYaml .Values.healthcheck.livenessProbe.httpGet | nindent 14 }}
initialDelaySeconds: {{ .Values.healthcheck.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.healthcheck.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.healthcheck.livenessProbe.timeoutSeconds }}
@ -54,10 +52,8 @@ spec:
{{- end }}
{{- if .Values.healthcheck.readinessProbe.enabled }}
readinessProbe:
{{- with .Values.healthcheck.readinessProbe.httpGet }}
httpGet:
{{- toYaml . | nindent 14 }}
{{- end }}
{{- toYaml .Values.healthcheck.readinessProbe.httpGet | nindent 14 }}
initialDelaySeconds: {{ .Values.healthcheck.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.healthcheck.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.healthcheck.readinessProbe.timeoutSeconds }}