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