diff --git a/charts/plugin-barman-cloud/templates/rbac.yaml b/charts/plugin-barman-cloud/templates/rbac.yaml index 6a550c136..b1525b079 100644 --- a/charts/plugin-barman-cloud/templates/rbac.yaml +++ b/charts/plugin-barman-cloud/templates/rbac.yaml @@ -23,10 +23,15 @@ kind: ServiceAccount metadata: labels: {{- include "plugin-barman-cloud.labels" . | nindent 4 }} - {{- with .Values.commonAnnotations }} + {{- if or .Values.serviceAccount.additionalAnnotations .Values.commonAnnotations }} annotations: + {{- with .Values.serviceAccount.additionalAnnotations }} {{- toYaml . | nindent 4 }} {{- end }} + {{- with .Values.commonAnnotations }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- end }} name: {{ include "plugin-barman-cloud.serviceAccountName" . }} namespace: {{ include "plugin-barman-cloud.namespace" . }} {{- end }} diff --git a/charts/plugin-barman-cloud/values.schema.json b/charts/plugin-barman-cloud/values.schema.json index 112c01ae1..80aca95ba 100644 --- a/charts/plugin-barman-cloud/values.schema.json +++ b/charts/plugin-barman-cloud/values.schema.json @@ -383,6 +383,12 @@ }, "serviceAccount": { "properties": { + "additionalAnnotations": { + "additionalProperties": true, + "description": "Annotations to be added only to the service account.", + "required": [], + "title": "additionalAnnotations" + }, "create": { "default": true, "description": "Specifies whether the service account should be created.", diff --git a/charts/plugin-barman-cloud/values.yaml b/charts/plugin-barman-cloud/values.yaml index ea3705631..a9bb50f90 100644 --- a/charts/plugin-barman-cloud/values.yaml +++ b/charts/plugin-barman-cloud/values.yaml @@ -88,6 +88,11 @@ serviceAccount: # -- The name of the service account to use. # If not set and create is true, a name is generated using the fullname template. name: "" + # @schema + # additionalProperties: true + # @schema + # -- Annotations to be added only to the service account if it's created. + additionalAnnotations: {} rbac: # -- Specifies whether Role and RoleBinding should be created.