diff --git a/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/controller_policy.go b/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/controller_policy.go index 96828a7f3fd..3e594de805e 100644 --- a/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/controller_policy.go +++ b/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/controller_policy.go @@ -192,7 +192,7 @@ func init() { }, }) addControllerRole(rbac.ClusterRole{ - ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "pod-garbage-controller"}, + ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "pod-garbage-collector"}, Rules: []rbac.PolicyRule{ rbac.NewRule("list", "watch", "delete").Groups(legacyGroup).Resources("pods").RuleOrDie(), rbac.NewRule("list").Groups(legacyGroup).Resources("nodes").RuleOrDie(), diff --git a/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/controller-role-bindings.yaml b/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/controller-role-bindings.yaml index 4f477d0ff34..159e6c6065c 100644 --- a/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/controller-role-bindings.yaml +++ b/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/controller-role-bindings.yaml @@ -186,14 +186,14 @@ items: creationTimestamp: null labels: kubernetes.io/bootstrapping: rbac-defaults - name: system:controller:pod-garbage-controller + name: system:controller:pod-garbage-collector roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: system:controller:pod-garbage-controller + name: system:controller:pod-garbage-collector subjects: - kind: ServiceAccount - name: pod-garbage-controller + name: pod-garbage-collector namespace: kube-system - apiVersion: rbac.authorization.k8s.io/v1alpha1 kind: ClusterRoleBinding diff --git a/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/controller-roles.yaml b/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/controller-roles.yaml index 362b8f87d94..69630f83c9d 100644 --- a/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/controller-roles.yaml +++ b/plugin/pkg/auth/authorizer/rbac/bootstrappolicy/testdata/controller-roles.yaml @@ -664,7 +664,7 @@ items: creationTimestamp: null labels: kubernetes.io/bootstrapping: rbac-defaults - name: system:controller:pod-garbage-controller + name: system:controller:pod-garbage-collector rules: - apiGroups: - ""