Description
As I read through the disruption documentation, it was my impression that even if a nodeClaim had drifted, karpenter would not disrupt the node if there were pods which cannot be evicted.
Karpenter will mark nodes as drifted and disrupt nodes that have drifted from their desired specification.
If there are pods that cannot be evicted on the node, Karpenter will ignore the node and try disrupting it later.
However, when looking at the description for terminationGracePeriod
in the nodepools
CRD, it states:
When set, drifted nodes will begin draining even if there are pods blocking eviction. Draining will respect PDBs and the do-not-disrupt annotation until the TGP is reached.
The CRD description appears to be in conflict with the documentation as the documentation indicates that the node would NOT be drained if there are pods blocking eviction.
For our use case, we do not want such nodes to be drained at that point (the behavior described in the documentation and not the CRD is what we want). We want to wait for the full expireAfter + terminationGracePeriod
duration to elapse (as described in the example in TerminationGracePeriod).
Effectively, we want a nodePool where drifted nodes are blocked from being replaced by pods which cannot be evicted until the node expires.
So, am I misreading the doc and/or the CRD or is either the doc or CRD not in alignment with the actual behavior?