nginx: add Cognito buffer directives to chart ConfigMap (16k)#82
nginx: add Cognito buffer directives to chart ConfigMap (16k)#82elamaran11 wants to merge 2 commits into
Conversation
The Helm web-configmap was missing the buffer settings that exist in docker/nginx.conf, so the ConfigMap mount overrode the baked image config and nginx ran with the 4k/8k defaults. Once a Cognito session accumulated enough state (refreshed tokens, multiple logins) the request headers crossed the limit and nginx returned "400 Bad Request / Request Header Or Cookie Too Large". Add the buffer directives to the chart template and bump both files from 16k to 32k for headroom against federated IdP claims. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Quick context on why this is still needed despite #45: PR #45 added the buffer directives to The ConfigMap template ( This PR adds the directives to the ConfigMap template — the place that actually reaches the running nginx. After applying: That's why the 400s recurred a week after #45 merged — the fix never reached the running nginx. |
Drop the 32k bump and keep parity with the values added in #45. The fix that matters is adding the directives to the chart's ConfigMap template — it mounts at /etc/nginx/conf.d/default.conf via subPath and overrides the baked image config, so the buffer settings in docker/nginx.conf alone never reach the running nginx. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
Add
proxy_buffer_size,proxy_buffers, andlarge_client_header_bufferstohelm/accelbench/templates/web-configmap.yamlat 16k, matching the values already indocker/nginx.conffrom #45.Why
PR #45 added the buffer directives to
docker/nginx.conf— the config baked into the web image. But the chart mounts a ConfigMap at/etc/nginx/conf.d/default.confvia asubPathmount inhelm/accelbench/templates/web-deployment.yaml:32-34, which overrides the baked file. At runtime, nginx reads the ConfigMap version, which had no buffer directives → defaults →400 Bad Request — Request Header Or Cookie Too Largeonce Cognito sessions accumulated state.Confirmed before this PR:
After applying the chart change to the live cluster:
That's why the 400s recurred a week after #45 merged — the fix never reached the running nginx.
Test plan
helm upgrade accelbench helm/accelbench -n accelbench --reuse-valuessucceedskubectl rollout restart deployment/accelbench-webrolls cleanly (2/2 ready)kubectl execinto a new web pod shows the buffer directives in the live nginx configcurl https://modelbench.elamaras.people.aws.dev/returns 200🤖 Generated with Claude Code