Repository navigation
feat(worker-pool): support per-pool Deployment strategy (Recreate for heavy pools) - #49
Merged
Merged
Conversation
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.
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.
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
RollingUpdatestrategy: Kubernetes needs to schedule the surge podalongside 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
strategyfield to the worker pool schema(
templates/worker-pool.yaml), passed through verbatim to theDeployment's
spec.strategy. Pools that don't set it keep theKubernetes default (
RollingUpdate) — no behavior change forexisting pools.
type: Recreateis set,rollingUpdateis explicitly nulledout in the rendered manifest, since the two fields are mutually
exclusive and an existing Deployment may still carry a
rollingUpdatevalue from a prior RollingUpdate-strategy release(confirmed necessary during testing below).
values.yaml.Verification
Built and pushed a throwaway pre-release chart, deployed it to
lumi-test with
strategy.type: Recreateset on themars-heavypool(see companion polytope-config PR), then triggered a rollout
(
kubectl rollout restart):surge pod, no double resource reservation).
successfully rolled outwithout anymanual intervention.
cluster state matches pre-test baseline.