Allow node-controller to update node status

parent e827393f
...@@ -166,7 +166,11 @@ func init() { ...@@ -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,6 +533,7 @@ items: ...@@ -533,6 +533,7 @@ items:
resources: resources:
- nodes - nodes
verbs: verbs:
- delete
- get - get
- list - list
- update - update
...@@ -540,6 +541,28 @@ items: ...@@ -540,6 +541,28 @@ items:
- "" - ""
attributeRestrictions: null attributeRestrictions: null
resources: resources:
- nodes/status
verbs:
- update
- apiGroups:
- ""
attributeRestrictions: null
resources:
- pods/status
verbs:
- update
- apiGroups:
- ""
attributeRestrictions: null
resources:
- pods
verbs:
- delete
- list
- apiGroups:
- ""
attributeRestrictions: null
resources:
- events - events
verbs: verbs:
- create - create
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment