Skip to content

fix: set maxUnavailable to 1 when its 0 to avoid an infinite loop#1932

Merged
vrutkovs merged 1 commit intomasterfrom
sts-maxUnavailable-0
Mar 5, 2026
Merged

fix: set maxUnavailable to 1 when its 0 to avoid an infinite loop#1932
vrutkovs merged 1 commit intomasterfrom
sts-maxUnavailable-0

Conversation

@vrutkovs
Copy link
Collaborator

@vrutkovs vrutkovs commented Mar 5, 2026

We're breaking a list of pods to restart into batches, based on o.maxUnavailable value. However, it can be misconfigured and resolve into 0 (e.g. 50% on one pod). This would result into infinite loop.

This clamps the value to 1 and adds tests for similar situation

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

@vrutkovs vrutkovs merged commit dd7fa86 into master Mar 5, 2026
7 of 8 checks passed
@vrutkovs vrutkovs deleted the sts-maxUnavailable-0 branch March 5, 2026 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants