Skip to content

Commit

Permalink
Fix empty annotations (helm#22580)
Browse files Browse the repository at this point in the history
Currently setting the serviceAccountAnnotations without the other rbac stuff fails with `error validating data: [apiVersion not set, kind not set]`, this is because the only line being rendered is the `annotations: {{ toYaml...` line.
This change would prevent failure, but will swallow a potential misconfiguration (would a user want to have serviceAccountAnnotations with the service account not being created? - maybe but I'm not too sure about this).
As an alternative, an explicit fail message could be set if serviceAccountAnnotations are set without the service account being created.

Signed-off-by: Jonathan Cowling <[email protected]>

Version bump

Signed-off-by: Jonathan Cowling <[email protected]>
Signed-off-by: David J. M. Karlsen <[email protected]>
  • Loading branch information
cowlingj authored and includerandom committed Jul 19, 2020
1 parent 5f70b62 commit 90a3484
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion stable/cluster-autoscaler/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
description: Scales worker nodes within autoscaling groups.
icon: https://github.com/kubernetes/kubernetes/blob/master/logo/logo.png
name: cluster-autoscaler
version: 7.3.2
version: 7.3.3
appVersion: 1.17.1
home: https://github.com/kubernetes/autoscaler
sources:
Expand Down
2 changes: 1 addition & 1 deletion stable/cluster-autoscaler/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
labels:
{{ include "cluster-autoscaler.labels" . | indent 4 }}
name: {{ template "cluster-autoscaler.serviceAccountName" . }}
{{- end }}
{{- if .Values.rbac.serviceAccountAnnotations }}
annotations: {{ toYaml .Values.rbac.serviceAccountAnnotations | nindent 4 }}
{{- end }}
{{- end }}

0 comments on commit 90a3484

Please sign in to comment.