Skip to content

Restore env vars in secrets for rolling update compatibility#226

Closed
RafaelPo wants to merge 1 commit intomainfrom
fix/mcp-staging-deploy
Closed

Restore env vars in secrets for rolling update compatibility#226
RafaelPo wants to merge 1 commit intomainfrom
fix/mcp-staging-deploy

Conversation

@RafaelPo
Copy link
Contributor

Summary

  • Adds SUPABASE_URL, REDIS_SENTINEL_ENDPOINTS, and REDIS_SENTINEL_MASTER_NAME back to SOPS secrets
  • These were moved to plain values.yaml env vars in PR Move non-secret config from SOPS secrets to plain env vars #219, but during a rolling update the K8s Secret is replaced first — the old pod loses those vars from envFrom and crashes before the new pod (which has them as env) is ready
  • Having them in both places is safe: explicit env takes precedence over envFrom

Root cause

RuntimeError: HTTP auth mode requires these environment variables: SUPABASE_URL

Old pod gets restarted during rolling update → picks up new Secret (without SUPABASE_URL) → crashes → deployment times out → rollback

Test plan

  • Merge and deploy to staging
  • Pod starts without SUPABASE_URL error
  • Health check passes

🤖 Generated with Claude Code

PR #219 moved SUPABASE_URL, REDIS_SENTINEL_ENDPOINTS, and
REDIS_SENTINEL_MASTER_NAME from secrets to plain env vars in values.yaml.
During a rolling update, the K8s Secret is replaced first (removing those
vars), causing the old pod to crash before the new pod is ready — breaking
the deployment.

Add these vars back to both staging and production SOPS files so both old
and new pods can find them during the transition.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@RafaelPo RafaelPo closed this Feb 25, 2026
@RafaelPo RafaelPo deleted the fix/mcp-staging-deploy branch February 25, 2026 14:47
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