From b163a6908d1de0ca956acbbdbd38de798bbcf784 Mon Sep 17 00:00:00 2001 From: Gerry Date: Mon, 16 Dec 2019 20:34:18 +0100 Subject: [PATCH] fix: default service account annotation value (#252) * Stop adding annotations when there are none If podAnnotations is empty then we should not try to add the annotations at all as they will be empty. * Fix default for ServiceAccount annotation Before this change, if you tried providing a ServiceAccount annotation you will get the following error: `coalesce.go:199: warning: destination for annotations is a table. Ignoring non-table value ` This addresses this by replacing the default for annotations with an empty object. --- charts/kubernetes-external-secrets/templates/deployment.yaml | 2 +- charts/kubernetes-external-secrets/values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/kubernetes-external-secrets/templates/deployment.yaml b/charts/kubernetes-external-secrets/templates/deployment.yaml index f4de0b2d..b8a9c630 100644 --- a/charts/kubernetes-external-secrets/templates/deployment.yaml +++ b/charts/kubernetes-external-secrets/templates/deployment.yaml @@ -21,8 +21,8 @@ spec: {{- if .Values.podLabels }} {{- toYaml .Values.podLabels | nindent 8 }} {{- end }} - annotations: {{- if .Values.podAnnotations }} + annotations: {{- toYaml .Values.podAnnotations | nindent 8 }} {{- end }} spec: diff --git a/charts/kubernetes-external-secrets/values.yaml b/charts/kubernetes-external-secrets/values.yaml index eeab7512..a3490b99 100644 --- a/charts/kubernetes-external-secrets/values.yaml +++ b/charts/kubernetes-external-secrets/values.yaml @@ -33,7 +33,7 @@ serviceAccount: # Specifies whether a service account should be created create: true # Specifies annotations for this service account - annotations: + annotations: {} # The name of the service account to use. # If not set and create is true, a name is generated using the fullname template name: