Skip to content

Commit df88b1a

Browse files
committed
Add all RBAC rules for the SELinux controller
The SELinuxWarningController does not necessarily need permissions to read the objects, because it gets them through a shared informer instantiated by KCM itself, but let's list the permissions for completeness.
1 parent 52b47ea commit df88b1a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,10 @@ func buildControllerRoles() ([]rbacv1.ClusterRole, []rbacv1.ClusterRoleBinding)
506506
ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "selinux-warning-controller"},
507507
Rules: []rbacv1.PolicyRule{
508508
eventsRule(),
509+
rbacv1helpers.NewRule("get", "list", "watch").Groups(legacyGroup).Resources("persistentvolumes").RuleOrDie(),
510+
rbacv1helpers.NewRule("get", "list", "watch").Groups(legacyGroup).Resources("persistentvolumeclaims").RuleOrDie(),
511+
rbacv1helpers.NewRule("get", "list", "watch").Groups(legacyGroup).Resources("pods").RuleOrDie(),
512+
rbacv1helpers.NewRule("get", "list", "watch").Groups(storageGroup).Resources("csidrivers").RuleOrDie(),
509513
},
510514
})
511515
}

0 commit comments

Comments
 (0)