Skip to content
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

Move targetCPUPercentile into a flag #4799

Merged
merged 1 commit into from
Sep 26, 2022
Merged

Conversation

matthyx
Copy link
Contributor

@matthyx matthyx commented Apr 7, 2022

Which component this PR applies to?

vertical-pod-autoscaler

What type of PR is this?

/kind feature

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #4786

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Add flags to specify recommender name and targetCPUPercentile via command line arguments.

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 7, 2022
@matthyx
Copy link
Contributor Author

matthyx commented Apr 7, 2022

@jbartosik something like that?
Let me know and I'll add some test coverage and docs.

@matthyx
Copy link
Contributor Author

matthyx commented Apr 7, 2022

/test

@k8s-ci-robot
Copy link
Contributor

@matthyx: No presubmit jobs available for kubernetes/autoscaler@master

In response to this:

/test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Collaborator

@jbartosik jbartosik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, some comments

vertical-pod-autoscaler/pkg/recommender/main.go Outdated Show resolved Hide resolved
@matthyx matthyx force-pushed the flags branch 2 times, most recently from 339909d to 5412b00 Compare April 14, 2022 13:51
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 14, 2022
@matthyx matthyx force-pushed the flags branch 2 times, most recently from 06770e6 to ab7ddd8 Compare April 14, 2022 14:31
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 13, 2022
@matthyx
Copy link
Contributor Author

matthyx commented Aug 4, 2022

/remove-lifecycle stale
@jbartosik can check and tell me what's missing, please?

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 4, 2022
@matthyx matthyx changed the title WIP move targetCPUPercentile into a flag Move targetCPUPercentile into a flag Aug 4, 2022
Copy link
Collaborator

@jbartosik jbartosik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Mostly looking good, I made a few, hopefully small suggestions.

@jbartosik
Copy link
Collaborator

Please ping me when I should take another look

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 24, 2022
@matthyx
Copy link
Contributor Author

matthyx commented Aug 25, 2022

Thanks @jbartosik I've missed that... does my change suit you?

Copy link
Collaborator

@jbartosik jbartosik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we're getting close. I left a few comments but I saw just some small stuff to change.


targetSelectorFetcher.EXPECT().Fetch(vpa).Return(tc.selector, tc.fetchSelectorError)
if !tc.expectNoVpaFetch {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd strongly prefer to avoid having variables with negations in names. So expectVpaFetch instead of expectNoVpaFetch. It's easier to read & reason about variables that say something positive than about negated ones. I know it's some more writing for this commit but I think making code easier to maintain is worth it.

vertical-pod-autoscaler/pkg/recommender/main.go Outdated Show resolved Hide resolved
@matthyx
Copy link
Contributor Author

matthyx commented Aug 26, 2022

@jbartosik thanks for your help, I think we're good to go :)

Copy link
Collaborator

@jbartosik jbartosik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. But I don't want to merge it for a while more. I want to finish releasing VPA 0.12.0 (I think code is good but e2e tests are timing out) before merging any changes to VPA that are not necessary for the release.

So

/hold

for now. I plan to unhold and merge after I publish the release

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 2, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jbartosik, matthyx

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 2, 2022
@jbartosik
Copy link
Collaborator

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 20, 2022
@matthyx
Copy link
Contributor Author

matthyx commented Sep 21, 2022

@jbartosik can you also change the "Draft" status of the PR? I cannot do it, strangely :(

@jbartosik jbartosik marked this pull request as ready for review September 26, 2022 11:37
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 26, 2022
@jbartosik
Copy link
Collaborator

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 26, 2022
@k8s-ci-robot k8s-ci-robot merged commit 15a2afa into kubernetes:master Sep 26, 2022
@jbartosik
Copy link
Collaborator

@matthyx can you add some documentation on running multiple recommenders.

I think it can be quite simple, something like:

  • a yaml with recommender with different cpu percentile and name in flag
  • a short .md file pointing to the yaml and highlighting the flags and what they do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/vertical-pod-autoscaler cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for different TargetCPUPercentiles through alternative recommender
4 participants