Unverified Commit 648cc300 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #54854 from kawych/hpa_roles

Automatic merge from submit-queue. 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>. Allow HPA to get custom metrics **What this PR does / why we need it**: This PR allows HPA to read custom metrics. **Release note**: ```release-note Allow HPA to read custom metrics. ```
parents 6e1b4ab8 69d81c92
...@@ -162,7 +162,7 @@ func buildControllerRoles() ([]rbac.ClusterRole, []rbac.ClusterRoleBinding) { ...@@ -162,7 +162,7 @@ func buildControllerRoles() ([]rbac.ClusterRole, []rbac.ClusterRoleBinding) {
rbac.NewRule("get").Groups(legacyGroup).Resources("services/proxy").Names("https:heapster:", "http:heapster:").RuleOrDie(), rbac.NewRule("get").Groups(legacyGroup).Resources("services/proxy").Names("https:heapster:", "http:heapster:").RuleOrDie(),
// allow listing resource metrics and custom metrics // allow listing resource metrics and custom metrics
rbac.NewRule("list").Groups(resMetricsGroup).Resources("pods").RuleOrDie(), rbac.NewRule("list").Groups(resMetricsGroup).Resources("pods").RuleOrDie(),
rbac.NewRule("list").Groups(customMetricsGroup).Resources("*").RuleOrDie(), rbac.NewRule("get", "list").Groups(customMetricsGroup).Resources("*").RuleOrDie(),
eventsRule(), eventsRule(),
}, },
}) })
......
...@@ -479,6 +479,7 @@ items: ...@@ -479,6 +479,7 @@ items:
resources: resources:
- '*' - '*'
verbs: verbs:
- get
- list - list
- apiGroups: - apiGroups:
- "" - ""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment