You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(chart): check ingress-nginx body size against the app limit #785
foca-common leaves controller annotations to the app charts since 0.2.0
(#436, #440), so each app sets nginx.ingress.kubernetes.io/proxy-body-size
in <valuesKey>.ingress.annotations itself. Nothing checks that it allows
the app's limit (config.server.max_content_length): with a lower value,
ingress-nginx rejects the bodies in between with its own 413 page instead
of the app's problem details. The docs ask operators to keep the two in step
("keep it at or above the app's limit").
proWES's limit (10 MiB) is above ingress-nginx's default (1 MiB), so
prowes#159 sets the annotation to 10m by default and adds an app-level
check (prowes.checkProxyBodySize in deployment/templates/_helpers.tpl)
that fails rendering if the annotation is below foca-common.maxContentLength. proTES, cloud-registry and trs-filer could
use the same check, but would have to copy it.
Proposal
Move the check into the library, keeping it controller-neutral and without
defaults:
foca-common.ingress fails to render if <valuesKey>.ingress.annotations sets nginx.ingress.kubernetes.io/proxy-body-size (nginx sizes: bytes, or with
the suffix k, m or g; 0 = no limit) below foca-common.maxContentLength, with a hint to the value to set.
No annotation is added by the library; apps whose limit exceeds 1 MiB set
the annotation as a default in their own values.yaml (as proWES does).
Tests in charts/foca-common/tests/test_templates.py; docs in docs/helm-chart.md ("Exposing the app", ingress-nginx, Body size).
Once released, proWES drops its own check and bumps foca-common.
Done when
A body-size annotation below the app's limit fails to render, with tests.
Activity
docs(chart): add body-size check to 0.6.0 notes
docs(chart): drop hard-coded chart version
docs(chart): say the size format is always checked