Giovanni Tirloni | 52306ad | 2024-04-12 15:35:05 -0300 | [diff] [blame] | 1 | {{- if and (not .Values.rbac.namespaced) (not .Values.rbac.useExistingRole) }} |
| 2 | kind: ClusterRole |
| 3 | apiVersion: rbac.authorization.k8s.io/v1 |
| 4 | metadata: |
| 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 }} |
| 13 | rules: |
| 14 | - apiGroups: [""] # "" indicates the core API group |
| 15 | resources: ["configmaps", "secrets"] |
| 16 | verbs: ["get", "watch", "list"] |
| 17 | {{- else }} |
| 18 | rules: [] |
| 19 | {{- end }} |
| 20 | {{- end }} |