blob: dc625bf2e3ca6d5b401f27cf7dbe72e88f78c688 [file] [log] [blame]
Giorgi Lekveishvili725bb392023-05-05 18:24:27 +04001apiVersion: rbac.authorization.k8s.io/v1
2kind: ClusterRoleBinding
3metadata:
4 name: longhorn-bind
5 labels: {{- include "longhorn.labels" . | nindent 4 }}
6roleRef:
7 apiGroup: rbac.authorization.k8s.io
8 kind: ClusterRole
9 name: longhorn-role
10subjects:
11- kind: ServiceAccount
12 name: longhorn-service-account
13 namespace: {{ include "release_namespace" . }}
14---
15apiVersion: rbac.authorization.k8s.io/v1
16kind: ClusterRoleBinding
17metadata:
18 name: longhorn-support-bundle
19 labels: {{- include "longhorn.labels" . | nindent 4 }}
20roleRef:
21 apiGroup: rbac.authorization.k8s.io
22 kind: ClusterRole
23 name: cluster-admin
24subjects:
25- kind: ServiceAccount
26 name: longhorn-support-bundle
27 namespace: {{ include "release_namespace" . }}
gio16bb6382025-05-21 18:42:40 +040028{{- if .Values.openshift.enabled }}
29---
30apiVersion: rbac.authorization.k8s.io/v1
31kind: ClusterRoleBinding
32metadata:
33 name: longhorn-ocp-privileged-bind
34 labels: {{- include "longhorn.labels" . | nindent 4 }}
35roleRef:
36 apiGroup: rbac.authorization.k8s.io
37 kind: ClusterRole
38 name: longhorn-ocp-privileged-role
39subjects:
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
giodbf4a852025-06-30 17:09:46 +040047 name: default # supportbundle-agent-support-bundle uses default sa
gio16bb6382025-05-21 18:42:40 +040048 namespace: {{ include "release_namespace" . }}
49{{- end }}