homek8s/infrastructure/networking/gateway/gatewayclass.yaml
Lance Walters 1caaae9a63 infra(gateway): enable Envoy HTTP access logs for the Cilium GatewayClass
Finding F7: cilium-envoy emitted no request-level record, so the netsec
design's application-layer rules had no input stream.

CiliumGatewayClassConfig kube-system/cilium binds spec.telemetry.accessLogs
(JSON, HTTP target) to the cilium GatewayClass via spec.parametersRef, so
Cilium renders an access log into every Gateway listener's HTTP connection
manager and writes one JSON line per request to the cilium-envoy container
stdout (/var/log/pods/kube-system_cilium-envoy-*/cilium-envoy/*.log).

Fields are an explicit allowlist: method, path, response code/flags, duration,
bytes, authority, CF-Connecting-IP (real client, since Envoy is hostNetwork
behind cloudflared), X-Forwarded-For, peer, User-Agent, CF-Ray, upstream host.
No bodies, no header dumps: Authorization/Cookie never reach disk. Application
log level stays info (no debug/trace).
2026-11-27 01:30:39 -05:00

23 lines
937 B
YAML

# The Cilium GatewayClass, declared here so the access-log configuration is
# bound by GitOps rather than a hand patch.
#
# Why this file exists at all: the cilium Helm chart creates the GatewayClass
# (controllerName io.cilium/gateway-controller) but has no values knob for
# `spec.parametersRef`, and Cilium only reads `spec.telemetry.accessLogs` from
# the CiliumGatewayClassConfig referenced there. Owning the object here keeps
# the binding in sirius/homek8s and applied by Flux.
#
# The rendered spec is byte-for-byte the chart's GatewayClass plus parametersRef,
# so a Helm upgrade and this manifest agree on every other field.
apiVersion: gateway.networking.k8s.io/v1
kind: GatewayClass
metadata:
name: cilium
spec:
controllerName: io.cilium/gateway-controller
description: The default Cilium GatewayClass
parametersRef:
group: cilium.io
kind: CiliumGatewayClassConfig
name: cilium
namespace: kube-system