Include swaggerapi urls in system:discovery role

This commit is contained in:
Jordan Liggitt 2016-12-24 12:36:38 -05:00
parent 24b3f6c494
commit a209040ac8
No known key found for this signature in database
GPG Key ID: 24E7ADF9A3B42012
2 changed files with 3 additions and 1 deletions

View File

@ -82,7 +82,7 @@ func ClusterRoles() []rbac.ClusterRole {
// a role which provides just enough power to discovery API versions for negotiation
ObjectMeta: api.ObjectMeta{Name: "system:discovery"},
Rules: []rbac.PolicyRule{
rbac.NewRule("get").URLs("/version", "/api", "/api/*", "/apis", "/apis/*").RuleOrDie(),
rbac.NewRule("get").URLs("/version", "/swaggerapi", "/swaggerapi/*", "/api", "/api/*", "/apis", "/apis/*").RuleOrDie(),
},
},
{

View File

@ -383,6 +383,8 @@ items:
- /api/*
- /apis
- /apis/*
- /swaggerapi
- /swaggerapi/*
- /version
verbs:
- get