blob: 619b70260cd4f1813d102bb41a2d20374c646d77 [file] [log] [blame]
Mohammed Naser65cda132024-05-02 14:34:08 -04001{{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}}
2{{- if and $isSimpleScalable (not .Values.rbac.namespaced) }}
Giovanni Tirloni59219b62024-04-09 14:50:25 -03003kind: ClusterRoleBinding
4apiVersion: rbac.authorization.k8s.io/v1
5metadata:
6 name: {{ template "loki.fullname" . }}-clusterrolebinding
7 labels:
8 {{- include "loki.labels" . | nindent 4 }}
9{{- with .Values.annotations }}
10 annotations:
11{{ toYaml . | indent 4 }}
12{{- end }}
13subjects:
14 - kind: ServiceAccount
15 name: {{ template "loki.serviceAccountName" . }}
16 namespace: {{ .Release.Namespace }}
17roleRef:
18 kind: ClusterRole
19{{- if (not .Values.rbac.useExistingRole) }}
20 name: {{ template "loki.fullname" . }}-clusterrole
21{{- else }}
22 name: {{ .Values.rbac.useExistingRole }}
23{{- end }}
24 apiGroup: rbac.authorization.k8s.io
Mohammed Naser65cda132024-05-02 14:34:08 -040025{{- end -}}