diff --git a/charts/plugin-barman-cloud/templates/rbac.yaml b/charts/plugin-barman-cloud/templates/rbac.yaml index 6a550c136f..b1525b079e 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 fdeb819cd4..80aca95ba0 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.", @@ -455,7 +461,7 @@ }, "updateStrategy": { "additionalProperties": true, - "description": "Update strategy for the operator.\nref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy\nFor example:\n type: RollingUpdate\n rollingUpdate:\n maxSurge: 25%\n maxUnavailable: 25%\n\nWARNING: the RollingUpdate strategy is not supported by the operator yet so it can\ncurrently. only use the Recreate strategy.", + "description": "Update strategy for the operator.\nref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy\nFor example:\n type: RollingUpdate\n rollingUpdate:\n maxSurge: 25%\n maxUnavailable: 25%\n\nWARNING: the RollingUpdate strategy is not supported by the operator yet so it can\ncurrently only use the Recreate strategy.", "required": [], "title": "updateStrategy" } diff --git a/charts/plugin-barman-cloud/values.yaml b/charts/plugin-barman-cloud/values.yaml index ea37056316..a9bb50f905 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.