enhancement: implemented anti-affinity for pods within same livestore…#6757
Merged
zhxiaogg merged 1 commit intografana:mainfrom Mar 24, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a soft pod anti-affinity rule for Live Store zone StatefulSets to encourage spreading replicas from the same zone across distinct nodes (while preserving the existing hard anti-affinity behavior between zones).
Changes:
- Introduces
liveStoreZoneSoftAntiAffinityusingpreferredDuringSchedulingIgnoredDuringExecutionwithtopologyKey: kubernetes.io/hostname. - Applies the new soft anti-affinity alongside the existing zone anti-affinity when generating zone StatefulSets.
- Updates generated/compiled StatefulSet manifests for zone-a and zone-b (with and without extras) to include the new preference.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| operations/jsonnet/microservices/live-store.libsonnet | Adds and wires a soft pod anti-affinity helper for same-zone Live Store pods. |
| operations/jsonnet-compiled/microservices/gen/StatefulSet-live-store-zone-a.yaml | Generated manifest updated to include preferred pod anti-affinity for zone-a. |
| operations/jsonnet-compiled/microservices/gen/StatefulSet-live-store-zone-b.yaml | Generated manifest updated to include preferred pod anti-affinity for zone-b. |
| operations/jsonnet-compiled/microservices-with-extras/gen/StatefulSet-live-store-zone-a.yaml | Generated manifest updated to include preferred pod anti-affinity for zone-a (extras). |
| operations/jsonnet-compiled/microservices-with-extras/gen/StatefulSet-live-store-zone-b.yaml | Generated manifest updated to include preferred pod anti-affinity for zone-b (extras). |
a69242f to
40be08a
Compare
mapno
approved these changes
Mar 24, 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.
… zone
What this PR does:
Which issue(s) this PR fixes:
Fixes N/A
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]