-
Notifications
You must be signed in to change notification settings - Fork 40.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow HPA to get custom metrics #54854
Conversation
/unassign @deads2k |
@@ -162,7 +162,7 @@ func buildControllerRoles() ([]rbac.ClusterRole, []rbac.ClusterRoleBinding) { | |||
rbac.NewRule("get").Groups(legacyGroup).Resources("services/proxy").Names("https:heapster:", "http:heapster:").RuleOrDie(), | |||
// allow listing resource metrics and custom metrics | |||
rbac.NewRule("list").Groups(resMetricsGroup).Resources("pods").RuleOrDie(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
get needed here as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is not necessary - HPA uses this API since PR #53205 and works fine, i.e. e2e tests are passing. See [HPA] tests here: https://k8s-testgrid.appspot.com/google-gce#gci-gce
/lgtm |
/retest |
/assign @mwielgus |
/lgtm |
@liggitt Could you please approve this PR? |
already done |
@liggitt |
/approve no-issue |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deads2k, kawych, liggitt, mwielgus Associated issue requirement bypassed by: deads2k The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
/test all [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here. |
@@ -162,7 +162,7 @@ func buildControllerRoles() ([]rbac.ClusterRole, []rbac.ClusterRoleBinding) { | |||
rbac.NewRule("get").Groups(legacyGroup).Resources("services/proxy").Names("https:heapster:", "http:heapster:").RuleOrDie(), | |||
// allow listing resource metrics and custom metrics | |||
rbac.NewRule("list").Groups(resMetricsGroup).Resources("pods").RuleOrDie(), | |||
rbac.NewRule("list").Groups(customMetricsGroup).Resources("*").RuleOrDie(), | |||
rbac.NewRule("get", "list").Groups(customMetricsGroup).Resources("*").RuleOrDie(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW "watch" seems to be missing here - while it was there in the original role (https://github.com/GoogleCloudPlatform/k8s-stackdriver/pull/65/files)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no objection to the permission, but does the custom metrics server support watch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Guess it's a question for @kawych :)
What this PR does / why we need it:
This PR allows HPA to read custom metrics.
Release note: