Fix staging deploy: startup probe and disable network policy#230
Merged
Conversation
Redis Sentinel discovery can take >5s on cold start, causing the liveness probe (5s timeout) to kill the pod before it establishes a connection. Add a startup probe (60s budget) to protect the boot phase, and increase liveness timeout to 10s with higher failure threshold. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
GKE assigns ClusterIPs from a non-RFC1918 range (34.118.x.x). The network policy's DNS egress rule uses podSelector for kube-dns pods, but GKE evaluates egress against the ClusterIP (34.118.224.10), not the pod IP. This blocks all DNS resolution from the MCP pods. Disable until we can properly handle GKE's service CIDR in egress rules (may require CIDR-based DNS rules instead of podSelector). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
Root cause
The network policy's DNS egress rule uses
podSelectorfor kube-dns, but GKE evaluates egress against the ClusterIP (34.118.224.10), not the pod IP. This blocked all DNS resolution, preventing Redis Sentinel discovery, causing/healthto hang and liveness probes to kill the pod.Changes
deployment.yaml: AddstartupProbe(12 attempts x 5s = 60s), increase livenessinitialDelaySecondsto 30s,failureThresholdto 5, timeouts to 10svalues.yaml:networkPolicy.enabled: false(wastrue)Deployed
Already deployed to staging from this branch — pod is 1/1 Running with health checks passing.
Test plan
/healthreturns 200🤖 Generated with Claude Code