Skip to content

Commit 085dbb5

Browse files
Change the rules in role.yaml and multiple_namespaces_role.yaml to use the same template in _helpers.tpl to ensure consistency. (#2244)
* Change the rules in role.yaml and multiple_namespaces_role.yaml to use the same template in _helpers.tpl to ensure consistency. Signed-off-by: leoyeepaa <[email protected]> * Update _helpers.tpl Add newline at the end of file Signed-off-by: Leo Liao <[email protected]> * Update helm-chart/kuberay-operator/templates/_helpers.tpl Co-authored-by: Kai-Hsun Chen <[email protected]> Signed-off-by: Leo Liao <[email protected]> * Update helm-chart/kuberay-operator/templates/_helpers.tpl Co-authored-by: Kai-Hsun Chen <[email protected]> Signed-off-by: Leo Liao <[email protected]> * Update helm-chart/kuberay-operator/templates/role.yaml Co-authored-by: Kai-Hsun Chen <[email protected]> Signed-off-by: Leo Liao <[email protected]> * Update helm-chart/kuberay-operator/templates/multiple_namespaces_role.yaml Co-authored-by: Kai-Hsun Chen <[email protected]> Signed-off-by: Leo Liao <[email protected]> * Update _helpers.tpl for add customresourcedefinitions Signed-off-by: Leo Liao <[email protected]> --------- Signed-off-by: leoyeepaa <[email protected]> Signed-off-by: Leo Liao <[email protected]> Co-authored-by: Kai-Hsun Chen <[email protected]>
1 parent 78b9828 commit 085dbb5

File tree

3 files changed

+283
-538
lines changed

3 files changed

+283
-538
lines changed

helm-chart/kuberay-operator/templates/_helpers.tpl

Lines changed: 281 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,284 @@ Create the name of the service account to use
5454
{{ default "default" .Values.serviceAccount.name }}
5555
{{- end -}}
5656
{{- end -}}
57+
58+
{{/*
59+
Create a template to ensure consistency for Role and ClusterRole.
60+
*/}}
61+
{{- define "role.consistentRules" -}}
62+
rules:
63+
- apiGroups:
64+
- batch
65+
resources:
66+
- jobs
67+
verbs:
68+
- create
69+
- delete
70+
- get
71+
- list
72+
- patch
73+
- update
74+
- watch
75+
- apiGroups:
76+
- coordination.k8s.io
77+
resources:
78+
- leases
79+
verbs:
80+
- create
81+
- get
82+
- list
83+
- update
84+
- apiGroups:
85+
- ""
86+
resources:
87+
- endpoints
88+
verbs:
89+
- get
90+
- list
91+
- watch
92+
- apiGroups:
93+
- ""
94+
resources:
95+
- events
96+
verbs:
97+
- create
98+
- delete
99+
- get
100+
- list
101+
- patch
102+
- update
103+
- watch
104+
- apiGroups:
105+
- ""
106+
resources:
107+
- pods
108+
verbs:
109+
- create
110+
- delete
111+
- deletecollection
112+
- get
113+
- list
114+
- patch
115+
- update
116+
- watch
117+
- apiGroups:
118+
- ""
119+
resources:
120+
- pods/proxy
121+
verbs:
122+
- get
123+
- patch
124+
- update
125+
- apiGroups:
126+
- ""
127+
resources:
128+
- pods/status
129+
verbs:
130+
- create
131+
- delete
132+
- get
133+
- list
134+
- patch
135+
- update
136+
- watch
137+
- apiGroups:
138+
- ""
139+
resources:
140+
- serviceaccounts
141+
verbs:
142+
- create
143+
- delete
144+
- get
145+
- list
146+
- watch
147+
- apiGroups:
148+
- ""
149+
resources:
150+
- services
151+
verbs:
152+
- create
153+
- delete
154+
- get
155+
- list
156+
- patch
157+
- update
158+
- watch
159+
- apiGroups:
160+
- ""
161+
resources:
162+
- services/proxy
163+
verbs:
164+
- get
165+
- patch
166+
- update
167+
- apiGroups:
168+
- ""
169+
resources:
170+
- services/status
171+
verbs:
172+
- get
173+
- patch
174+
- update
175+
- apiGroups:
176+
- extensions
177+
resources:
178+
- ingresses
179+
verbs:
180+
- create
181+
- delete
182+
- get
183+
- list
184+
- patch
185+
- update
186+
- watch
187+
- apiGroups:
188+
- networking.k8s.io
189+
resources:
190+
- ingressclasses
191+
verbs:
192+
- get
193+
- list
194+
- watch
195+
- apiGroups:
196+
- networking.k8s.io
197+
resources:
198+
- ingresses
199+
verbs:
200+
- create
201+
- delete
202+
- get
203+
- list
204+
- patch
205+
- update
206+
- watch
207+
- apiGroups:
208+
- ray.io
209+
resources:
210+
- rayclusters
211+
verbs:
212+
- create
213+
- delete
214+
- get
215+
- list
216+
- patch
217+
- update
218+
- watch
219+
- apiGroups:
220+
- ray.io
221+
resources:
222+
- rayclusters/finalizers
223+
verbs:
224+
- update
225+
- apiGroups:
226+
- ray.io
227+
resources:
228+
- rayclusters/status
229+
verbs:
230+
- get
231+
- patch
232+
- update
233+
- apiGroups:
234+
- ray.io
235+
resources:
236+
- rayjobs
237+
verbs:
238+
- create
239+
- delete
240+
- get
241+
- list
242+
- patch
243+
- update
244+
- watch
245+
- apiGroups:
246+
- ray.io
247+
resources:
248+
- rayjobs/finalizers
249+
verbs:
250+
- update
251+
- apiGroups:
252+
- ray.io
253+
resources:
254+
- rayjobs/status
255+
verbs:
256+
- get
257+
- patch
258+
- update
259+
- apiGroups:
260+
- ray.io
261+
resources:
262+
- rayservices
263+
verbs:
264+
- create
265+
- delete
266+
- get
267+
- list
268+
- patch
269+
- update
270+
- watch
271+
- apiGroups:
272+
- ray.io
273+
resources:
274+
- rayservices/finalizers
275+
verbs:
276+
- update
277+
- apiGroups:
278+
- ray.io
279+
resources:
280+
- rayservices/status
281+
verbs:
282+
- get
283+
- patch
284+
- update
285+
- apiGroups:
286+
- rbac.authorization.k8s.io
287+
resources:
288+
- rolebindings
289+
verbs:
290+
- create
291+
- delete
292+
- get
293+
- list
294+
- watch
295+
- apiGroups:
296+
- rbac.authorization.k8s.io
297+
resources:
298+
- roles
299+
verbs:
300+
- create
301+
- delete
302+
- get
303+
- list
304+
- update
305+
- watch
306+
- apiGroups:
307+
- route.openshift.io
308+
resources:
309+
- routes
310+
verbs:
311+
- create
312+
- delete
313+
- get
314+
- list
315+
- patch
316+
- update
317+
- watch
318+
{{- if .batchSchedulerEnabled }}
319+
- apiGroups:
320+
- scheduling.volcano.sh
321+
resources:
322+
- podgroups
323+
verbs:
324+
- create
325+
- delete
326+
- get
327+
- list
328+
- update
329+
- watch
330+
- apiGroups:
331+
- apiextensions.k8s.io
332+
resources:
333+
- customresourcedefinitions
334+
verbs:
335+
- get
336+
{{- end -}}
337+
{{- end -}}

0 commit comments

Comments
 (0)