From 86d93086bd9f80235f9df5d6e90eed31999381af Mon Sep 17 00:00:00 2001 From: Chris Dueck Date: Wed, 1 Nov 2023 14:34:03 -0400 Subject: [PATCH] Add template for ServiceAccount annotations Signed-off-by: Chris Dueck --- charts/opa-kube-mgmt/templates/serviceaccount.yaml | 4 ++++ charts/opa-kube-mgmt/values.yaml | 2 ++ 2 files changed, 6 insertions(+) diff --git a/charts/opa-kube-mgmt/templates/serviceaccount.yaml b/charts/opa-kube-mgmt/templates/serviceaccount.yaml index e02637c04..ef2fff1f1 100644 --- a/charts/opa-kube-mgmt/templates/serviceaccount.yaml +++ b/charts/opa-kube-mgmt/templates/serviceaccount.yaml @@ -3,6 +3,10 @@ apiVersion: v1 kind: ServiceAccount metadata: name: {{ template "opa.serviceAccountName" .}} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{ toYaml . }} + {{- end }} labels: app: {{ template "opa.fullname" . }} chart: {{ template "opa.chart" . }} diff --git a/charts/opa-kube-mgmt/values.yaml b/charts/opa-kube-mgmt/values.yaml index 5ef434257..47a5b4904 100644 --- a/charts/opa-kube-mgmt/values.yaml +++ b/charts/opa-kube-mgmt/values.yaml @@ -223,6 +223,8 @@ rbac: serviceAccount: # Specifies whether a ServiceAccount should be created create: true + # Annotations for the ServiceAccount + annotations: {} # The name of the ServiceAccount to use. # If not set and create is true, a name is generated using the fullname template name: