Skip to content

feat(chart): check ingress-nginx body size against the app limit #785

Closed

Description

@uniqueg

Problem

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.
  • The Helm chart guide documents the check.

Activity

  1. added
    priority: low
    status: triage
    type: feature
    workload: hours
    on Nov 18, 2026
  2. added
    status: in progress
    and removed
    status: triage
    on Nov 18, 2026
  3. self-assigned this
    on Nov 18, 2026
  4. moved this from Backlog to In progress in ELIXIR On-Cloud: Low Priorityon Nov 18, 2026
  5. moved this from In progress to In review in ELIXIR On-Cloud: Low Priorityon Nov 18, 2026
  6. removed
    status: in progress
    on Nov 18, 2026
  7. added this to the v0.23.0 milestone on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

priority: lowtype: featureworkload: hours

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions