Skip to content

Commit 0f99cb2

Browse files
zhangzujianzbb88888
authored andcommitted
rbac: replace wildcard with a clear list of allowed verbs (kubeovn#6233)
Signed-off-by: zhangzujian <zhangzujian.7@gmail.com>
1 parent 9359ee8 commit 0f99cb2

File tree

3 files changed

+36
-6
lines changed

3 files changed

+36
-6
lines changed

charts/kube-ovn-v2/templates/rbac/ovn-CR.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,13 @@ rules:
5353
- qos-policies
5454
- qos-policies/status
5555
verbs:
56-
- "*"
56+
- create
57+
- get
58+
- list
59+
- update
60+
- patch
61+
- watch
62+
- delete
5763
- apiGroups:
5864
- ""
5965
resources:
@@ -170,7 +176,11 @@ rules:
170176
resources:
171177
- leases
172178
verbs:
173-
- "*"
179+
- create
180+
- update
181+
- patch
182+
- get
183+
- watch
174184
- apiGroups:
175185
- "kubevirt.io"
176186
resources:

charts/kube-ovn/templates/ovn-CR.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,13 @@ rules:
5353
- qos-policies
5454
- qos-policies/status
5555
verbs:
56-
- "*"
56+
- create
57+
- get
58+
- list
59+
- update
60+
- patch
61+
- watch
62+
- delete
5763
- apiGroups:
5864
- ""
5965
resources:
@@ -170,7 +176,11 @@ rules:
170176
resources:
171177
- leases
172178
verbs:
173-
- "*"
179+
- create
180+
- update
181+
- patch
182+
- get
183+
- watch
174184
- apiGroups:
175185
- "kubevirt.io"
176186
resources:

dist/images/install.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4077,7 +4077,13 @@ rules:
40774077
- qos-policies
40784078
- qos-policies/status
40794079
verbs:
4080-
- "*"
4080+
- create
4081+
- get
4082+
- list
4083+
- update
4084+
- patch
4085+
- watch
4086+
- delete
40814087
- apiGroups:
40824088
- ""
40834089
resources:
@@ -4194,7 +4200,11 @@ rules:
41944200
resources:
41954201
- leases
41964202
verbs:
4197-
- "*"
4203+
- create
4204+
- update
4205+
- patch
4206+
- get
4207+
- watch
41984208
- apiGroups:
41994209
- "kubevirt.io"
42004210
resources:

0 commit comments

Comments
 (0)