fix(deploy): scale-0->1 the dashboard instead of rollout-restart

The cockpit deploy workflow rollout-restarted deploy/fxhnt-dashboard, which
briefly overlaps two tailscale sessions on the same identity -> session race ->
the external dashboard.fxhnt.ai proxy link goes stale and the cockpit reads
'down' after every deploy (observed 2026-07-15). The dashboard's tailscale
sidecar serves the public URL, so it must be scaled to 0 (clean session
teardown) before a fresh non-overlapping one comes up. git-sync re-pulls src the
same way, so code still updates. dagster keeps rollout restart (no external
proxy). See reference_fxhnt_dashboard_proxy.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
jgrusewski
2026-07-15 16:31:14 +02:00
parent bcf58e703d
commit 516499aa17

View File

@@ -117,8 +117,15 @@ spec:
kubectl apply -f infra/k8s/services/fxhnt-dashboard.yaml
kubectl apply -f infra/k8s/orchestration/dagster.yaml
kubectl apply -f infra/k8s/network-policies/fxhnt-cockpit.yaml
kubectl -n foxhunt rollout restart deploy/fxhnt-dashboard
kubectl -n foxhunt rollout restart deploy/dagster
# Dashboard: scale 0 -> 1, NOT `rollout restart`. Its tailscale sidecar serves dashboard.fxhnt.ai;
# a rolling restart briefly overlaps two tailscale sessions on the same identity -> session race ->
# the external proxy link goes stale and the cockpit reads "down" post-deploy. Scaling to 0 cleanly
# terminates the session before a fresh, non-overlapping one comes up; the git-sync initContainer
# re-pulls src the same way, so code still updates. See reference_fxhnt_dashboard_proxy.
kubectl -n foxhunt scale deploy/fxhnt-dashboard --replicas=0
kubectl -n foxhunt wait --for=delete pod -l app.kubernetes.io/name=fxhnt-dashboard --timeout=90s || true
kubectl -n foxhunt scale deploy/fxhnt-dashboard --replicas=1
kubectl -n foxhunt rollout restart deploy/dagster # dagster has no external-proxy race
kubectl -n foxhunt rollout status deploy/fxhnt-dashboard --timeout=180s
kubectl -n foxhunt rollout status deploy/dagster --timeout=300s
volumeMounts: