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

@ -2,7 +2,7 @@ apiVersion: v2
name: common
description: Function library for Helm charts
type: library
version: 0.2.0
version: 0.2.1
kubeVersion: ">=1.16.0-0"
keywords:
- common
@ -13,6 +13,8 @@ maintainers:
email: me@bjw-s.dev
annotations:
artifacthub.io/changes: |-
- kind: fixed
description: Make sure service.monitor is optional.
- kind: removed
description: BREAKING - Removed support for the `openvpn` and `wireguard` VPN types.
- kind: added

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 -}}