From f25d898e289d86e41d87ee7c23d698a457d14d64 Mon Sep 17 00:00:00 2001 From: Jason Deal Date: Fri, 29 Nov 2024 17:30:57 -0800 Subject: [PATCH] fix: spurious disruption budget eventing (#1854) --- pkg/controllers/disruption/helpers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/controllers/disruption/helpers.go b/pkg/controllers/disruption/helpers.go index a89c7d23d5..85654fe597 100644 --- a/pkg/controllers/disruption/helpers.go +++ b/pkg/controllers/disruption/helpers.go @@ -237,7 +237,7 @@ func BuildDisruptionBudgetMapping(ctx context.Context, cluster *state.Cluster, c NodePoolAllowedDisruptions.Set(float64(allowedDisruptions), map[string]string{ metrics.NodePoolLabel: nodePool.Name, metrics.ReasonLabel: string(reason), }) - if allowedDisruptions == 0 { + if numNodes[nodePool.Name] != 0 && allowedDisruptions == 0 { recorder.Publish(disruptionevents.NodePoolBlockedForDisruptionReason(nodePool, reason)) } }