From 1a603375f2900ef7fc9f0439b45bd42b032b3669 Mon Sep 17 00:00:00 2001 From: Gerry Date: Mon, 16 Dec 2019 15:04:34 +0100 Subject: [PATCH 1/2] 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. --- charts/kubernetes-external-secrets/templates/deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: From bfe86c7306a9087ed88e81b119a1a0731130b881 Mon Sep 17 00:00:00 2001 From: Gerry Date: Mon, 16 Dec 2019 15:08:30 +0100 Subject: [PATCH 2/2] 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/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: