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 in termination check for nodes without machines #252

Merged
merged 4 commits into from
Mar 31, 2023

Conversation

njtran
Copy link
Contributor

@njtran njtran commented Mar 28, 2023

Fixes aws/karpenter-provider-aws#3562

Description
Adds in a termination check to see if the underlying instance is not found. If not found, Karpenter will delete the node and remove the finalizer.

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.

@njtran njtran requested a review from a team as a code owner March 28, 2023 00:56
@coveralls
Copy link

coveralls commented Mar 28, 2023

Pull Request Test Coverage Report for Build 4568460215

  • 15 of 18 (83.33%) changed or added relevant lines in 1 file are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.2%) to 81.373%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/controllers/termination/controller.go 15 18 83.33%
Files with Coverage Reduction New Missed Lines %
pkg/controllers/termination/controller.go 1 52.46%
Totals Coverage Status
Change from base Build 4535930523: 0.2%
Covered Lines: 6592
Relevant Lines: 8101

💛 - Coveralls

ellistarn
ellistarn previously approved these changes Mar 28, 2023
Copy link
Member

@jonathan-innis jonathan-innis left a comment

Choose a reason for hiding this comment

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

LGTM 🚀 Nice work!

@njtran njtran merged commit 27ccd92 into kubernetes-sigs:main Mar 31, 2023
@njtran njtran deleted the terminationcheck branch April 13, 2023 22:20
njtran added a commit to njtran/karpenter that referenced this pull request Apr 18, 2023
…-sigs#252)

* feat: add in termination check for nodes without machines

* reorganize code

* change controller requeue logic

* fix ci test flake
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Karpenter takes a long time to delete nodes that have been removed by AWS via spot interruption
4 participants