From 47131fcfc528dc8aed73181ea7f4b075dc66ca6e Mon Sep 17 00:00:00 2001 From: Ben Sherman Date: Tue, 30 May 2023 07:15:34 -0700 Subject: [PATCH] adding variable for service account annotations (#11) --- charts/launch-agent/Chart.yaml | 2 +- charts/launch-agent/templates/rbac.yaml | 4 ++++ charts/launch-agent/values.yaml | 5 +++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/charts/launch-agent/Chart.yaml b/charts/launch-agent/Chart.yaml index 7e75d82d..7353868d 100644 --- a/charts/launch-agent/Chart.yaml +++ b/charts/launch-agent/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: launch-agent description: A Helm chart for running the W&B Launch Agent in Kubernetes type: application -version: 0.3.0 +version: 0.4.0 maintainers: - name: wandb email: support@wandb.com diff --git a/charts/launch-agent/templates/rbac.yaml b/charts/launch-agent/templates/rbac.yaml index b0dfdae6..abf604e1 100644 --- a/charts/launch-agent/templates/rbac.yaml +++ b/charts/launch-agent/templates/rbac.yaml @@ -3,6 +3,10 @@ kind: ServiceAccount metadata: name: wandb-launch-serviceaccount namespace: wandb +{{ if .Values.serviceAccount.annotations }} + annotations: +{{ toYaml .Values.serviceAccount.annotations | indent 4 }} +{{ end }} --- apiVersion: rbac.authorization.k8s.io/v1 kind: Role diff --git a/charts/launch-agent/values.yaml b/charts/launch-agent/values.yaml index bad5f09d..b47a90bd 100644 --- a/charts/launch-agent/values.yaml +++ b/charts/launch-agent/values.yaml @@ -21,3 +21,8 @@ volcano: true # and mounted into the agent container. Set this if you want to clone private # repos. gitCreds: | + +# Annotations for the wandb service account. Useful when setting up workload identity on gcp. +serviceAccount: + annotations: + iam.gke.io/gcp-service-account: