Skip to content

Commit

Permalink
DROP: add aggregator role for admin and editor
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin <kpostlet@redhat.com>
  • Loading branch information
KPostOffice authored and astefanutti committed Jan 26, 2024
1 parent f2575cd commit 27decbd
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 0 deletions.
34 changes: 34 additions & 0 deletions ray-operator/config/rbac/editor_role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: kuberay-edit-role
labels:
rbac.authorization.k8s.io/aggregate-to-edit: "true"
rbac.authorization.k8s.io/aggregate-to-admin: "true"
rules:
- apiGroups:
- ray.io
resources:
- rayjobs
- rayclusters
- rayservices
verbs:
- create
- delete
- deletecollection
- get
- list
- patch
- update
- watch
- apiGroups:
- ray.io
resources:
- rayservices/finalizers
- rayclusters/finalizers
- rayjobs/finalizers
- rayservices/status
- rayclusters/status
- rayjobs/status
verbs:
- get
2 changes: 2 additions & 0 deletions ray-operator/config/rbac/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
resources:
- editor_role.yaml
- role.yaml
- role_binding.yaml
- leader_election_role.yaml
- leader_election_role_binding.yaml
- service_account.yaml
- viewer_role.yaml

commonLabels:
app.kubernetes.io/name: kuberay
Expand Down
28 changes: 28 additions & 0 deletions ray-operator/config/rbac/viewer_role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: kuberay-view-role
labels:
rbac.authorization.k8s.io/aggregate-to-view: "true"
rules:
- apiGroups:
- ray.io
resources:
- rayjobs
- rayclusters
- rayservices
verbs:
- get
- list
- watch
- apiGroups:
- ray.io
resources:
- rayservices/finalizers
- rayclusters/finalizers
- rayjobs/finalizers
- rayservices/status
- rayclusters/status
- rayjobs/status
verbs:
- get

0 comments on commit 27decbd

Please sign in to comment.