-
Notifications
You must be signed in to change notification settings - Fork 204
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: Fix using the wrong pods when validating do-not-evict
pods
#583
Merged
jonathan-innis
merged 2 commits into
kubernetes-sigs:main
from
jonathan-innis:fix-validation-do-not-evict
Oct 10, 2023
Merged
fix: Fix using the wrong pods when validating do-not-evict
pods
#583
jonathan-innis
merged 2 commits into
kubernetes-sigs:main
from
jonathan-innis:fix-validation-do-not-evict
Oct 10, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jonathan-innis
force-pushed
the
fix-validation-do-not-evict
branch
2 times, most recently
from
October 9, 2023 22:24
d20c6fc
to
f081464
Compare
Pull Request Test Coverage Report for Build 6473509748
💛 - Coveralls |
jonathan-innis
force-pushed
the
fix-validation-do-not-evict
branch
2 times, most recently
from
October 9, 2023 23:06
ed5d058
to
1bf77db
Compare
jonathan-innis
force-pushed
the
fix-validation-do-not-evict
branch
3 times, most recently
from
October 9, 2023 23:35
4735d39
to
a82437f
Compare
jonathan-innis
force-pushed
the
fix-validation-do-not-evict
branch
from
October 9, 2023 23:38
a82437f
to
9edcc27
Compare
jonathan-innis
changed the title
chore: Fix using the wrong pods when validating
fix: Fix using the wrong pods when validating Oct 9, 2023
do-not-evict
podsdo-not-evict
pods
njtran
reviewed
Oct 10, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch! Just some nits on the tests.
njtran
previously approved these changes
Oct 10, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approved with comments nits
jonathan-innis
force-pushed
the
fix-validation-do-not-evict
branch
from
October 10, 2023 18:42
4a20d4e
to
5e9a562
Compare
njtran
approved these changes
Oct 10, 2023
jonathan-innis
added a commit
to jonathan-innis/karpenter
that referenced
this pull request
Oct 11, 2023
jonathan-innis
added a commit
to jonathan-innis/karpenter
that referenced
this pull request
Oct 11, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes aws/karpenter-provider-aws#4310, aws/karpenter-provider-aws#4758
Description
This PR correctly validates that the candidates that we are attempting to deprovision are still eligible to be deprovisioned. It does this by mapping the old candidates onto the new candidates that we pull from state and checking that all of those candidates are still valid for deprovisioning based on PDB criteria,
do-not-evict
annotations, and scheduling criteria.This PR also removes the caching mechanism for
validationCandidates
since we weren't callingIsValid
multiple times in code, meaning that storing the candidates like this wasn't necessary for our usage.#247 had originally intended to fix this issue, but uses the wrong pods for validation within the
filterCandidates
function. This causes validation to pass for candidate nodes that receive pods with blocking PDBs ordo-not-evict
pods within the validation window.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.