mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 08:17:26 +00:00
Merge pull request #39219 from liggitt/swagger-discovery
Automatic merge from submit-queue Include swaggerapi urls in system:discovery role Used by client side API validation and for client schema generation
This commit is contained in:
commit
2bad7e6be1
@ -82,7 +82,7 @@ func ClusterRoles() []rbac.ClusterRole {
|
|||||||
// a role which provides just enough power to discovery API versions for negotiation
|
// a role which provides just enough power to discovery API versions for negotiation
|
||||||
ObjectMeta: api.ObjectMeta{Name: "system:discovery"},
|
ObjectMeta: api.ObjectMeta{Name: "system:discovery"},
|
||||||
Rules: []rbac.PolicyRule{
|
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(),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -383,6 +383,8 @@ items:
|
|||||||
- /api/*
|
- /api/*
|
||||||
- /apis
|
- /apis
|
||||||
- /apis/*
|
- /apis/*
|
||||||
|
- /swaggerapi
|
||||||
|
- /swaggerapi/*
|
||||||
- /version
|
- /version
|
||||||
verbs:
|
verbs:
|
||||||
- get
|
- get
|
||||||
|
Loading…
Reference in New Issue
Block a user