From 341a34fbbf21d3113597da6a57261e7ca5119e80 Mon Sep 17 00:00:00 2001 From: jonathan-cowling Date: Fri, 29 May 2020 01:12:55 +0100 Subject: [PATCH] Fix empty annotations 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 <09cowlingj@gmail.com> Version bump Signed-off-by: Jonathan Cowling <09cowlingj@gmail.com> Signed-off-by: David J. M. Karlsen --- stable/cluster-autoscaler/Chart.yaml | 2 +- stable/cluster-autoscaler/templates/serviceaccount.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stable/cluster-autoscaler/Chart.yaml b/stable/cluster-autoscaler/Chart.yaml index c92499880c9e..ace3bfca7486 100644 --- a/stable/cluster-autoscaler/Chart.yaml +++ b/stable/cluster-autoscaler/Chart.yaml @@ -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: diff --git a/stable/cluster-autoscaler/templates/serviceaccount.yaml b/stable/cluster-autoscaler/templates/serviceaccount.yaml index 4690850a692a..b3faed8e763c 100644 --- a/stable/cluster-autoscaler/templates/serviceaccount.yaml +++ b/stable/cluster-autoscaler/templates/serviceaccount.yaml @@ -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 }}