blob: 0311c0eccf75bdd69a9c442265bfd794ed802bc1 [file] [log] [blame]
Giorgi Lekveishvili4ec4c022024-08-17 15:09:24 +04001{{- if .Values.rbac.create }}
2kind: RoleBinding
3apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
4metadata:
5 name: {{ include "common.names.fullname" . }}
6 namespace: {{ .Release.Namespace | quote }}
7 labels: {{- include "common.labels.standard" . | nindent 4 }}
8 {{- if .Values.commonLabels }}
9 {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
10 {{- end }}
11 {{- if .Values.commonAnnotations }}
12 annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
13 {{- end }}
14roleRef:
15 kind: Role
16 name: {{ include "common.names.fullname" . }}
17 apiGroup: rbac.authorization.k8s.io
18subjects:
19 - kind: ServiceAccount
20 name: {{ include "postgresql.serviceAccountName" . }}
21 namespace: {{ .Release.Namespace | quote }}
22{{- end }}