fix(common): Make sure service.monitor is optional

This commit is contained in:
Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs 2022-09-14 14:24:49 +02:00
parent 4d09009bf8
commit 0bbc5baca9
No known key found for this signature in database
GPG key ID: BC5E2BD907F9A8EC
2 changed files with 4 additions and 2 deletions

View file

@ -17,7 +17,7 @@ Renders the Service objects required by the chart.
{{- include "common.classes.service" $ | nindent 0 -}}
{{/* Include a serviceMonitor if required */}}
{{- if $service.monitor.enabled | default false -}}
{{- if ($service.monitor).enabled | default false -}}
{{- $_ := set $ "ObjectValues" (dict "serviceMonitor" $serviceValues.monitor) -}}
{{- $_ := set $.ObjectValues.serviceMonitor "nameOverride" $serviceValues.nameOverride -}}