mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 00:07:50 +00:00
Allow node-controller to update node status
This commit is contained in:
parent
e827393fa2
commit
bda95a59ad
@ -166,7 +166,11 @@ func init() {
|
|||||||
addControllerRole(rbac.ClusterRole{
|
addControllerRole(rbac.ClusterRole{
|
||||||
ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "node-controller"},
|
ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "node-controller"},
|
||||||
Rules: []rbac.PolicyRule{
|
Rules: []rbac.PolicyRule{
|
||||||
rbac.NewRule("get", "list", "update").Groups(legacyGroup).Resources("nodes").RuleOrDie(),
|
rbac.NewRule("get", "list", "update", "delete").Groups(legacyGroup).Resources("nodes").RuleOrDie(),
|
||||||
|
rbac.NewRule("update").Groups(legacyGroup).Resources("nodes/status").RuleOrDie(),
|
||||||
|
// used for pod eviction
|
||||||
|
rbac.NewRule("update").Groups(legacyGroup).Resources("pods/status").RuleOrDie(),
|
||||||
|
rbac.NewRule("list", "delete").Groups(legacyGroup).Resources("pods").RuleOrDie(),
|
||||||
eventsRule(),
|
eventsRule(),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
@ -533,9 +533,32 @@ items:
|
|||||||
resources:
|
resources:
|
||||||
- nodes
|
- nodes
|
||||||
verbs:
|
verbs:
|
||||||
|
- delete
|
||||||
- get
|
- get
|
||||||
- list
|
- list
|
||||||
- update
|
- update
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
attributeRestrictions: null
|
||||||
|
resources:
|
||||||
|
- nodes/status
|
||||||
|
verbs:
|
||||||
|
- update
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
attributeRestrictions: null
|
||||||
|
resources:
|
||||||
|
- pods/status
|
||||||
|
verbs:
|
||||||
|
- update
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
attributeRestrictions: null
|
||||||
|
resources:
|
||||||
|
- pods
|
||||||
|
verbs:
|
||||||
|
- delete
|
||||||
|
- list
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- ""
|
- ""
|
||||||
attributeRestrictions: null
|
attributeRestrictions: null
|
||||||
|
Loading…
Reference in New Issue
Block a user