fix: support revision-scoped HA pod anti-affinity - #208
Merged
Conversation
Signed-off-by: Maria Popova <mary_ppv@mail.ru>
mary-ppv
force-pushed
the
fix/ha-anti-affinity-pod-template-hash
branch
from
August 10, 2026 13:33
8a20d22 to
faa1213
Compare
mary-ppv
marked this pull request as ready for review
August 10, 2026 13:36
Merged
4 tasks
borg-z
approved these changes
Aug 10, 2026
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
Added optional revision-scoped pod anti-affinity to
helm_lib_pod_anti_affinity_for_ha.Callers can enable it using:
When enabled, the helper adds:
Existing calls remain unchanged because revision scoping is disabled by default.
Why do we need it?
During a Deployment rolling update, required pod anti-affinity based only on common application labels can prevent a pod from the new ReplicaSet from being scheduled alongside a pod from the old ReplicaSet.
Scoping the rule by
pod-template-hashkeeps replicas of the same revision distributed across different nodes, while allowing pods from different revisions to temporarily run on the same node. This prevents rollouts from becoming blocked during transitions such as HA to non-HA.The behavior is opt-in to avoid changing scheduling semantics for existing users of the helper.
Testing
Added unit tests verifying that:
matchLabelKeys;revisionScoped: truerenderpod-template-hash;All unit tests passed:
The generated Helm library documentation was updated.
Version
Bumped the chart patch version from
1.72.13to1.72.14.