Skip to content

Commit 10fb206

Browse files
authored
Merge pull request kubernetes#129201 from tnqn/fix-ns-controller-permission
Add watch permission to namespace-controller for WatchListClient feature
2 parents 90a4556 + 3571992 commit 10fb206

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

plugin/pkg/auth/authorizer/rbac/bootstrappolicy/controller_policy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ func buildControllerRoles() ([]rbacv1.ClusterRole, []rbacv1.ClusterRoleBinding)
254254
Rules: []rbacv1.PolicyRule{
255255
rbacv1helpers.NewRule("get", "list", "watch", "delete").Groups(legacyGroup).Resources("namespaces").RuleOrDie(),
256256
rbacv1helpers.NewRule("update").Groups(legacyGroup).Resources("namespaces/finalize", "namespaces/status").RuleOrDie(),
257-
rbacv1helpers.NewRule("get", "list", "delete", "deletecollection").Groups("*").Resources("*").RuleOrDie(),
257+
rbacv1helpers.NewRule("get", "list", "watch", "delete", "deletecollection").Groups("*").Resources("*").RuleOrDie(),
258258
},
259259
})
260260
addControllerRole(&controllerRoles, &controllerRoleBindings, func() rbacv1.ClusterRole {

plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/controller-roles.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -875,6 +875,7 @@ items:
875875
- deletecollection
876876
- get
877877
- list
878+
- watch
878879
- apiVersion: rbac.authorization.k8s.io/v1
879880
kind: ClusterRole
880881
metadata:

0 commit comments

Comments
 (0)