From 5ecdc8e604bd422a5cfbeabab6154789a1aa3a40 Mon Sep 17 00:00:00 2001 From: Traian Schiau Date: Tue, 6 Jun 2023 17:46:16 +0300 Subject: [PATCH] [config/rbac] Add RayJob roles. --- .../components/rbac/rayjob_editor_role.yaml | 27 +++++++++++++++++++ .../components/rbac/rayjob_viewer_role.yaml | 23 ++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 config/components/rbac/rayjob_editor_role.yaml create mode 100644 config/components/rbac/rayjob_viewer_role.yaml diff --git a/config/components/rbac/rayjob_editor_role.yaml b/config/components/rbac/rayjob_editor_role.yaml new file mode 100644 index 0000000000..79e9fec296 --- /dev/null +++ b/config/components/rbac/rayjob_editor_role.yaml @@ -0,0 +1,27 @@ +# permissions for end users to edit jobs. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kueue-rayjob-editor-role + labels: + rbac.kueue.x-k8s.io/batch-admin: "true" + rbac.kueue.x-k8s.io/batch-user: "true" +rules: +- apiGroups: + - ray.io + resources: + - rayjobs + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - ray.io + resources: + - rayjobs/status + verbs: + - get diff --git a/config/components/rbac/rayjob_viewer_role.yaml b/config/components/rbac/rayjob_viewer_role.yaml new file mode 100644 index 0000000000..de22d35198 --- /dev/null +++ b/config/components/rbac/rayjob_viewer_role.yaml @@ -0,0 +1,23 @@ +# permissions for end users to view jobs. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: kueue-rayjob-viewer-role + labels: + rbac.kueue.x-k8s.io/batch-admin: "true" + rbac.kueue.x-k8s.io/batch-user: "true" +rules: +- apiGroups: + - ray.io + resources: + - rayjobs + verbs: + - get + - list + - watch +- apiGroups: + - ray.io + resources: + - rayjobs/status + verbs: + - get