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

View File

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

View File

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