blob: c6a76e64556a56f93c5a09833f1c10771c12bf24 [file] [log] [blame]
Andreas Geisslercde4a782024-02-28 16:08:06 +01001{{- /*
2Copyright VMware, Inc.
3SPDX-License-Identifier: APACHE-2.0
4*/}}
5
6{{- if and .Values.serviceAccount.create .Values.rbac.create }}
7apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
8kind: RoleBinding
9metadata:
10 name: {{ include "mongodb.fullname" . }}
11 namespace: {{ include "mongodb.namespace" . | quote }}
12 labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
13roleRef:
14 kind: Role
15 name: {{ include "mongodb.fullname" . }}
16 apiGroup: rbac.authorization.k8s.io
17subjects:
18 - kind: ServiceAccount
19 name: {{ include "mongodb.serviceAccountName" . }}
20 namespace: {{ include "mongodb.namespace" . | quote }}
21{{- end }}