blob: 176ada056626ecb06725eebdd45df9ea06fc81ae [file] [log] [blame]
Giovanni Tirloni52306ad2024-04-12 15:35:05 -03001{{- if and (not .Values.rbac.namespaced) (not .Values.rbac.useExistingRole) }}
2kind: ClusterRole
3apiVersion: rbac.authorization.k8s.io/v1
4metadata:
5 labels:
6 {{- include "loki.labels" . | nindent 4 }}
7{{- with .Values.annotations }}
8 annotations:
9{{ toYaml . | indent 4 }}
10{{- end }}
11 name: {{ template "loki.fullname" . }}-clusterrole
12{{- if .Values.sidecar.rules.enabled }}
13rules:
14- apiGroups: [""] # "" indicates the core API group
15 resources: ["configmaps", "secrets"]
16 verbs: ["get", "watch", "list"]
17{{- else }}
18rules: []
19{{- end }}
20{{- end }}