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: Add consolidation policies for WhenCheaper, WhenUnderutilizedOrCheaper #1429

Closed

Conversation

cnmcavoy
Copy link
Contributor

@cnmcavoy cnmcavoy commented Jul 16, 2024

Fixes #1430

The motivation is to allow cluster operators to configure some nodepools for single-node consolidation (and emptiness), and configure some nodepools for multi-node consolidation, but not single-node consolidation. New enum values for the consolidationPolicy make this possible.

Description

Adds two new consolidation policy enum values:

  • WhenCheaper
  • WhenUnderutilizedOrCheaper

Changes the semantics of the existing consolidation policy enum value:

  • WhenUnderutilized

WhenUnderutilizedOrCheaper becomes the new default. WhenUnderutilizedOrCheaper is the same as WhenUnderutilized today. It functions the same, it is just a new name.

WhenUnderutilized semantics changes to only allow emptiness or multi-node consolidation to occur for a nodepool.

WhenCheaper only allows emptiness or single-node consolidation to occur for a nodepool.

How was this change tested?

Tested in a kind cluster and with make presubmit.

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 cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 16, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: cnmcavoy
Once this PR has been reviewed and has the lgtm label, please assign gjtempleton 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 k8s-ci-robot requested review from jmdeal and tallaxes July 16, 2024 17:20
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 16, 2024
@coveralls
Copy link

Pull Request Test Coverage Report for Build 9961312317

Details

  • 32 of 48 (66.67%) changed or added relevant lines in 6 files are covered.
  • 4 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.1%) to 78.011%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/controllers/disruption/multinodeconsolidation.go 1 5 20.0%
pkg/controllers/disruption/singlenodeconsolidation.go 1 5 20.0%
pkg/apis/v1/nodepool_conversion.go 24 32 75.0%
Files with Coverage Reduction New Missed Lines %
pkg/test/expectations/expectations.go 2 94.64%
pkg/controllers/disruption/drift.go 2 89.66%
Totals Coverage Status
Change from base Build 9947083879: -0.1%
Covered Lines: 8809
Relevant Lines: 11292

💛 - Coveralls

@ellistarn
Copy link
Contributor

Can you write an RFC: https://karpenter.sh/docs/contributing/design-guide/?

@cnmcavoy
Copy link
Contributor Author

RFC: #1433

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 17, 2024
@k8s-ci-robot
Copy link
Contributor

PR needs rebase.

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.

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 Jul 31, 2024
@github-actions github-actions bot closed this Aug 14, 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. lifecycle/closed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. 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.

Configurable Karpenter nodepool consolidation policies
4 participants