From d2c19667fc68d946ea57219aca68ce95c011ba12 Mon Sep 17 00:00:00 2001 From: DutchEllie Date: Sat, 12 Mar 2022 19:57:43 +0100 Subject: [PATCH] Another templating issue --- .drone/helm/chart/templates/ingress.yaml | 7 ++++--- .drone/helm/chart/templates/service.yaml | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.drone/helm/chart/templates/ingress.yaml b/.drone/helm/chart/templates/ingress.yaml index 3aac84e..776f979 100644 --- a/.drone/helm/chart/templates/ingress.yaml +++ b/.drone/helm/chart/templates/ingress.yaml @@ -3,9 +3,10 @@ kind: Ingress metadata: name: {{ .Values.ingress.name }} namespace: {{ .Release.Namespace }} - {{- if .Values.ingress.annotations }} - annotations: {{ toYaml .Values.ingress.annotations | nindent 4 }} - {{- end}} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} spec: ingressClassName: {{ .Values.ingress.className }} {{- if .Values.ingress.tls }} diff --git a/.drone/helm/chart/templates/service.yaml b/.drone/helm/chart/templates/service.yaml index 534221f..3310517 100644 --- a/.drone/helm/chart/templates/service.yaml +++ b/.drone/helm/chart/templates/service.yaml @@ -3,9 +3,10 @@ kind: Service metadata: name: {{ .Values.service.name }} namespace: {{ .Release.Namespace }} - {{- if .Values.service.annotations }} - annotations: {{ toYaml .Values.service.annotations | nindent 4}} - {{- end}} + {{- with .Values.service.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} spec: selector: app: {{ .Values.name }}