-
Notifications
You must be signed in to change notification settings - Fork 82
/
03_pelorus_operators_roles.diff
134 lines (133 loc) · 2.8 KB
/
03_pelorus_operators_roles.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
--- config/rbac/kustomization.yaml.original 2023-04-06 10:51:58.252397321 +0200
+++ config/rbac/kustomization.yaml 2023-04-06 11:07:11.076162392 +0200
@@ -7,6 +7,8 @@ resources:
- service_account.yaml
- role.yaml
- role_binding.yaml
+- pelorus_manager_role.yaml
+- pelorus_role_binding.yaml
- leader_election_role.yaml
- leader_election_role_binding.yaml
# Comment the following 4 lines if you want to disable
--- /dev/null 2023-03-27 08:53:50.880018007 +0200
+++ config/rbac/pelorus_manager_role.yaml 2023-04-06 11:07:11.077162391 +0200
@@ -0,0 +1,104 @@
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRole
+metadata:
+ name: pelorus-manager-role
+rules:
+# Needed to create or delete Prometheus and Grafana subscriptions
+- apiGroups:
+ - "operators.coreos.com"
+ resources:
+ - "operatorgroups"
+ - "subscriptions"
+ verbs:
+ - get
+ - create
+ - delete
+ - list
+ - watch
+- apiGroups:
+ - "batch"
+ resources:
+ - "jobs"
+ verbs:
+ - list
+ - create
+ - get
+ - watch
+ - delete
+- apiGroups:
+ - ""
+ resources:
+ - "serviceaccounts"
+ verbs:
+ - create
+ - get
+ - list
+ - watch
+# Pelorus require new role to allow installplan approval job
+- apiGroups:
+ - "rbac.authorization.k8s.io"
+ resources:
+ - "roles"
+ - "rolebindings"
+ verbs:
+ - create
+ - get
+ - list
+ - watch
+ - delete
+# Required to grand permissions to the installplan-approver user
+- apiGroups:
+ - "operators.coreos.com"
+ resources:
+ - "installplans"
+ - "subscriptions"
+ verbs:
+ - get
+ - list
+ - patch
+# Required to grand permissions to the csv-deleter / attempting to grant RBAC permissions not currently held
+- apiGroups:
+ - "operators.coreos.com"
+ resources:
+ - "clusterserviceversions"
+ verbs:
+ - delete
+ - list
+# Required by the Grafana and Prometheus operators
+- apiGroups:
+ - "integreatly.org"
+ resources:
+ - "grafanas"
+ - "grafanadashboards"
+ - "grafanadatasources"
+ - "grafananotificationchannels"
+ verbs:
+ - list
+ - get
+ - watch
+ - create
+ - delete
+# Required to build and deploy exporters from the source code
+- apiGroups:
+ - "build.openshift.io"
+ resources:
+ - "buildconfigs"
+ verbs:
+ - get
+ - create
+ - delete
+ - list
+ - watch
+ - patch
+# Required to deploy Thanos
+- apiGroups:
+ - "apps"
+ resources:
+ - "deployments"
+ verbs:
+ - get
+ - create
+ - delete
+ - list
+ - watch
+
--- /dev/null 2023-03-27 08:53:50.880018007 +0200
+++ config/rbac/pelorus_role_binding.yaml 2023-04-06 11:07:11.077162391 +0200
@@ -0,0 +1,12 @@
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRoleBinding
+metadata:
+ name: pelorus-manager-rolebinding
+roleRef:
+ apiGroup: rbac.authorization.k8s.io
+ kind: ClusterRole
+ name: pelorus-manager-role
+subjects:
+- kind: ServiceAccount
+ name: controller-manager
+ namespace: system