You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
sidecar-injector: configurable probes for the gateway container (and a real health check) #522
We run the DocumentDB gateway on our own CloudNativePG operator, using only the cnpg-i-sidecar-injector.documentdb.io plugin to inject the gateway container.
Problem
The injected gateway container has no readiness or liveness probe, and the plugin has no parameter to add one. A gateway that is still running but has stopped serving requests (deadlocked runtime, exhausted pool, stuck on a dead backend) is never restarted, and the pod stays Ready. Clients keep getting routed to it.
#475 adds a fixed tcpSocket liveness probe. That helps when the process is not listening, but it cannot detect a hang. The kernel completes the TCP handshake while the listening socket is open, whatever the gateway process is doing. It is also not configurable, and it adds no readiness signal.
Applied:go, enhancement Project fields suggested: Component api · Priority P2 · Effort L · Status Triage Confidence: 0.78 (llm)
Reasoning
LLM: Requesting configurable liveness/readiness/startup probes for the injected gateway container plus a real health-check endpoint — a meaningful feature gap affecting reliability, spanning plugin parameters, gateway image changes, and log noise, making it a multi-file L-effort P2 enhancement.
If a label is wrong, ping @patty-chow so the rules can be tuned. Issues with component labels are left alone; PR component labels are reconciled from changed paths on every run.
Thanks for the detailed write-up. You're right that a tcpSocket probe can't detect a hung gateway, since the kernel accepts the connection regardless.
Here's the plan:
Gateway liveness probe (feat(sidecar-injector): add a TCP liveness probe to the gateway container #526): adds a tcpSocket liveness probe to the injected gateway container (first check after 10 minutes, then every 10 s, restart after about a minute of failures). It restarts only the gateway container, and there's deliberately no readiness or startup probe: either would make the pod unready, so CNPG would remove the PostgreSQL instance from its Services while the gateway isn't listening.
Configurable probe parameters for the plugin (gatewayLivenessProbe, gatewayReadinessProbe, gatewayStartupProbe, as JSON like gatewayArgs) are a good fit once (2) exists. We'd welcome a PR for this if you're interested.
Until #526 is released, the injected container has no probes. The only option meanwhile is a mutating admission policy (for example Kyverno) that adds a probe to the documentdb-gateway container.
Activity
documentdb-triage-tool commentedon Nov 20, 2026
🤖 Auto-triaged by documentdb-triage-tool.
Applied:
go,enhancementProject fields suggested: Component
api· PriorityP2· EffortL· StatusTriageConfidence: 0.78 (llm)
Reasoning
LLM: Requesting configurable liveness/readiness/startup probes for the injected gateway container plus a real health-check endpoint — a meaningful feature gap affecting reliability, spanning plugin parameters, gateway image changes, and log noise, making it a multi-file L-effort P2 enhancement.
If a label is wrong, ping
@patty-chowso the rules can be tuned. Issues with component labels are left alone; PR component labels are reconciled from changed paths on every run.hossain-rayhan commentedon Nov 23, 2026
Thanks for the detailed write-up. You're right that a tcpSocket probe can't detect a hung gateway, since the kernel accepts the connection regardless.
Here's the plan:
Until #526 is released, the injected container has no probes. The only option meanwhile is a mutating admission policy (for example Kyverno) that adds a probe to the documentdb-gateway container.