Repository navigation
Conversation
Contributor
|
❗ By default, the pull request is configured to backport to all release branches.
|
… node is cordoned Signed-off-by: Etienne DIVET <[email protected]>
enneitex
force-pushed
the
fix/node-tainted
branch
from
February 25, 2026 13:05
8458408 to
f84f9cc
Compare
|
Hello, |
Contributor
|
Warning Linked issue missing. Reference one in the PR body using a keyword (Closes / Fixes / Resolves / Refs / See) followed by Alternatively, apply the |
Author
|
There is an issue linked. |
|
Fixes #7799 |
|
Hello, we’d really benefit from getting this change merged. Is there anything I can do to help move it forward? |
This file contains hidden or 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
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 #7799
The goal is to not trigger a switchover when a node is cordoned
When a user runs
kubectl cordon, it adds two things to a node:spec.unschedulable: truenode.kubernetes.io/unschedulableEven when adding
DRAIN_TAINTS="ToBeDeletedByClusterAutoscaler,karpenter.sh/disrupted,karpenter.sh/disruption"whitoutnode.kubernetes.io/unschedulable, a switchover will happen because of line https://github.com/cloudnative-pg/cloudnative-pg/blob/main/internal/controller/replicas.go#L193 who checks forspec.unschedulable.The solution is to ignore this field as it is redundant with the taint.
I'm not aware of a scenario where
spec.unschedulableis set without the associated taint but if there is a valid case, then I can rework this PR to add a new env var so a user can chose to bypass or notspec.unschedulable