Add '/version/*' to the system:discovery role, since that's what the open
api spec says.
This commit is contained in:
		@@ -169,7 +169,7 @@ func ClusterRoles() []rbac.ClusterRole {
 | 
				
			|||||||
			ObjectMeta: metav1.ObjectMeta{Name: "system:discovery"},
 | 
								ObjectMeta: metav1.ObjectMeta{Name: "system:discovery"},
 | 
				
			||||||
			Rules: []rbac.PolicyRule{
 | 
								Rules: []rbac.PolicyRule{
 | 
				
			||||||
				rbac.NewRule("get").URLs(
 | 
									rbac.NewRule("get").URLs(
 | 
				
			||||||
					"/healthz", "/version",
 | 
										"/healthz", "/version", "/version/*",
 | 
				
			||||||
					// remove once swagger 1.2 support is removed
 | 
										// remove once swagger 1.2 support is removed
 | 
				
			||||||
					"/swaggerapi", "/swaggerapi/*",
 | 
										"/swaggerapi", "/swaggerapi/*",
 | 
				
			||||||
					// do not expand this pattern for openapi discovery docs
 | 
										// do not expand this pattern for openapi discovery docs
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -640,6 +640,7 @@ items:
 | 
				
			|||||||
    - /swaggerapi
 | 
					    - /swaggerapi
 | 
				
			||||||
    - /swaggerapi/*
 | 
					    - /swaggerapi/*
 | 
				
			||||||
    - /version
 | 
					    - /version
 | 
				
			||||||
 | 
					    - /version/*
 | 
				
			||||||
    verbs:
 | 
					    verbs:
 | 
				
			||||||
    - get
 | 
					    - get
 | 
				
			||||||
- apiVersion: rbac.authorization.k8s.io/v1
 | 
					- apiVersion: rbac.authorization.k8s.io/v1
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user