mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-02 03:08:15 +00:00
Merge pull request #41661 from liggitt/satoken
Automatic merge from submit-queue Make controller-manager resilient to stale serviceaccount tokens Now that the controller manager is spinning up controller loops using service accounts, we need to be more proactive in making sure the clients will actually work. Future additional work: * make a controller that reaps invalid service account tokens (c.f. https://github.com/kubernetes/kubernetes/issues/20165) * allow updating the client held by a controller with a new token while the controller is running (c.f. https://github.com/kubernetes/kubernetes/issues/4672)
This commit is contained in:
@@ -294,6 +294,8 @@ func ClusterRoles() []rbac.ClusterRole {
|
||||
rbac.NewRule("delete").Groups(legacyGroup).Resources("secrets").RuleOrDie(),
|
||||
rbac.NewRule("get").Groups(legacyGroup).Resources("endpoints", "namespaces", "serviceaccounts").RuleOrDie(),
|
||||
rbac.NewRule("update").Groups(legacyGroup).Resources("endpoints", "serviceaccounts").RuleOrDie(),
|
||||
// Needed to check API access. These creates are non-mutating
|
||||
rbac.NewRule("create").Groups(authenticationGroup).Resources("tokenreviews").RuleOrDie(),
|
||||
|
||||
rbac.NewRule("list", "watch").Groups(legacyGroup).Resources(
|
||||
"configmaps",
|
||||
|
||||
@@ -461,6 +461,12 @@ items:
|
||||
- serviceaccounts
|
||||
verbs:
|
||||
- update
|
||||
- apiGroups:
|
||||
- authentication.k8s.io
|
||||
resources:
|
||||
- tokenreviews
|
||||
verbs:
|
||||
- create
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
|
||||
Reference in New Issue
Block a user