EAI-7889 Add pod anti-affinity for SeaweedFS and fix keycloak-old CNPG topology - #803
Merged
Conversation
Contributor
|
once testing steps are done, this is great |
pre
approved these changes
Aug 7, 2026
…G topology Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
silokimmo
force-pushed
the
EAI-7889-pod-anti-affinity
branch
from
August 7, 2026 10:58
14625db to
7e87085
Compare
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.
Related:
Companion to #802 (CNPG topology fix) and #801 (small profile pin). This PR
covers the remaining anti-affinity work from EAI-7889 that those PRs do not
address.
Problem
SeaweedFS — master, volume, and filer have zero anti-affinity. In large
clusters (3 master replicas, 3 volume replicas) all pods can land on one node.
Losing that node takes down the entire S3 storage layer.
keycloak-old CNPG — #802 fixed
keycloak-configbut the active Keycloakchart is
keycloak-old(root/values.yamlmapskeycloaktopath: keycloak-old). Thekeycloak-oldCNPG cluster still hardcodestopology.kubernetes.io/zone, which is a no-op on bare-metal.Large profile CNPG instance counts — AIRM and Keycloak CNPG run 1 instance
even on large clusters (6+ nodes). A single database instance means no
automatic failover; losing the node requires pod rescheduling and WAL recovery.
Change
SeaweedFS anti-affinity
Add
preferredDuringSchedulingIgnoredDuringExecutionpod anti-affinity formaster, volume, and filer components in the Seaweed CR template. Topology key
is configurable via
seaweed.affinity.topologyKey(defaultkubernetes.io/hostname).Soft anti-affinity ensures single-node and medium clusters still schedule all
pods without anything sitting
Pending.keycloak-old CNPG topology fix
Same pattern as #802 — expose
podAntiAffinityTypeandtopologyKeyasvalues, defaulting to
preferredandkubernetes.io/hostname. Consistent withthe AIRM and AIWB CNPG charts from #802.
Large profile instance counts
AIWB CNPG already has 3 instances — no change needed.
Files touched:
sources/seaweedfs-config/templates/seaweedfs-seaweed.yaml— anti-affinity blockssources/seaweedfs-config/values.yaml— affinity defaultssources/keycloak-old/templates/keycloak-cnpg.yaml— templatize topologysources/keycloak-old/values.yaml— topology defaultsroot/values_large.yaml— AIRM and Keycloak CNPG instances: 2Testing
helm template ./rooton all four profiles