feat(vaultwarden): add topologySpreadConstraints support - #234
Merged
Conversation
somaz94
added a commit
to somaz94/somaz94
that referenced
this pull request
Jul 2, 2026
somaz94
marked this pull request as ready for review
July 21, 2026 07:18
somaz94
force-pushed
the
feat/topology-spread-constraints
branch
from
July 28, 2026 06:29
15b1a7d to
8c9187a
Compare
Signed-off-by: somaz <genius5711@gmail.com>
somaz94
force-pushed
the
feat/topology-spread-constraints
branch
from
August 7, 2026 01:57
8c9187a to
9d4d8e3
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.
What this does
Adds an opt-in
topologySpreadConstraintsfield so pods can be spread across zones/nodes for higher availability. This complements the existingnodeSelector,affinity,tolerations, andpriorityClassNamescheduling knobs already exposed on the pod spec.Why
Multi-node clusters running more than one replica (
replicas > 1, or a StatefulSet) currently have no built-in way to enforce even pod distribution across topology domains.topologySpreadConstraintsis the standard Kubernetes primitive for this and rounds out the scheduling surface of the chart.Changes
templates/_podSpec.tpl— rendertopologySpreadConstraintsfrom values (shared by both the Deployment and StatefulSet paths viavaultwarden.podSpec)values.yaml— newtopologySpreadConstraints: []parameter with@paramdoc annotationREADME.md— regenerated via the bitnamireadme-generator-for-helmtool (generate-readme.sh)Chart.yaml— version bump0.43.1→0.44.0(SemVer minor, per CONTRIBUTING)Backward compatibility
The field defaults to
[], so the{{- with .Values.topologySpreadConstraints }}block is skipped when unset. Rendered output for existing users is byte-identical (verified withhelm templatediff againstmain, version bump aside).Usage
Testing
helm lint— passct lint— passhelm templatewith the field set renderstopologySpreadConstraintscorrectly on both Deployment and StatefulSethelm templatewith the field unset is byte-identical tomain