Skip to content

Commit 55f2def

Browse files
committed
team setup for kubernetes
1 parent 6c8d786 commit 55f2def

File tree

4 files changed

+54
-13
lines changed

4 files changed

+54
-13
lines changed

setup.RHOAI-v2.10/TEAM-SETUP.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# Team Setup
22

3+
A *team* in MLBatch is a group of users that share a resource quota.
34

4-
The team setup creates a project, a user group, a quota, a queue, and the
5-
required role bindings.
5+
6+
Setting up a new team requires the cluster admin to create a project,
7+
a user group, a quota, a queue, and the required role bindings as described below.
68

79
Create project:
810
```sh

setup.RHOAI-v2.11/TEAM-SETUP.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# Team Setup
22

3+
A *team* in MLBatch is a group of users that share a resource quota.
34

4-
The team setup creates a project, a user group, a quota, a queue, and the
5-
required role bindings.
5+
6+
Setting up a new team requires the cluster admin to create a project,
7+
a user group, a quota, a queue, and the required role bindings as described below.
68

79
Create project:
810
```sh

setup.k8s-v1.25/TEAM-SETUP.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,33 @@
11
# Team Setup
22

3-
The team setup creates a namespace, a user group, a quota, a queue, and the
4-
required role bindings.
3+
A *team* in MLBatch is a group of users that share a resource quota.
4+
5+
Setting up a new team requires the cluster admin to create a namespace,
6+
a quota, a queue, and the required role bindings as described below.
57

68
Create namespace:
79
```sh
810
kubectl create namespace team1
911
```
1012

11-
*** UNDER CONSTRUCTION***
13+
For each user on the team, create a RoleBinding:
14+
```sh
15+
kubectl apply -f- << EOF
16+
kind: RoleBinding
17+
apiVersion: rbac.authorization.k8s.io/v1
18+
metadata:
19+
name: basic-users
20+
namespace: team1
21+
subjects:
22+
- kind: User
23+
apiGroup: rbac.authorization.k8s.io
24+
name: the-users-name
25+
roleRef:
26+
apiGroup: rbac.authorization.k8s.io
27+
kind: ClusterRole
28+
name: mlbatch-edit
29+
EOF
30+
```
1231

1332
Specify the intended quota for the namespace by creating a `ClusterQueue`:
1433
```sh

setup.tmpl/TEAM-SETUP.md.tmpl

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# Team Setup
22

3+
A *team* in MLBatch is a group of users that share a resource quota.
4+
35
{{ if .OPENSHIFT }}
4-
The team setup creates a project, a user group, a quota, a queue, and the
5-
required role bindings.
6+
Setting up a new team requires the cluster admin to create a project,
7+
a user group, a quota, a queue, and the required role bindings as described below.
68

79
Create project:
810
```sh
@@ -21,16 +23,32 @@ Bind cluster role to group in namespace:
2123
{{ .KUBECTL }} adm policy add-role-to-group mlbatch-edit team1-edit-group --role-namespace="" --namespace team1
2224
```
2325
{{- else -}}
24-
The team setup creates a namespace, a user group, a quota, a queue, and the
25-
required role bindings.
26+
Setting up a new team requires the cluster admin to create a namespace,
27+
a quota, a queue, and the required role bindings as described below.
2628

2729
Create namespace:
2830
```sh
2931
{{ .KUBECTL }} create namespace team1
3032
```
3133

32-
*** UNDER CONSTRUCTION***
33-
34+
For each user on the team, create a RoleBinding:
35+
```sh
36+
{{ .KUBECTL }} apply -f- << EOF
37+
kind: RoleBinding
38+
apiVersion: rbac.authorization.k8s.io/v1
39+
metadata:
40+
name: basic-users
41+
namespace: team1
42+
subjects:
43+
- kind: User
44+
apiGroup: rbac.authorization.k8s.io
45+
name: the-users-name
46+
roleRef:
47+
apiGroup: rbac.authorization.k8s.io
48+
kind: ClusterRole
49+
name: mlbatch-edit
50+
EOF
51+
```
3452
{{- end }}
3553

3654
Specify the intended quota for the namespace by creating a `ClusterQueue`:

0 commit comments

Comments
 (0)