Oleksandr Kozachenko | b009349 | 2023-09-06 21:43:47 +0200 | [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 | kind: RoleBinding |
| 8 | apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }} |
| 9 | metadata: |
| 10 | name: {{ template "common.names.fullname" . }} |
| 11 | namespace: {{ include "common.names.namespace" . | quote }} |
Mohammed Naser | 65cda13 | 2024-05-02 14:34:08 -0400 | [diff] [blame] | 12 | labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} |
Oleksandr Kozachenko | b009349 | 2023-09-06 21:43:47 +0200 | [diff] [blame] | 13 | app.kubernetes.io/component: keycloak |
Oleksandr Kozachenko | b009349 | 2023-09-06 21:43:47 +0200 | [diff] [blame] | 14 | {{- if .Values.commonAnnotations }} |
| 15 | annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} |
| 16 | {{- end }} |
| 17 | roleRef: |
| 18 | apiGroup: rbac.authorization.k8s.io |
| 19 | kind: Role |
| 20 | name: {{ template "common.names.fullname" . }} |
| 21 | subjects: |
| 22 | - kind: ServiceAccount |
| 23 | name: {{ template "keycloak.serviceAccountName" . }} |
| 24 | namespace: {{ include "common.names.namespace" . | quote }} |
| 25 | {{- end }} |