Skip to content

Commit 55e6e34

Browse files
authored
Narrow down RBAC rules (#2091)
* Update training operator image in CI * Remove deprecated GRPC var * Remove deprecated GRPC var * Remove deprecated GRPC var * Support for k8s v1.25 in CI * Revert "Support for k8s v1.25 in CI" This reverts commit 16e6fe4. * Narrow down rbac * Narrow down rbac * Narrow down rbac * Narrow down rbac * Narrow down rbac * Narrow down rbac * Narrow down rbac * Update tekton and argo docs * Update tekton and argo docs
1 parent 318f668 commit 55e6e34

File tree

3 files changed

+75
-18
lines changed

3 files changed

+75
-18
lines changed

examples/v1beta1/argo/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,18 @@ with the appropriate permission:
6565
resources:
6666
- workflows
6767
verbs:
68-
- "*"
68+
- "get"
69+
- "list"
70+
- "watch"
71+
- "create"
72+
- "delete"
6973
```
7074
7175
Run the following command to update Katib ClusterRole:
7276
7377
```bash
7478
kubectl patch ClusterRole katib-controller -n kubeflow --type=json \
75-
-p='[{"op": "add", "path": "/rules/-", "value": {"apiGroups":["argoproj.io"],"resources":["workflows"],"verbs":["*"]}}]'
79+
-p='[{"op": "add", "path": "/rules/-", "value": {"apiGroups":["argoproj.io"],"resources":["workflows"],"verbs":["get", "list", "watch", "create", "delete"]}}]'
7680
```
7781
7882
In addition to that, you have to modify Katib

examples/v1beta1/tekton/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,18 @@ with the appropriate permission:
7070
- pipelineruns
7171
- taskruns
7272
verbs:
73-
- "*"
73+
- "get"
74+
- "list"
75+
- "watch"
76+
- "create"
77+
- "delete"
7478
```
7579
7680
Run the following command to update Katib ClusterRole:
7781
7882
```bash
7983
kubectl patch ClusterRole katib-controller -n kubeflow --type=json \
80-
-p='[{"op": "add", "path": "/rules/-", "value": {"apiGroups":["tekton.dev"],"resources":["pipelineruns", "taskruns"],"verbs":["*"]}}]'
84+
-p='[{"op": "add", "path": "/rules/-", "value": {"apiGroups":["tekton.dev"],"resources":["pipelineruns", "taskruns"],"verbs":["get", "list", "watch", "create", "delete"]}}]'
8185
```
8286
8387
In addition to that, you have to modify Katib

manifests/v1beta1/components/controller/rbac.yaml

Lines changed: 63 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,39 +7,93 @@ rules:
77
- apiGroups:
88
- ""
99
resources:
10-
- configmaps
11-
- serviceaccounts
1210
- services
11+
verbs:
12+
- "get"
13+
- "list"
14+
- "watch"
15+
- "create"
16+
- "delete"
17+
- apiGroups:
18+
- ""
19+
resources:
1320
- events
14-
- namespaces
21+
verbs:
22+
- "create"
23+
- "patch"
24+
- "update"
25+
- apiGroups:
26+
- ""
27+
resources:
28+
- serviceaccounts
1529
- persistentvolumes
1630
- persistentvolumeclaims
31+
verbs:
32+
- "get"
33+
- "list"
34+
- "watch"
35+
- "create"
36+
- apiGroups:
37+
- ""
38+
resources:
39+
- namespaces
40+
- configmaps
41+
verbs:
42+
- "get"
43+
- "list"
44+
- "watch"
45+
- apiGroups:
46+
- ""
47+
resources:
1748
- pods
18-
- pods/log
1949
- pods/status
20-
- secrets
2150
verbs:
22-
- "*"
51+
- "get"
2352
- apiGroups:
2453
- apps
2554
resources:
2655
- deployments
2756
verbs:
28-
- "*"
57+
- "get"
58+
- "list"
59+
- "watch"
60+
- "create"
61+
- "delete"
2962
- apiGroups:
3063
- rbac.authorization.k8s.io
3164
resources:
3265
- roles
3366
- rolebindings
3467
verbs:
35-
- "*"
68+
- "get"
69+
- "create"
70+
- "list"
71+
- "watch"
3672
- apiGroups:
3773
- batch
3874
resources:
3975
- jobs
4076
- cronjobs
4177
verbs:
42-
- "*"
78+
- "get"
79+
- "list"
80+
- "watch"
81+
- "create"
82+
- "delete"
83+
- apiGroups:
84+
- kubeflow.org
85+
resources:
86+
- tfjobs
87+
- pytorchjobs
88+
- mpijobs
89+
- xgboostjobs
90+
- mxjobs
91+
verbs:
92+
- "get"
93+
- "list"
94+
- "watch"
95+
- "create"
96+
- "delete"
4397
- apiGroups:
4498
- kubeflow.org
4599
resources:
@@ -52,11 +106,6 @@ rules:
52106
- suggestions
53107
- suggestions/status
54108
- suggestions/finalizers
55-
- tfjobs
56-
- pytorchjobs
57-
- mpijobs
58-
- xgboostjobs
59-
- mxjobs
60109
verbs:
61110
- "*"
62111
---

0 commit comments

Comments
 (0)