Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.

Commit

Permalink
fix: default service account annotation value (#252)
Browse files Browse the repository at this point in the history
* 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 <nil>`

This addresses this by replacing the default for annotations with an empty
object.
  • Loading branch information
gerrywastaken authored and Flydiverny committed Dec 16, 2019
1 parent 2000864 commit b163a69
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion charts/kubernetes-external-secrets/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit b163a69

Please sign in to comment.