Add guards for empty map in other required areas

This commit is contained in:
Eric Ace 2025-07-27 16:48:12 -04:00
parent ec5fefe4ee
commit a3d019d560
3 changed files with 6 additions and 0 deletions

View File

@ -184,6 +184,7 @@ spec:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- if eq $providerName "webhook" }}
{{- if kindIs "map" .Values.provider }}
{{- if .Values.provider.webhook.sidecar }}
{{- with .Values.provider.webhook.sidecar }}
- name: webhook
@ -222,6 +223,7 @@ spec:
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- if or .Values.secretConfiguration.enabled .Values.extraVolumes }}
volumes:
{{- if .Values.secretConfiguration.enabled }}

View File

@ -27,6 +27,7 @@ spec:
targetPort: http
protocol: TCP
{{- if eq $providerName "webhook" }}
{{- if kindIs "map" .Values.provider }}
{{- if .Values.provider.webhook.sidecar }}
{{- with .Values.provider.webhook.sidecar.service }}
- name: http-webhook
@ -36,3 +37,4 @@ spec:
{{- end }}
{{- end }}
{{- end }}
{{- end }}

View File

@ -50,6 +50,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if eq $providerName "webhook" }}
{{- if kindIs "map" .Values.provider }}
{{- if .Values.provider.webhook.sidecar }}
{{- with .Values.provider.webhook.sidecar.serviceMonitor }}
- port: http-webhook
@ -81,6 +82,7 @@ spec:
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- with .Values.serviceMonitor.targetLabels }}
targetLabels:
{{- toYaml . | nindent 4 }}