mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 13:37:30 +00:00
Add /swagger.json and /swagger-2.0.0.pb-v1 to discovery role
This commit is contained in:
parent
5e2ce3aaf2
commit
d657261f9b
@ -152,7 +152,16 @@ func ClusterRoles() []rbac.ClusterRole {
|
|||||||
// a role which provides just enough power to determine if the server is ready and discover API versions for negotiation
|
// a role which provides just enough power to determine if the server is ready and discover API versions for negotiation
|
||||||
ObjectMeta: metav1.ObjectMeta{Name: "system:discovery"},
|
ObjectMeta: metav1.ObjectMeta{Name: "system:discovery"},
|
||||||
Rules: []rbac.PolicyRule{
|
Rules: []rbac.PolicyRule{
|
||||||
rbac.NewRule("get").URLs("/healthz", "/version", "/swaggerapi", "/swaggerapi/*", "/api", "/api/*", "/apis", "/apis/*").RuleOrDie(),
|
rbac.NewRule("get").URLs(
|
||||||
|
"/healthz", "/version",
|
||||||
|
// remove once swagger 1.2 support is removed
|
||||||
|
"/swaggerapi", "/swaggerapi/*",
|
||||||
|
// do not expand this pattern for openapi discovery docs
|
||||||
|
// move to a single openapi endpoint that takes accept/accept-encoding headers
|
||||||
|
"/swagger.json", "/swagger-2.0.0.pb-v1",
|
||||||
|
"/api", "/api/*",
|
||||||
|
"/apis", "/apis/*",
|
||||||
|
).RuleOrDie(),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -434,6 +434,8 @@ items:
|
|||||||
- /apis
|
- /apis
|
||||||
- /apis/*
|
- /apis/*
|
||||||
- /healthz
|
- /healthz
|
||||||
|
- /swagger-2.0.0.pb-v1
|
||||||
|
- /swagger.json
|
||||||
- /swaggerapi
|
- /swaggerapi
|
||||||
- /swaggerapi/*
|
- /swaggerapi/*
|
||||||
- /version
|
- /version
|
||||||
|
Loading…
Reference in New Issue
Block a user