Skip to content

feat(worker-pool): support per-pool Deployment strategy (Recreate for heavy pools) - #49

Merged
peshence merged 1 commit into
mainfrom
feat/mars-heavy-recreate-strategy
Sep 3, 2026
Merged

peshence merged 1 commit into
mainfrom
feat/mars-heavy-recreate-strategy

Conversation

@peshence

@peshence peshence commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Why

Worker pools with large per-pod resource requests (e.g. heavy MARS
workers) run the risk of getting stuck mid-rollout under the default
RollingUpdate strategy: Kubernetes needs to schedule the surge pod
alongside the old one before the old one terminates, and if the
cluster can't fit both at once, the rollout hangs until someone
manually deletes the old pod to free capacity.

What

  • Add an optional strategy field to the worker pool schema
    (templates/worker-pool.yaml), passed through verbatim to the
    Deployment's spec.strategy. Pools that don't set it keep the
    Kubernetes default (RollingUpdate) — no behavior change for
    existing pools.
  • When type: Recreate is set, rollingUpdate is explicitly nulled
    out in the rendered manifest, since the two fields are mutually
    exclusive and an existing Deployment may still carry a
    rollingUpdate value from a prior RollingUpdate-strategy release
    (confirmed necessary during testing below).
  • Documented the field with an example in values.yaml.
  • Bumped chart to 2.1.13.

Verification

Built and pushed a throwaway pre-release chart, deployed it to
lumi-test with strategy.type: Recreate set on the mars-heavy pool
(see companion polytope-config PR), then triggered a rollout
(kubectl rollout restart):

  • Old pod terminated fully before the new pod was created (no
    surge pod, no double resource reservation).
  • Rollout completed and reported successfully rolled out without any
    manual intervention.
  • Reverted the test deployment back to the pinned chart afterwards;
    cluster state matches pre-test baseline.

Worker pools with large per-pod resource requests (e.g. heavy MARS
workers) can get stuck mid-rollout under the default RollingUpdate
strategy: the surge pod needs to be scheduled alongside the old one
before it terminates, and if the cluster can't fit both at once the
rollout hangs until someone manually deletes the old pod.

Add an optional `strategy` field to the worker pool schema that is
passed through verbatim to the Deployment's spec.strategy (values
without it keep the RollingUpdate default). When type is Recreate,
rollingUpdate is explicitly nulled out since the two are mutually
exclusive and an existing Deployment may still carry a rollingUpdate
value from a prior release.

Verified against lumi-test: with strategy.type=Recreate set for the
mars-heavy pool, a rollout terminates the old pod before starting the
new one and completes unattended, instead of getting stuck.
@peshence
peshence merged commit 4111928 into main Sep 3, 2026
4 checks passed
@peshence
peshence deleted the feat/mars-heavy-recreate-strategy branch September 3, 2026 00:37
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.

1 participant