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

fix!: Prevent eviction hanging due to do-not-evict #220

Merged

Conversation

jonathan-innis
Copy link
Member

@jonathan-innis jonathan-innis commented Feb 21, 2023

Fixes aws/karpenter-provider-aws#3383

Description

Remove do-not-evict preventing eviction when the Node is forcefully deleted through kubectl delete node or some other forceful deletion mechanism (like AWS interruption). do-not-evict should only be considered for Karpenter's voluntary disruption mechanisms (like emptiness/underutilization/consolidation, expiration, drift, etc.)

BREAKING CHANGE: Customers who are currently deleting nodes with pods that have do-not-evict annotations will no longer have nodes hang on draining for this, meaning that they can't use do-not-evict as a stop-gap

How was this change tested?

make presubmit

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

@jonathan-innis jonathan-innis requested a review from a team as a code owner February 21, 2023 23:25
@jonathan-innis jonathan-innis changed the title chore: Prevent eviction hanging due to do-not-evict chore: Prevent eviction hanging due to do-not-evict Feb 21, 2023
@coveralls
Copy link

coveralls commented Feb 21, 2023

Pull Request Test Coverage Report for Build 4245924130

  • 24 of 25 (96.0%) changed or added relevant lines in 4 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.06%) to 81.114%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/controllers/deprovisioning/helpers.go 9 10 90.0%
Files with Coverage Reduction New Missed Lines %
pkg/controllers/deprovisioning/helpers.go 1 82.89%
Totals Coverage Status
Change from base Build 4245682130: 0.06%
Covered Lines: 6365
Relevant Lines: 7847

💛 - Coveralls

@ellistarn
Copy link
Contributor

Do we need a breaking notice on this?

@jonathan-innis jonathan-innis changed the title chore: Prevent eviction hanging due to do-not-evict chore!: Prevent eviction hanging due to do-not-evict Feb 22, 2023
@jonathan-innis jonathan-innis changed the title chore!: Prevent eviction hanging due to do-not-evict fix!: Prevent eviction hanging due to do-not-evict Feb 22, 2023
Copy link
Contributor

@njtran njtran left a comment

Choose a reason for hiding this comment

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

Nice. Some comments. Can you add in some docs changes as well for this?

pkg/controllers/deprovisioning/emptiness.go Outdated Show resolved Hide resolved
@jonathan-innis
Copy link
Member Author

Can you add in some docs changes as well for this

Docs will go in the main karpenter repo change

Copy link
Contributor

@njtran njtran left a comment

Choose a reason for hiding this comment

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

LGTM

@jonathan-innis jonathan-innis merged commit 2fe0c76 into kubernetes-sigs:main Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants