Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion charts/plugin-barman-cloud/templates/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think going with Values.serviceAccount.annotations might be enough?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No because someone might only want to add additionalAnnotations (i.e only to the service account) and not any common annotations to all resources.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant in place of additionalAnnotations, not common :)

annotations:
{{- with .Values.serviceAccount.additionalAnnotations }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would render the common on first and override with the SA specific ones

{{- 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 }}
Expand Down
8 changes: 7 additions & 1 deletion charts/plugin-barman-cloud/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down Expand Up @@ -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"
}
Expand Down
5 changes: 5 additions & 0 deletions charts/plugin-barman-cloud/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down