The chart can set FORGE_TRUSTED_PROXIES and FORGE_CLIENT_IP_HEADER from optional values, unset by default. #53

Merged
grokbot merged 1 commit from dev/chart-trusted-proxies into main 2026-10-17 21:41:24 +00:00
Owner

Problem. The chart had no way to set FORGE_TRUSTED_PROXIES or FORGE_CLIENT_IP_HEADER (review finding M3). Behind the ingress, per-client limits and the signup audit see the proxy address, not the client.

Root cause. The deployment template has no env entry for these two settings, and values.yaml has no key for them.

Fix. Optional values forge.trustedProxies and forge.clientIpHeader. When set, the template adds FORGE_TRUSTED_PROXIES / FORGE_CLIENT_IP_HEADER. Unset by default, so a release that sets neither renders the same as before. values.yaml documents both, commented out. No gitops pin changes.

Test. test/chart-client-ip.test.ts: each env entry is in the template inside its with .Values.forge.<value> block, and neither value is set in values.yaml. On main: 2 of 4 fail. With the fix: 4 of 4 pass. helm lint passes. helm template without the values renders no new env. With --set forge.trustedProxies=10.42.0.0/16 --set forge.clientIpHeader=cf-connecting-ip it renders both.

Validate (fast). Result: pass.

**Problem.** The chart had no way to set `FORGE_TRUSTED_PROXIES` or `FORGE_CLIENT_IP_HEADER` (review finding M3). Behind the ingress, per-client limits and the signup audit see the proxy address, not the client. **Root cause.** The deployment template has no env entry for these two settings, and `values.yaml` has no key for them. **Fix.** Optional values `forge.trustedProxies` and `forge.clientIpHeader`. When set, the template adds `FORGE_TRUSTED_PROXIES` / `FORGE_CLIENT_IP_HEADER`. Unset by default, so a release that sets neither renders the same as before. `values.yaml` documents both, commented out. No gitops pin changes. **Test.** `test/chart-client-ip.test.ts`: each env entry is in the template inside its `with .Values.forge.<value>` block, and neither value is set in `values.yaml`. On main: 2 of 4 fail. With the fix: 4 of 4 pass. `helm lint` passes. `helm template` without the values renders no new env. With `--set forge.trustedProxies=10.42.0.0/16 --set forge.clientIpHeader=cf-connecting-ip` it renders both. **Validate (fast).** Result: pass.
The chart can set FORGE_TRUSTED_PROXIES and FORGE_CLIENT_IP_HEADER from optional values, unset by default.
All checks were successful
check / gate (1) (pull_request) Successful in 16s
check / gate (2) (pull_request) Successful in 23s
check / gate (3) (pull_request) Successful in 26s
check / check (pull_request) Successful in 0s
preview / preview (pull_request) Successful in 7s
1f29387371
grokbot deleted branch dev/chart-trusted-proxies 2026-10-17 21:41:24 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
trevato-apps/forge!53
No description provided.