| Giorgi Lekveishvili | d87487d | 2025-07-07 14:03:30 +0400 | [diff] [blame^] | 1 | apiVersion: rbac.authorization.k8s.io/v1 |
| 2 | kind: ClusterRoleBinding |
| 3 | metadata: |
| 4 | name: longhorn-bind |
| 5 | labels: {{- include "longhorn.labels" . | nindent 4 }} |
| 6 | roleRef: |
| 7 | apiGroup: rbac.authorization.k8s.io |
| 8 | kind: ClusterRole |
| 9 | name: longhorn-role |
| 10 | subjects: |
| 11 | - kind: ServiceAccount |
| 12 | name: longhorn-service-account |
| 13 | namespace: {{ include "release_namespace" . }} |
| 14 | --- |
| 15 | apiVersion: rbac.authorization.k8s.io/v1 |
| 16 | kind: ClusterRoleBinding |
| 17 | metadata: |
| 18 | name: longhorn-support-bundle |
| 19 | labels: {{- include "longhorn.labels" . | nindent 4 }} |
| 20 | roleRef: |
| 21 | apiGroup: rbac.authorization.k8s.io |
| 22 | kind: ClusterRole |
| 23 | name: cluster-admin |
| 24 | subjects: |
| 25 | - kind: ServiceAccount |
| 26 | name: longhorn-support-bundle |
| 27 | namespace: {{ include "release_namespace" . }} |
| 28 | {{- if .Values.openshift.enabled }} |
| 29 | --- |
| 30 | apiVersion: rbac.authorization.k8s.io/v1 |
| 31 | kind: ClusterRoleBinding |
| 32 | metadata: |
| 33 | name: longhorn-ocp-privileged-bind |
| 34 | labels: {{- include "longhorn.labels" . | nindent 4 }} |
| 35 | roleRef: |
| 36 | apiGroup: rbac.authorization.k8s.io |
| 37 | kind: ClusterRole |
| 38 | name: longhorn-ocp-privileged-role |
| 39 | subjects: |
| 40 | - kind: ServiceAccount |
| 41 | name: longhorn-service-account |
| 42 | namespace: {{ include "release_namespace" . }} |
| 43 | - kind: ServiceAccount |
| 44 | name: longhorn-ui-service-account |
| 45 | namespace: {{ include "release_namespace" . }} |
| 46 | - kind: ServiceAccount |
| 47 | name: default # supportbundle-agent-support-bundle uses default sa |
| 48 | namespace: {{ include "release_namespace" . }} |
| 49 | {{- end }} |