Mohammed Naser | 65cda13 | 2024-05-02 14:34:08 -0400 | [diff] [blame] | 1 | {{- $isSimpleScalable := eq (include "loki.deployment.isScalable" .) "true" -}} |
| 2 | {{- if and $isSimpleScalable (not .Values.rbac.namespaced) (not .Values.rbac.useExistingRole) }} |
Giovanni Tirloni | 59219b6 | 2024-04-09 14:50:25 -0300 | [diff] [blame] | 3 | kind: ClusterRole |
| 4 | apiVersion: rbac.authorization.k8s.io/v1 |
| 5 | metadata: |
| 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 }} |
| 14 | rules: |
| 15 | - apiGroups: [""] # "" indicates the core API group |
| 16 | resources: ["configmaps", "secrets"] |
| 17 | verbs: ["get", "watch", "list"] |
| 18 | {{- else }} |
| 19 | rules: [] |
| 20 | {{- end }} |
Mohammed Naser | 65cda13 | 2024-05-02 14:34:08 -0400 | [diff] [blame] | 21 | {{- end }} |