[SHOT-247] fix: Disable proxy for container healthchecks - #8170
[SHOT-247] fix: Disable proxy for container healthchecks#8170keithhubner wants to merge 2 commits into
Conversation
BusyBox wget honours HTTP_PROXY/HTTPS_PROXY but does not implement NO_PROXY. Since #7858 switched the healthchecks from curl to wget on these Alpine images, deployments behind a forward proxy have their loopback probe routed through the proxy, marking containers unhealthy. Pass -Y off so the healthcheck always connects directly. BusyBox does not accept the GNU --no-proxy spelling, so -Y off is the portable form here.
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE This PR adds I also checked for healthcheck overrides that would need a matching update and found none — no Code Review DetailsNo blocking or non-blocking findings. The PR description documents the regression source, the BusyBox vs. GNU |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8170 +/- ##
=======================================
Coverage 63.04% 63.04%
=======================================
Files 2315 2315
Lines 100510 100510
Branches 9043 9043
=======================================
+ Hits 63364 63365 +1
+ Misses 34957 34956 -1
Partials 2189 2189 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
🎟️ Tracking
https://bitwarden.atlassian.net/browse/SHOT-247
Regression from #7858 (SHOT-184), first shipped in 2026.7.x.
📔 Objective
Container healthchecks fail on self-hosted deployments behind a forward proxy.
The service images are Alpine-based, so
wgetresolves to BusyBox wget. BusyBox wget honoursHTTP_PROXY/HTTPS_PROXYbut does not implementNO_PROXYat all. When proxy variables are present in the container runtime environment (e.g. via the Docker clientconfig.jsonproxiesblock), the healthcheck's loopback probe is routed through the proxy and fails, marking the container unhealthy.curl, used before #7858, honouredNO_PROXY, so this worked prior to 2026.7.x.This adds
-Y offto every wget healthcheck so the loopback probe always connects directly, keeping the image-size/CVE benefit of having dropped curl.Reproduced and verified against both base images (BusyBox v1.37.0):
Note that BusyBox rejects the GNU
--no-proxyspelling (wget: unrecognized option: no-proxy), so-Y offis the portable form here.Covers all 13 wget healthcheck invocations across 12 Dockerfiles:
/alive— Api, Admin, Billing, Events, EventsProcessor, Notifications, Scim, Sso, Attachments/.well-known/openid-configuration/google.com/icon.pnghttps://localhost:8443primary and thehttp://localhost:8080fallbackOut of scope:
util/SeederApiis Debian-based with real curl, andutil/MsSqlusessqlcmd— neither is affected. Helm/k8s deployments are also unaffected, since kubelet performs the probing rather than the container.