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
2 changes: 1 addition & 1 deletion charts/psmdb-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ appVersion: "1.21.1"
description: A Helm chart for deploying the Percona Operator for MongoDB
name: psmdb-operator
home: https://docs.percona.com/percona-operator-for-mongodb/
version: 1.21.2
version: 1.21.3
maintainers:
- name: nmarukovich
email: natalia.marukovich@percona.com
Expand Down
11 changes: 11 additions & 0 deletions charts/psmdb-operator/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,14 @@ app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end -}}

{{/*
Create the name of the service account to use
*/}}
{{- define "psmdb-operator.serviceAccountName" -}}
{{- if .Values.serviceAccount.name -}}
{{- printf "%s" .Values.serviceAccount.name }}
{{- else -}}
{{- printf "%s" (include "psmdb-operator.fullname" .) }}
{{- end }}
{{- end -}}
6 changes: 3 additions & 3 deletions charts/psmdb-operator/templates/role-binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "psmdb-operator.fullname" . }}
name: {{ include "psmdb-operator.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
{{- with .Values.serviceAccount.annotations }}
annotations:
Expand All @@ -18,15 +18,15 @@ kind: RoleBinding
{{- end }}
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: service-account-{{ include "psmdb-operator.fullname" . }}
name: service-account-{{ include "psmdb-operator.serviceAccountName" . }}
{{- if not (or .Values.watchNamespace .Values.watchAllNamespaces) }}
namespace: {{ .Release.Namespace }}
{{- end }}
labels:
{{ include "psmdb-operator.labels" . | indent 4 }}
subjects:
- kind: ServiceAccount
name: {{ include "psmdb-operator.fullname" . }}
name: {{ include "psmdb-operator.serviceAccountName" . }}
{{- if or .Values.watchNamespace .Values.watchAllNamespaces }}
namespace: {{ .Release.Namespace }}
{{- end }}
Expand Down
6 changes: 4 additions & 2 deletions charts/psmdb-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ rbac:
serviceAccount:
# serviceAccount.create: Whether to create the Service Accounts or not
create: true
# serviceAccount.name: Name of the Service Account to use. If not set, the chart will
name: ""
# annotations to add to the service account
annotations: {}

Expand All @@ -50,7 +52,7 @@ podAnnotations: {}

# labels to the operator pod
podLabels: {}

podSecurityContext: {}
# runAsNonRoot: true
# runAsUser: 2
Expand Down Expand Up @@ -98,6 +100,6 @@ affinity: {}
logStructured: false
logLevel: "INFO"

# maxConcurrentReconciles controls the number of concurrent workers
# maxConcurrentReconciles controls the number of concurrent workers
# that can reconcile resources in Percona Server for MongoDB clusters in parallel.
maxConcurrentReconciles: "1"