From e7ed3ffc00ff1658621328e66f4bfeb3eae0bcfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taneli=20Lepp=C3=A4?= Date: Mon, 18 Mar 2024 15:44:34 +0100 Subject: [PATCH] Add service account specific annotations for Helm chart (for Workload Identity Federation). --- deploy/chart/Chart.yaml | 2 +- deploy/chart/templates/service-account.yaml | 3 ++- deploy/chart/values.yaml | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/deploy/chart/Chart.yaml b/deploy/chart/Chart.yaml index 9ccadb7..e6022e1 100644 --- a/deploy/chart/Chart.yaml +++ b/deploy/chart/Chart.yaml @@ -9,7 +9,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.1 +version: 0.1.2 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/deploy/chart/templates/service-account.yaml b/deploy/chart/templates/service-account.yaml index ae88c31..52ec70c 100644 --- a/deploy/chart/templates/service-account.yaml +++ b/deploy/chart/templates/service-account.yaml @@ -6,7 +6,8 @@ metadata: namespace: {{ include "autoneg.namespace" . | quote }} labels: {{- include "autoneg.labels" . | nindent 4 }} app.kubernetes.io/component: controller - {{- with .Values.annotations }} + {{- $annotations := merge .Values.annotations .Values.serviceAccount.annotations -}} + {{- with $annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} diff --git a/deploy/chart/values.yaml b/deploy/chart/values.yaml index edd17d5..3290082 100644 --- a/deploy/chart/values.yaml +++ b/deploy/chart/values.yaml @@ -24,6 +24,7 @@ replicas: 1 serviceAccount: create: true name: autoneg-controller-manager + annotations: {} nodeSelector: iam.gke.io/gke-metadata-server-enabled: "true"