-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe 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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. Guess it's a question for @kawych :) |
||
eventsRule(), | ||
}, | ||
}) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -479,6 +479,7 @@ items: | |
resources: | ||
- '*' | ||
verbs: | ||
- get | ||
- list | ||
- apiGroups: | ||
- "" | ||
|
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