fix(sync): prevent rolling update when unexpected pods are down#3112
Open
ovnozdrach wants to merge 2 commits into
Open
fix(sync): prevent rolling update when unexpected pods are down#3112ovnozdrach wants to merge 2 commits into
ovnozdrach wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This is to completely address issue #2966
Problem
It's possible to introduce an invalid configuration into a sidecar (e.g., negative container port). Previously, this would trigger a cascading failure. The operator would try to recreate pods one by one during each sync interval (30 minutes), but because the spec was invalid, each new pod would not start. This process would continue until the entire cluster was terminated, resulting in a complete outage.
Solution
This change introduces a pre-flight check before starting any rolling update. The operator now ensures that the total number of pods is stable and that any pod that is not running is already part of the planned update. If an unexpected pod is down or missing, the operation is postponed, preventing the cascading deletion of healthy instances. This logic is compatible with and enhances the stability checks from #3051.