Skip to content

Commit f926cfa

Browse files
Add outbound HTTP proxy example override (#962)
Adds an override example to show customers how to use HTTP_PROXY, HTTPS_PROXY, and NO_PROXY, environment variables, as per [HTTP proxy configuration](https://sourcegraph.com/docs/self-hosted/private-network#http-proxy-configuration). Also: - Docker Compose: sourcegraph/deploy-sourcegraph-docker#1432 - Docs: sourcegraph/docs#2091 ### Checklist - [x] Follow the [manual testing process](https://github.com/sourcegraph/deploy-sourcegraph-helm/blob/main/TEST.md) (example only, see test plan) - [x] Update [changelog](https://github.com/sourcegraph/deploy-sourcegraph-helm/blob/main/charts/sourcegraph/CHANGELOG.md) - [x] Update [Kubernetes update doc](https://docs.sourcegraph.com/admin/updates/kubernetes) (not needed, example only) ### Test plan `helm template` with the override renders, the three vars land on exactly the `frontend` and `worker` containers with chart defaults intact, and `helm lint` passes. No `values.yaml` change, so helm-docs output is unchanged. Not run against a live proxy. --------- Co-authored-by: Amp <amp@ampcode.com>
1 parent 5ae7c82 commit f926cfa

2 files changed

Lines changed: 56 additions & 0 deletions

File tree

‎charts/sourcegraph/CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Use `**BREAKING**:` to denote a breaking change
88

99
## Unreleased
1010

11+
- Added an `outbound-http-proxy` example, which routes outbound traffic from frontend and worker through an HTTP proxy with `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY`
1112
- Fixed the `codeintel-db` PersistentVolumeClaim being renamed by `codeIntelDB.name`, which left the StatefulSet pointing at a `codeintel-db` claim that no longer existed and stuck the pod in `Pending`. The PVC is now always named `codeintel-db`, matching the other components and the documented behaviour of `*.name`. If you worked around this by creating a `codeintel-db` PVC by hand, label it `app.kubernetes.io/managed-by: Helm` and annotate it with `meta.helm.sh/release-name` and `meta.helm.sh/release-namespace` before upgrading so Helm can adopt it. [#612](https://github.com/sourcegraph/deploy-sourcegraph-helm/issues/612)
1213
- Added opt-in Redis config management through `redisCache.config.enabled` and `redisStore.config.enabled` (both default to `false`). Default deployments retain their image configs, custom mounts, authentication, and memory settings. When enabled, the chart mounts `/etc/redis/redis.conf` and supports `existingConfig`, `maxmemory`, `maxmemoryRatio`, `maxmemoryPolicy`, and `additionalConfig`. See [Enabling Redis config management](README.md#enabling-redis-config-management) before opting in, especially when using custom images or Secret-mounted configs.
1314
- With Redis config management enabled, the chart sizes `maxmemory` at 75% of `resources.limits.memory` to leave room for overhead; this reduces, but does not eliminate, OOM risk. Ratios must be greater than 0 and less than 1. Auto-sizing is skipped in local development mode or when the limit is absent or unrecognised. At the default 7Gi limit, opting in lowers the effective cap from 6GiB to 5.25GiB: `redis-cache` evicts earlier, but `redis-store` uses `noeviction`, so its write-error ceiling drops too. Set `redisStore.config.maxmemory: 6gb` to keep the old ceiling if the pod has sufficient memory.
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Override file for routing outbound HTTP(S) traffic through an HTTP proxy
2+
# ex. telemetry, update checks, and license verification to services.sourcegraph.com,
3+
# and connections to code hosts, auth providers, and LLM providers outside your private network
4+
# See https://sourcegraph.com/docs/self-hosted/private-network#http-proxy-configuration
5+
6+
# Reusable block of environment variables, for services which initiate outbound connections
7+
proxyEnvVars: &proxy-env-vars
8+
HTTP_PROXY:
9+
value: http://proxy.example.com:8080
10+
HTTPS_PROXY:
11+
value: http://proxy.example.com:8080
12+
# Skip the proxy for local traffic
13+
# Add your internal code hosts, auth providers, image registries, etc. which are reachable without the proxy
14+
# If pods fail their readiness or health checks after adding the proxy, also add the cluster's pod and service CIDR ranges, ex. 10.10.0.0/16,10.20.0.0/16
15+
# Each line needs a trailing comma, as YAML folds these lines into one line, separated by spaces
16+
NO_PROXY:
17+
value: >-
18+
blobstore,
19+
cloud-sql-proxy,
20+
codeinsights-db,
21+
codeintel-db,
22+
gitserver,
23+
grafana,
24+
indexed-search,
25+
indexed-search-indexer,
26+
jaeger-query,
27+
pgsql,
28+
precise-code-intel-worker,
29+
prometheus,
30+
redis-cache,
31+
redis-store,
32+
searcher,
33+
sourcegraph-frontend,
34+
sourcegraph-frontend-internal,
35+
syntect-server,
36+
worker,
37+
worker-executors,
38+
localhost,
39+
127.0.0.1,
40+
.svc,
41+
.svc.cluster.local,
42+
kubernetes.default.svc
43+
44+
frontend:
45+
env:
46+
<<: *proxy-env-vars
47+
48+
# Uncomment if connections to code hosts outside your private network need to use the proxy
49+
# gitserver:
50+
# env:
51+
# <<: *proxy-env-vars
52+
53+
worker:
54+
env:
55+
<<: *proxy-env-vars

0 commit comments

Comments
 (0)