fix(helm): the router Deployment's progress deadline covers the engine's bring-up now that /readiness follows the engine #4286
<!-- coderabbit-ai-generated:v1 -->
<!-- This is an auto-generated comment: summarize by coderabbit.ai -->
<!-- This is an auto-generated comment: rate limited by coderabbit.ai -->
[!WARNING]
## Review limit reached
> Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.
> Next included review available in 3 minutes.
> Check out review usage here.
> <details>
<summary><strong>View limit details</strong></summary>
<dl>
<dd>
> Limit details: You’ve used all 4 included reviews currently available.
> Learn how review limits work.
> Review configuration:
> <details>
<summary><strong>⚙️ Run configuration</strong></summary>
<dl>
<dd>
> - Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Organization UI
- Review profile: CHILL
- Plan: Team
- Run ID: 6adc068d-53a6-428c-bf89-b00e155cb768> </dd>
</dl>
</details>
> <details>
<summary><strong>📥 Commits</strong></summary>
<dl>
<dd>
> Reviewing files that changed from the base of the PR and between 0474fbdeb4274d57be30351a718934e073f9bc46 and ae0639959ee48197c363576aa5a61d3df65aa1ec.
> </dd>
</dl>
</details>
> <details>
<summary><strong>📒 Files selected for processing: 5</strong></summary>
<dl>
<dd>
> deploy/helm/smg/README.md deploy/helm/smg/templates/deployment-router.yaml deploy/helm/smg/templates/deployment-worker.yaml deploy/helm/smg/values.schema.json* deploy/helm/smg/values.yaml> </dd>
</dl>
</details>
> </dd>
</dl>
</details>
<!-- end of auto-generated comment: rate limited by coderabbit.ai -->
<!-- autopilot:start -->
<!-- autopilot:end -->
<!-- tips_start -->
<sub>Comment @coderabbitai help to get the list of available commands.</sub>
<!-- tips_end -->
<!-- claude-pr-template-check -->
👋 The PR description doesn't fully follow
PULL_REQUEST_TEMPLATE.md:
## Description### Problem### Solution## Changes## Test PlanPlease update the PR description so reviewers have the context they need.
🟡 Nit: progressDeadlineSeconds is hardcoded at 1800 and has no values knob. The README (README.md:180) tells users who raise --worker-startup-timeout-secs through router.extraArgs to raise "the rollout deadline with it". With this template they can't do that without a post-renderer or a fork of the chart. For example, someone who sets --worker-startup-timeout-secs 14400 for the 37-minute gang in the PR description still gets ProgressDeadlineExceeded at 30 min.
Also, 1800 equals the gateway's bound exactly, with no margin. The Deployment's progress clock starts at pod creation, so it also counts image pull, container start, the final poll (up to 30 s), tokenizer registration and the readiness probe's 10 s period. An engine that turns healthy near the end of the gateway's window can make the pod Ready after the deadline has already passed.
Suggestion: add router.progressDeadlineSeconds to values.yaml, defaulting to 1800 plus a margin (for example 1920), and render it here:
progressDeadlineSeconds: {{ .Values.router.progressDeadlineSeconds }}
Then point the README bullet at that value.
🟡 Nit: This section now says loads take "tens of minutes" and tells users to size the startup probe past the longest load. But the chart's worker Deployments (templates/deployment-worker.yaml) still use the Kubernetes default progressDeadlineSeconds of 600. If a user follows this advice and the worker takes more than 10 minutes to become Ready, kubectl rollout status, Argo CD and Flux report the worker Deployment as failed, which is the same false failure this PR fixes for the router. helm --wait waits on that Deployment too.
Either set a progress deadline on the worker Deployment as well (ideally derived from the startup probe budget, or exposed per worker), or add a line here that the worker Deployment's progress deadline also has to cover the load.
Small Helm-only change that is correct as written. The defaults it cites match the gateway CLI (--worker-startup-timeout-secs 1800, --worker-startup-check-interval 30). The 'discovered workers retry on a later pass' claim matches service_discovery/reconciler.rs. The Deployment-only guard keeps the StatefulSet (mesh) render valid. Two 🟡 nits inline: the router progress deadline has no values knob, and worker Deployments keep the 600 s default.
Taken, both points. The next push adds router.progressDeadlineSeconds to values.yaml (and the schema), rendered here, with a default of 1920: the gateway's own bound (1800 s, --worker-startup-timeout-secs) plus the chart's own tail after it (one start-up poll of 30 s, the readiness probe's 10 s period, the registration) and a margin for the image pull and container start, which run on the rollout's clock before the gateway's. The README bullet then names the value next to --worker-startup-timeout-secs instead of "the rollout deadline".
Right, the same false failure on the worker side. The next push gives the worker Deployment a progress deadline that follows its startup probe's budget: initialDelaySeconds + failureThreshold * periodSeconds + 120, never below the Kubernetes default of 600 (the default probe, 60 + 30 x 10 = 360 s, keeps 600; a probe sized for a half-hour load raises it with it), with a per-worker progressDeadlineSeconds override; the Startup Probes paragraph says so.
Pushed: router.progressDeadlineSeconds is a values knob (default 1920, rendered on the router Deployment, in the schema), the worker Deployment's deadline follows its startup probe's budget, and the README names both; the branch is rebased onto the current main (its README gained the dashboard and alerts section next to this one).
Pushed with the knob: the worker Deployment's progress deadline is its startup probe's budget (initialDelaySeconds + failureThreshold x periodSeconds + 120, a 600 floor, a per-worker override), rendered and checked by the chart's examples; the README's Readiness Deadlines section states the rule.
🟡 Nit: The 120 s added on top of the probe budget is the only slack for everything that runs on the rollout's clock before the startup probe's clock starts. For a GPU worker, 120 s is often not enough. The progress timer starts when the new ReplicaSet scales up. It then also counts:
Pending while a cluster autoscaler or Karpenter brings up a GPU node, often several minutes;vllm/vllm-openai and the SGLang images are around 10 GB);The probe's own timer starts only after all of that.
Example: the README's own sized probe (initialDelaySeconds: 180, failureThreshold: 60) renders 900. If that worker lands on a freshly provisioned node with a 4-minute pull and loads in 11 minutes, which is inside its 780 s budget, it becomes Ready at about 15 minutes. By then the rollout was already marked ProgressDeadlineExceeded at 15:00 minus the pull overrun. Argo CD, Flux and kubectl rollout status then report it as failed. That is the false failure this PR is meant to remove. The 600 s floor hides this for the default probe, but not for any probe sized for a long load.
Suggestion: use a larger default margin, for example add $budget 600. It costs nothing when the rollout is healthy, because the deadline only affects reporting. Alternatively, keep 120 s and add a sentence in the README's Startup Probes paragraph: on autoscaled GPU node pools or with cold image caches, raise progressDeadlineSeconds on the worker entry.
Agreed on the arithmetic: the rollout's clock runs through the node's provisioning, the pull and the container start before the probe's does, and 120 s covers only the warm case. The per-worker progressDeadlineSeconds is the override for autoscaled pools and cold caches today, but the default should not need it for a sized probe. This pull request is in the merge queue, so the change goes as a follow-up right after it: the worker margin becomes 600 s over the probe's budget (add $budget 600, the 600 floor kept) and the README's Startup Probes paragraph names the knob for autoscaled pools and cold image caches. Noted in the description under Owed.
Follow-up for the review note on the worker Deployment's margin: https://github.com/smg-project/smg/pull/4364 raises it to 600 s over the startup probe's budget and names the per-worker override in the README.
hello-alexmcc
Owed
A follow-up right after this merges: the worker Deployment's default margin over its startup probe's budget grows from 120 s to 600 s (the rollout's clock also counts the node's provisioning, the image pull and the container start, which a 120 s margin covers only on a warm node), and the README's Startup Probes paragraph names the per-worker
progressDeadlineSecondsfor autoscaled pools and cold image caches.Release note
The Helm chart's router Deployment gets a rollout progress deadline (
router.progressDeadlineSeconds, 1920 s by default: the gateway's own worker start-up bound of 1800 s plus the chart's tail after it and a margin for the image pull) instead of the Kubernetes default, 600 s:/readinessanswers 503 until a worker's engine reports healthy, tens of minutes for a large checkpoint, and a router waiting for its engine is no longer reported as a failed rollout. The chart README names every deadline that must cover the engine's bring-up (the progress deadline,helm --wait --timeout, a serving controller's router deadline,--worker-startup-timeout-secs) and why none of them is a startup probe on the router. A worker Deployment's progress deadline follows its startup probe's budget (initialDelaySeconds + failureThreshold * periodSecondsplus 120 s, never below 600 s;progressDeadlineSecondson the worker entry overrides it), so a worker still loading within the budget the chart already sizes is not reported as a failed rollout either.Numbers
| metric | before | after | setup |
| --- | --- | --- | --- |
| router Deployment
progressDeadlineSecondsin the rendered chart | field absent: the Kubernetes default, 600 s | 1920 s by default;--set router.progressDeadlineSeconds=3600renders 3600 |helm template smg deploy/helm/smg --set 'router.workerUrls={grpc://engine:50051}'; the mesh example renders the router as a StatefulSet, which has no such field, before and after || worker Deployment
progressDeadlineSecondsin the rendered chart | field absent: 600 s, whatever the startup probe's budget | 600 s with the default probe (60 + 30 x 10 s = 360 s of budget); 900 s for a probe of 180 + 60 x 10 s; a worker entry'sprogressDeadlineSeconds: 1234renders 1234 |helm templatewith thewith-vllm-httpandwith-mesh-haexamples and with a values file of three workers (the long probe, the override, a 40 s probe that keeps the 600 s floor) ||
helm lint, examples rendered | 1 chart, 0 failed; 10 of 10 | 1 chart, 0 failed; 10 of 10 |helm lint deploy/helm/smg;helm templatewith each file underdeploy/helm/smg/examples/||
/readinessfirst 200 from the gateway's launch, gateway defaults, the engine not healthy until +70 s | +92 s: 22 s after the engine (the 30 s start-up poll found it at +90 s, the tokenizer registered 2 s later) | same: the gateway is unchanged, the deadline is sized to this | CPU, dev build: one gRPC mock engine (cratemock-worker) held not-serving through its admin API,--worker-urls grpc://127.0.0.1:<port> --policy random; a prober reads/liveness,/health,/readinessonce a second for 150 s ||
/livenessand/healthfirst 200 from the gateway's launch | +1 s (+0 s: listener not yet bound) | same | same cell; a liveness deadline never fires, only a readiness deadline can ||
/readinessfirst 200,--worker-startup-check-interval 1| +72 s: 2 s after the engine | same | same cell with the one flag, 120 s ||
/readinesswhen the engine turns healthy after--worker-startup-timeout-secs(20 s, poll 2 s, engine healthy at +45 s) | 503 for all 130 s: nine polls to +17 s, the registration gave up at +19 s, the worker never registered | same: the README names this bound as part of the budget (router.extraArgs) | same cell, 130 s || a router whose engine needs 37 min under a 30 min readiness deadline on the router | the deadline fired: the serving controller declared the router failed, relocated it with a node anti-affinity that could not schedule under a single-node pin, and the service had no endpoint although the router became healthy at 37 min | the same service came up and served once the router had the engine's 4 h budget; the chart's Deployment deadline now covers a 30 min engine and the README names the rule for every other deadline | live bring-up of a two-node tensor-parallel engine behind one router, two placements |