Merge pull request #95562 from wojtek-t/fix_metrics

Fix metrics reporting in kube-apiserver
This commit is contained in:
Kubernetes Prow Robot
2020-10-15 21:13:25 -07:00
committed by GitHub
4 changed files with 136 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"