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