Conversation
The chart hardcoded RollingUpdate with maxSurge 1 / maxUnavailable 0, so every rollout briefly runs old and new relay pods side by side. Each pod holds its own writer, audit and search pools, which doubles Postgres connection demand for the length of the rollout. Behind a client-capped pooler that pushes the total over the limit and requests fail until the old pod drains. A ReadWriteOnce git PVC on a multi-node cluster hits a similar wall when the surge pod lands on another node. Expose `strategy` in values with the current behaviour as the default, so the default render is byte-identical. Because Helm deep-merges maps, setting only `strategy.type=Recreate` would leave the default rollingUpdate block in place, which the API server rejects; the template therefore renders rollingUpdate only for RollingUpdate. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: alxdr3k <alxdr3k@gmail.com>
🔐 Codex Security Review
|
alxdr3k
marked this pull request as ready for review
September 19, 2026 04:24
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Problem
templates/deployment.yamlhardcodesRollingUpdatewithmaxSurge: 1/maxUnavailable: 0, so every rollout briefly runs the old and new relay pods side by side. Each relay pod holds its own writer, audit and search Postgres pools, so a rollout doubles connection demand for its duration.I hit this self-hosting on a small managed Postgres behind a session-mode pooler with a hard client cap: one pod fits, but during
helm upgradethe surge pod pushed the total over the cap and client requests failed withmax clients reached in session modeuntil the old pod drained (~1 min of 500s). AReadWriteOncegit PVC on a multi-node cluster runs into a similar wall when the surge pod lands on another node.There is currently no way to opt out without post-render patching the chart output.
Change
strategyinvalues.yaml, defaulting to today's behaviour. The default render is byte-identical tomain(diffed the fullhelm templateoutput).--set strategy.type=Recreateleaves the defaultrollingUpdateblock in.Values, and the API server rejectsrollingUpdatealongsideRecreate. The template therefore rendersrollingUpdateonly whentypeisRollingUpdate, so switching the type is a one-line change for users.values.schema.json:strategy.typeis an enum (RollingUpdate|Recreate), so a typo fails at template time.Recreateis the right trade.No chart version bump here, since versions are cut through the
chart-release/*lane.Testing
New
tests/strategy_test.yaml(4 cases): default strategy, customrollingUpdatebounds,Recreatewith onlytypeset dropsrollingUpdate, unknown type is rejected.Ran the same gates as
helm-chart.yml, with the versions it pins (helm v3.16.4, helm-unittest 0.8.2, chart-testing v3.12.0):Also applied the
Recreaterender withkubectl apply --dry-run=serveragainst a real cluster (k3s v1.36) to confirm the API server accepts it, and I'm running the equivalent strategy in production now.