Allow pod-garbage-collector to get nodes

This commit is contained in:
Jacek Kaniuk 2019-10-23 16:54:38 +02:00
parent 638c02f6cd
commit e6e026f1ad
2 changed files with 2 additions and 1 deletions

View File

@ -255,7 +255,7 @@ func buildControllerRoles() ([]rbacv1.ClusterRole, []rbacv1.ClusterRoleBinding)
ObjectMeta: metav1.ObjectMeta{Name: saRolePrefix + "pod-garbage-collector"},
Rules: []rbacv1.PolicyRule{
rbacv1helpers.NewRule("list", "watch", "delete").Groups(legacyGroup).Resources("pods").RuleOrDie(),
rbacv1helpers.NewRule("list").Groups(legacyGroup).Resources("nodes").RuleOrDie(),
rbacv1helpers.NewRule("get", "list").Groups(legacyGroup).Resources("nodes").RuleOrDie(),
},
})
addControllerRole(&controllerRoles, &controllerRoleBindings, rbacv1.ClusterRole{

View File

@ -872,6 +872,7 @@ items:
resources:
- nodes
verbs:
- get
- list
- apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole