[Router] Drain readiness before SIGTERM shutdown so k8s deregisters the pod first (#39016)

Co-authored-by: Kangyan Zhou <kangyan.zhou@radixark.ai>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Kangyan-Zhou
2026-09-16 09:59:26 -07:00
committed by GitHub
co-authored by Kangyan Zhou Claude Opus 5
parent 279339f113
commit 3e03879f68
10 changed files with 1322 additions and 52 deletions
@@ -16,6 +16,9 @@ spec:
app: sgl-router-cluster
spec:
serviceAccountName: sgl-router-cluster
# Must exceed --shutdown-drain-secs plus the time in-flight requests need
# after the pause, or the pod is SIGKILLed mid-drain.
terminationGracePeriodSeconds: 40
containers:
- name: router
image: sgl-router:e2e
@@ -37,6 +40,10 @@ spec:
- "--service-discovery"
- "--selector"
- "app=sglang,cross-ns-test=true"
# Parity with router.yaml so the cross-namespace router exercises
# the same shutdown path; no test asserts on it here.
- "--shutdown-drain-secs"
- "8"
ports:
- containerPort: 8091
name: http