Fix metrics reporting in kube-apiserver

Kubernetes-commit: 3d2a80643aec08be1e50193aeed08aad0d7f886b
This commit is contained in:
wojtekt 2020-10-14 17:34:33 +02:00 committed by Kubernetes Publisher
parent 968a41a8a7
commit 6fc1d642b6
1 changed files with 3 additions and 0 deletions

View File

@ -594,6 +594,9 @@ func (a *APIInstaller) registerResourceHandlers(path string, storage rest.Storag
requestScope = "resource"
operationSuffix = operationSuffix + "WithPath"
}
if strings.Index(action.Path, "/{name}") != -1 || action.Verb == "POST" {
requestScope = "resource"
}
if action.AllNamespaces {
requestScope = "cluster"
operationSuffix = operationSuffix + "ForAllNamespaces"