blob: e8631c35a501b8ac250ed080bf5634f3a7c2bfd0 [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) (not .Values.rbac.useExistingRole) }}
Giovanni Tirloni59219b62024-04-09 14:50:25 -03003kind: ClusterRole
4apiVersion: rbac.authorization.k8s.io/v1
5metadata:
6 labels:
7 {{- include "loki.labels" . | nindent 4 }}
8{{- with .Values.annotations }}
9 annotations:
10{{ toYaml . | indent 4 }}
11{{- end }}
12 name: {{ template "loki.fullname" . }}-clusterrole
13{{- if .Values.sidecar.rules.enabled }}
14rules:
15- apiGroups: [""] # "" indicates the core API group
16 resources: ["configmaps", "secrets"]
17 verbs: ["get", "watch", "list"]
18{{- else }}
19rules: []
20{{- end }}
Mohammed Naser65cda132024-05-02 14:34:08 -040021{{- end }}