Skip to content

Commit

Permalink
fix: spurious disruption budget eventing (#1854)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdeal authored Nov 30, 2024
1 parent 848b989 commit f25d898
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/controllers/disruption/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
}
Expand Down

0 comments on commit f25d898

Please sign in to comment.