Skip to content

feat: make podManagementPolicy configurable - #13

Open
gerardosabetta wants to merge 1 commit into
hackthebox:mainfrom
gerardosabetta:claude/typesense-helm-issue-5-178144
Open

gerardosabetta wants to merge 1 commit into
hackthebox:mainfrom
gerardosabetta:claude/typesense-helm-issue-5-178144

Conversation

@gerardosabetta

Copy link
Copy Markdown

Closes #5

What

Adds a podManagementPolicy value (Parallel or OrderedReady) and uses it in the StatefulSet instead of the hardcoded Parallel.

Why the default stays Parallel

The issue proposes switching the default to OrderedReady. This PR makes it opt-in instead:

  • podManagementPolicy is immutable on an existing StatefulSet, so a new default would make helm upgrade fail for every current install.
  • With OrderedReady, pod N only starts after pod N-1 is Ready. A single Typesense node has no Raft quorum, so with the default /health readiness probe a fresh multi-node install is expected to stall on pod 0. This is reasoned from the chart, not reproduced in a cluster.
  • Liveness probe failures restart the container in place; the pod management policy does not affect them.

Users who want ordered scaling can set podManagementPolicy=OrderedReady together with readinessProbe.type=tcpSocket. The value description documents this and the immutability caveat.

Changes

  • templates/statefulset.yaml: read the policy from values
  • values.yaml, values.schema.json: new value with an enum constraint
  • README.md, values.md: documented (edited by hand in the helm-docs format)
  • tests/statefulset_test.yaml: default, override and invalid-value cases

Testing

  • helm lint . passes
  • helm unittest .: 97 tests pass across 9 suites (run with the helmunittest/helm-unittest:4.3.0-1.2.1 image)
  • helm template renders Parallel by default and OrderedReady when set; an unknown value is rejected by the schema

No chart version bump or changelog entry is included.

🤖 Generated with Claude Code

Expose the StatefulSet podManagementPolicy as a chart value restricted to
Parallel or OrderedReady. The default stays Parallel: the field is immutable
on an existing StatefulSet, and OrderedReady cannot bootstrap a fresh
multi-node cluster with the default /health readiness probe.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@gerardosabetta
gerardosabetta requested a review from a team as a code owner November 10, 2026 01:02
@gerardosabetta

Copy link
Copy Markdown
Author

Slide walkthrough of this change (7 slides): why the policy is now a value, why the default stays Parallel, and what was verified.

Slide 1: Pod management policy is now a chart value

Slide 2: The policy was fixed in the template, with no way to change it

Slide 3: The default stays Parallel, and OrderedReady is opt-in

Slide 4: One template line, one new value

Slide 5: What each value does

Slide 6: What was checked

Slide 7: What is left for the reviewer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

podManagementPolicy should be OrderedReady for safer cluster recovery

1 participant