From 97f3099f14246ac7a87ada0b5e26059a93fb0fb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=83=E5=81=A5=E6=AF=85?= <2756283+huang-jy@users.noreply.github.com> Date: Fri, 9 Apr 2021 14:09:09 +0100 Subject: [PATCH] Detect for null values --- moon/templates/moon.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moon/templates/moon.yaml b/moon/templates/moon.yaml index 239f330..38de8d4 100644 --- a/moon/templates/moon.yaml +++ b/moon/templates/moon.yaml @@ -4,7 +4,7 @@ kind: ServiceAccount metadata: name: {{ .Release.Name }} namespace: {{ .Release.Namespace }} - {{- if .Values.moon.serviceaccount.annotations }} + {{- if and .Values.moon.serviceaccount .Values.moon.serviceaccount.annotations }} annotations: {{- range $key, $value := .Values.moon.serviceaccount.annotations }} {{ $key }}: {{ $value | quote }}