add rbac role for certificate-controller

This commit is contained in:
Mike Danese
2017-01-13 17:11:20 -08:00
parent ae04755d71
commit f3e97d522d
3 changed files with 57 additions and 0 deletions

View File

@@ -264,6 +264,14 @@ func init() {
eventsRule(),
},
})
addControllerRole(rbac.ClusterRole{
ObjectMeta: api.ObjectMeta{Name: saRolePrefix + "certificate-controller"},
Rules: []rbac.PolicyRule{
rbac.NewRule("get", "list", "watch").Groups(certificatesGroup).Resources("certificatesigningrequests").RuleOrDie(),
rbac.NewRule("update").Groups(certificatesGroup).Resources("certificatesigningrequests/status", "certificatesigningrequests/approval").RuleOrDie(),
eventsRule(),
},
})
}
// ControllerRoles returns the cluster roles used by controllers