Skip to content

Commit ee2d004

Browse files
committed
docs(helm): spell out the egress rule external datastores need
The default NetworkPolicy allows 443 plus the bundled Postgres and Redis by pod selector. Anything you run outside the chart on another port needs its own rule, which is easiest to miss when REDIS_URL arrives via a Secret the chart cannot inspect. Adds a copyable example to the production checklist and the security guide.
1 parent d2f7e2c commit ee2d004

2 files changed

Lines changed: 37 additions & 1 deletion

File tree

apps/docs/content/docs/en/platform/self-hosting/security.mdx

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,27 @@ networkPolicy:
6363
```
6464
</Callout>
6565

66-
The policy already allows HTTPS (443) egress to everything except the metadata CIDRs, which covers model provider APIs, integration APIs, and cloud object-storage endpoints. What it does **not** cover is anything on a non-443 port outside the namespace — most commonly **Redis** and a **managed Postgres**. Add explicit rules for those under `networkPolicy.egress`.
66+
The policy already allows HTTPS (443) egress to everything except the metadata CIDRs, which covers model provider APIs, integration APIs, and cloud object-storage endpoints. It also allows the bundled Postgres and Redis by pod selector.
67+
68+
What it does **not** cover is any datastore you run outside the chart — a managed Postgres or Redis on a non-443 port. Add a rule for each:
69+
70+
```yaml
71+
networkPolicy:
72+
enabled: true
73+
egress:
74+
- to:
75+
- ipBlock:
76+
cidr: 10.0.0.0/16 # your VPC / managed-service subnet
77+
ports:
78+
- protocol: TCP
79+
port: 6379 # managed Redis
80+
- protocol: TCP
81+
port: 5432 # managed Postgres
82+
```
83+
84+
<Callout type="warn">
85+
This applies even when `REDIS_URL` reaches the pod through a Secret rather than `values.yaml` — the chart cannot see the host, so it cannot generate the rule. A deployment that accepts the URL but has no matching egress rule will fail to reach Redis with `networkPolicy.enabled: true`.
86+
</Callout>
6787

6888
### Pod Security Standards
6989

helm/sim/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,22 @@ Before installing in production, confirm each of the following:
219219
* **Secrets management** — provide secrets via External Secrets Operator (ESO) or pre-created Kubernetes Secrets. Never commit secrets to `values.yaml`.
220220
* **TLS / Ingress** — set the `cert-manager.io/cluster-issuer` annotation on the ingress and tune `proxy-body-size` / `proxy-read-timeout` for your workload. See commented examples in `values.yaml`.
221221
* **Network policy egress** — review `networkPolicy.egressExceptCidrs`. Defaults block cloud metadata endpoints (`169.254.169.254/32`, `169.254.170.2/32`); add your cluster's API server CIDR for stronger isolation. Custom egress rules go in `networkPolicy.egress` (a list).
222+
223+
**Every datastore you run outside the chart needs its own egress rule.** The default policy allows HTTPS (443) plus the bundled Postgres and Redis by pod selector — nothing else on a non-443 port. So a managed Postgres, a managed Redis, or any `REDIS_URL` you supply through a Secret is reachable only if you add a rule for it. This bites hardest when the URL comes from a Secret, because the chart cannot see the host and cannot generate the rule for you:
224+
225+
```yaml
226+
networkPolicy:
227+
enabled: true
228+
egress:
229+
- to:
230+
- ipBlock:
231+
cidr: 10.0.0.0/16 # your VPC / managed-service subnet
232+
ports:
233+
- protocol: TCP
234+
port: 6379 # managed Redis
235+
- protocol: TCP
236+
port: 5432 # managed Postgres
237+
```
222238
* **Network policy ingress** — `networkPolicy.ingressFrom` defaults to `[{}]` (an empty peer selector), which allows ingress traffic from **any pod in the cluster**, not just your ingress controller. This is a deliberate simple default, not a locked-down one. On a shared or multi-tenant cluster, scope it down, e.g. to the ingress-nginx namespace:
223239
```yaml
224240
networkPolicy:

0 commit comments

Comments
 (0)