Skip to content

Commit 9bd31cf

Browse files
authored
[RayCluster] grant pods and pods/resize patch permissions for IPPR (#3960)
* [RayCluster] grant pods and pods/resize patch permissions for IPPR integration Signed-off-by: Rueian <[email protected]> * [RayCluster] grant pods and pods/resize patch permissions for IPPR integration Signed-off-by: Rueian <[email protected]> --------- Signed-off-by: Rueian <[email protected]> Signed-off-by: Rueian <[email protected]>
1 parent 4845306 commit 9bd31cf

File tree

4 files changed

+19
-1
lines changed

4 files changed

+19
-1
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,12 @@ rules:
163163
- get
164164
- patch
165165
- update
166+
- apiGroups:
167+
- ""
168+
resources:
169+
- pods/resize
170+
verbs:
171+
- patch
166172
- apiGroups:
167173
- ""
168174
resources:

ray-operator/config/rbac/role.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ rules:
4848
- get
4949
- patch
5050
- update
51+
- apiGroups:
52+
- ""
53+
resources:
54+
- pods/resize
55+
verbs:
56+
- patch
5157
- apiGroups:
5258
- ""
5359
resources:

ray-operator/controllers/ray/common/rbac.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,12 @@ func BuildRole(cluster *rayv1.RayCluster) (*rbacv1.Role, error) {
4242
{
4343
APIGroups: []string{""},
4444
Resources: []string{"pods"},
45-
Verbs: []string{"get", "list", "watch"},
45+
Verbs: []string{"get", "list", "watch", "patch"},
46+
},
47+
{
48+
APIGroups: []string{""},
49+
Resources: []string{"pods/resize"},
50+
Verbs: []string{"patch"},
4651
},
4752
{
4853
APIGroups: []string{"ray.io"},

ray-operator/controllers/ray/raycluster_controller.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ type RayClusterReconcilerOptions struct {
9595
// +kubebuilder:rbac:groups=core,resources=events,verbs=get;list;watch;create;update;patch;delete
9696
// +kubebuilder:rbac:groups=core,resources=pods,verbs=get;list;watch;create;update;patch;delete;deletecollection
9797
// +kubebuilder:rbac:groups=core,resources=pods/status,verbs=get;list;watch;create;update;patch;delete
98+
// +kubebuilder:rbac:groups=core,resources=pods/resize,verbs=patch
9899
// +kubebuilder:rbac:groups=core,resources=services,verbs=get;list;watch;create;update;patch;delete
99100
// +kubebuilder:rbac:groups=core,resources=services/status,verbs=get;update;patch
100101
// +kubebuilder:rbac:groups=coordination.k8s.io,resources=leases,verbs=get;list;create;update

0 commit comments

Comments
 (0)