Skip to content

Commit 0699368

Browse files
committed
Implement blockingNodeAnnotation and fix inhibitingNodeAnnotation condition
1 parent bba1f03 commit 0699368

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

cmd/kured/main.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,13 +278,16 @@ func main() {
278278
if blockingPodSelectors != nil {
279279
blockCheckers = append(blockCheckers, blockers.NewKubernetesBlockingChecker(client, nodeID, blockingPodSelectors))
280280
}
281+
if blockingNodeAnnotations != nil {
282+
blockCheckers = append(blockCheckers, blockers.NewNodeBlockingChecker(client, nodeID, blockingNodeAnnotations))
283+
}
281284

282285
// These prevent the rebooter to reboot the node, it will still drain the node.
283286
// This is useful for cases in which you want to wait for a condition that is only met after draining the node.
284287
var inhibitingBlockCheckers []blockers.RebootBlocker
285-
if blockingNodeAnnotations != nil {
286-
log.Info("Setup rebooter blocker for node annotations")
287-
inhibitingBlockCheckers = append(inhibitingBlockCheckers, blockers.NewNodeBlockingChecker(client, nodeID, blockingNodeAnnotations))
288+
if inhibitingNodeAnnotations != nil {
289+
log.Info("Setup inhibiting blocker for node annotations")
290+
inhibitingBlockCheckers = append(inhibitingBlockCheckers, blockers.NewNodeBlockingChecker(client, nodeID, inhibitingNodeAnnotations))
288291
}
289292
if inhibitingPodSelectors != nil {
290293
inhibitingBlockCheckers = append(inhibitingBlockCheckers, blockers.NewKubernetesBlockingChecker(client, nodeID, inhibitingPodSelectors))

0 commit comments

Comments
 (0)