Repository navigation
Description
Is there an existing issue already for this feature request/idea?
- I have searched for an existing issue, and could not find anything. I believe this is a new feature request to be evaluated.
What problem is this feature going to solve? Why should it be added?
At the moment, when a primary runs on EKS nodes managed by karpenter, you will have to manually failover if a node is replaced or removed. This interrupts the automatic provisioning/deprovisioning of nodes.
Kubernetes uses the "node.kubernetes.io/unschedulable" taint and the "spec.unschedulable" field on a node to mark it as cordoned. The operator checks nodes for this information.
If a primary database is running on a node which was cordoned the operator will promote a secondary on another node.
This allows to evict the cordoned node without blocking the process due to the PDB of the primary.
Karpenter does not rely on "node.kubernetes.io/unschedulable" taint and/or the "spec.unschedulable" field.
Next to other things, the project basically needs to know that karpenter was the one that initiated the tainting.
kubernetes-sigs/karpenter#1152 (comment)
Describe the solution you'd like
Karpenter taints nodes with: "karpenter.sh/disruption:NoSchedule"
https://karpenter.sh/docs/concepts/disruption/#disruption-controller
It would be nice if the operator could also check for an additional/alternative taint like this.
Describe alternatives you've considered
You can set "enablePDB: false" - but this is officially not recommended for production environments.
Additional context
No response
Backport?
N/A
Are you willing to actively contribute to this feature?
No
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
markwebsterUK commentedon Nov 3, 2024
Ahhh, so that's what's going on! Would be great to implement this as a custom field.
danielloader commentedon Nov 8, 2024
I too found this after working out why my maximum age on karpenter issued nodes wasn't cycling the nodes out and instead blocked by postgres instances. Thanks OP for working this out.
c-thiel commentedon Jan 3, 2025
Ran into the same problem, thanks for working it out!
Karpenter community is also arguing about this, but they seem to prefer to stick to their current taint and not leverage the k8s ones:
kubernetes-sigs/karpenter#1152
mark-webster-catalyst commentedon Jan 28, 2025
Any movement on this? It's making clusters managed by Karpenter unable to reliably consolidate or roll nodes without user interaction.
EDIT: If anyone gets to it before I have a chance to, this is how the AWS EBS CSI Driver handles it https://github.com/kubernetes-sigs/aws-ebs-csi-driver/blob/7bacf2d36f397bd098b3388403e8759c480be7e5/cmd/hooks/prestop.go#L47
markwebsterUK commentedon Mar 26, 2025
I am unreasonably excited that this has been fixed. Thank you!
feat: allow customization of taints for node drain detection (cloudna…
quercus-carsten commentedon Mar 26, 2025
Yep, i couldn't agree more :). This is going to be awesome - thank you!