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

Commit

Permalink
Fix empty annotations
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 davidkarlsen committed Jul 3, 2020
1 parent f30b0d5 commit 341a34f
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 341a34f

Please sign in to comment.