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

feat: nodeclaim.spec.minimumPriceImprovementPercent #1454

Closed

Conversation

wmgroot
Copy link
Contributor

@wmgroot wmgroot commented Jul 22, 2024

Fixes #1440
Implementation component of #1433.

Description
This PR adds a configurable MinimumPriceImprovementPercent to the NodeClaim spec. This allows users control over how large of a cost improvement should be required for consolidation to disrupt pods operating on a node to replace it with a cheaper alternative.

How was this change tested?
TBD. This PR is currently a draft for implementation discussion.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 22, 2024
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 22, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: wmgroot
Once this PR has been reviewed and has the lgtm label, please assign jonathan-innis for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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
Copy link
Contributor

Hi @wmgroot. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 22, 2024
@wmgroot wmgroot changed the title feat: nodeclaim.spec.priceImprovementThreshold feat: nodeclaim.spec.minimumPriceImprovementPercent Jul 22, 2024
@coveralls
Copy link

coveralls commented Jul 22, 2024

Pull Request Test Coverage Report for Build 10290317478

Details

  • 7 of 43 (16.28%) changed or added relevant lines in 3 files are covered.
  • 6 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.2%) to 77.637%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/apis/v1/zz_generated.deepcopy.go 1 5 20.0%
pkg/controllers/disruption/consolidation.go 6 18 33.33%
pkg/controllers/disruption/events/events.go 0 20 0.0%
Files with Coverage Reduction New Missed Lines %
pkg/controllers/disruption/drift.go 2 89.66%
pkg/controllers/disruption/consolidation.go 4 81.1%
Totals Coverage Status
Change from base Build 10289351631: -0.2%
Covered Lines: 8898
Relevant Lines: 11461

💛 - Coveralls

@wmgroot wmgroot force-pushed the price-improvement-threshold branch 4 times, most recently from 7a8a567 to 739da63 Compare July 30, 2024 17:27
@wmgroot wmgroot force-pushed the price-improvement-threshold branch from 739da63 to 99c9e7c Compare August 5, 2024 19:44
@wmgroot wmgroot force-pushed the price-improvement-threshold branch from 99c9e7c to b4626ae Compare August 7, 2024 19:10
Copy link

This PR has been inactive for 14 days. StaleBot will close this stale PR after 14 more days of inactivity.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 22, 2024
// +kubebuilder:validation:Minimum:=0
// +kubebuilder:validation:Maximum:=100
// +optional
MinimumPriceImprovementPercent *int32 `json:"minimumPriceImprovementPercent,omitempty"`
Copy link
Contributor

@ellistarn ellistarn Aug 23, 2024

Choose a reason for hiding this comment

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

I think this one makes sense at the NodePool level, rather than the NodeClaim level. This is because the decision to consolidate is at the pool level, unlike expiry/tgp, which make sense outside of the context of a pool (i.e. standalone nodeclaim).

WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I put it in NodeClaim because I think it could be helpful to have the flexibility to set different improvement thresholds for each NodeClaim in a shared NodePool. The existing candidate filtering logic already considers the price of each NodeClaim individually, so there's no added complexity there.

@github-actions github-actions bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 24, 2024
Copy link

github-actions bot commented Sep 8, 2024

This PR has been inactive for 14 days. StaleBot will close this stale PR after 14 more days of inactivity.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 8, 2024
@github-actions github-actions bot closed this Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. lifecycle/closed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Price Improvement Threshold
4 participants