86d56dc4ea
ai-proxy's log_payloads and log_statistics produced nothing on the AI
gateway despite being enabled. The cause was not the plugin's own
max_request_body_size but nginx's client_body_buffer_size, left at its 8k
default: past it the body goes to a temp file, and
kong.request.get_raw_body() returns nil for a body on disk, so any plugin
reading the body silently stops working. Prompts on that gateway run to 30
KB. Measured, not guessed — request.size was 30369 on the last call.
Expose it as ${CLIENT_BODY_BUFFER_SIZE} with the 8k default every domain
keeps, rather than raising it globally. The buffer is allocated per
connection carrying a body, so a value that is free on a gateway seeing 18
requests a day is not free on one serving real traffic.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
33 lines
1.7 KiB
YAML
33 lines
1.7 KiB
YAML
# The dataplane-template ${VAR} defaults, WITHOUT a namespace.
|
|
#
|
|
# Flux's postBuild.substituteFrom can only read a ConfigMap in its own
|
|
# namespace. Keeping this only in flux-system is therefore what forced every
|
|
# gateway Kustomization into flux-system too — a namespace the feature teams
|
|
# have no access to. That was a side effect of the substitution rule, not a
|
|
# governance decision, and it left teams unable to touch their own gateway.
|
|
#
|
|
# So the same ConfigMap is placed in each domain namespace instead, by the
|
|
# Kustomizations in flux/domain-defaults.yaml, each setting targetNamespace.
|
|
# One source file, one edit when a default changes; the copies follow.
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: dataplane-template-defaults
|
|
data:
|
|
KONNECT_SERVER_URL: eu.api.konghq.com
|
|
GATEWAY_IMAGE: kong/kong-gateway:3.15
|
|
REPLICAS: "1"
|
|
OIDC_ISSUER: https://keycloak.sttlab.eu/realms/sttlab # Keycloak today, but this template shouldn't assume it stays that way
|
|
CORS_ORIGINS: https://*.sttlab.local
|
|
RATE_LIMIT_MINUTE: "300"
|
|
REQUEST_MAX_BODY_SIZE: "10" # MB
|
|
# nginx default. Domains that need to introspect larger bodies raise it
|
|
# in their own Kustomization; see the AI gateway.
|
|
CLIENT_BODY_BUFFER_SIZE: 8k
|
|
# Tempo (OTLP-native), ns observability, cluster-wide — shared by every
|
|
# domain, not domain-specific. Replaced Jaeger on 2026-08-25: Tempo is the
|
|
# trace backend of the infra-observability stack, so its span metrics feed
|
|
# Prometheus and its traces correlate with the Loki logs from the same
|
|
# requests. Jaeger is still deployed but no longer receives anything.
|
|
OTEL_TRACES_ENDPOINT: http://tempo.observability.svc.cluster.local:4318/v1/traces
|