Allow node-controller to update node status

pull/6/head
Jordan Liggitt 2017-01-09 17:45:12 -05:00
parent e827393fa2
commit bda95a59ad
No known key found for this signature in database
GPG Key ID: 24E7ADF9A3B42012
2 changed files with 28 additions and 1 deletions

View File

@ -166,7 +166,11 @@ func init() {
addControllerRole(rbac.ClusterRole{
ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "node-controller"},
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(),
},
})

View File

@ -533,9 +533,32 @@ items:
resources:
- nodes
verbs:
- delete
- get
- list
- 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:
- ""
attributeRestrictions: null