Merge pull request #57368 from brendandburns/version

Automatic merge from submit-queue (batch tested with PRs 57349, 57368). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Add '/version/' to the system:discovery role, since that's what the spec says.

See: https://github.com/kubernetes-client/java/issues/153

```release-note
Add the path '/version/' to the `system:discovery` cluster role.
```
pull/6/head
Kubernetes Submit Queue 2017-12-20 14:53:38 -08:00 committed by GitHub
commit c13a2abaf3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -169,7 +169,7 @@ func ClusterRoles() []rbac.ClusterRole {
ObjectMeta: metav1.ObjectMeta{Name: "system:discovery"},
Rules: []rbac.PolicyRule{
rbac.NewRule("get").URLs(
"/healthz", "/version",
"/healthz", "/version", "/version/",
// remove once swagger 1.2 support is removed
"/swaggerapi", "/swaggerapi/*",
// do not expand this pattern for openapi discovery docs

View File

@ -640,6 +640,7 @@ items:
- /swaggerapi
- /swaggerapi/*
- /version
- /version/
verbs:
- get
- apiVersion: rbac.authorization.k8s.io/v1