From aaa44eb1e7a274d00b25155b847dd7b9d1f3d212 Mon Sep 17 00:00:00 2001 From: zirain Date: Tue, 1 Jul 2025 19:37:09 +0800 Subject: [PATCH 1/2] fix default accesslog Signed-off-by: zirain --- internal/gatewayapi/listener.go | 5 ----- .../envoyproxy-accesslog-file-json-no-format.out.yaml | 4 +++- .../testdata/envoyproxy-accesslog-without-format.out.yaml | 2 ++ 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/internal/gatewayapi/listener.go b/internal/gatewayapi/listener.go index a48cbcf6e7..4d6fe26680 100644 --- a/internal/gatewayapi/listener.go +++ b/internal/gatewayapi/listener.go @@ -590,11 +590,6 @@ func (t *Translator) processAccessLog(envoyproxy *egv1a1.EnvoyProxy, resources * } irAccessLog.Text = append(irAccessLog.Text, al) case egv1a1.ProxyAccessLogFormatTypeJSON: - if len(format.JSON) == 0 { - // TODO: use a default JSON format if not specified? - continue - } - al := &ir.JSONAccessLog{ JSON: format.JSON, Path: sink.File.Path, diff --git a/internal/gatewayapi/testdata/envoyproxy-accesslog-file-json-no-format.out.yaml b/internal/gatewayapi/testdata/envoyproxy-accesslog-file-json-no-format.out.yaml index 32bbeab062..54d161e1be 100644 --- a/internal/gatewayapi/testdata/envoyproxy-accesslog-file-json-no-format.out.yaml +++ b/internal/gatewayapi/testdata/envoyproxy-accesslog-file-json-no-format.out.yaml @@ -128,7 +128,9 @@ infraIR: namespace: envoy-gateway-system xdsIR: envoy-gateway/gateway-1: - accessLog: {} + accessLog: + json: + - path: /dev/stdout http: - address: 0.0.0.0 hostnames: diff --git a/internal/gatewayapi/testdata/envoyproxy-accesslog-without-format.out.yaml b/internal/gatewayapi/testdata/envoyproxy-accesslog-without-format.out.yaml index d8a3d583c8..596392106b 100644 --- a/internal/gatewayapi/testdata/envoyproxy-accesslog-without-format.out.yaml +++ b/internal/gatewayapi/testdata/envoyproxy-accesslog-without-format.out.yaml @@ -203,6 +203,8 @@ xdsIR: protocol: GRPC name: envoy-gateway-system/test type: TCP + json: + - path: /dev/stdout openTelemetry: - authority: otel-collector.monitoring.svc.cluster.local destination: From b4761192d8bd44223b276c3988708ea6baae208d Mon Sep 17 00:00:00 2001 From: zirain Date: Tue, 1 Jul 2025 19:42:01 +0800 Subject: [PATCH 2/2] release notes Signed-off-by: zirain --- release-notes/current.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/release-notes/current.yaml b/release-notes/current.yaml index 3974f82430..370871b3ca 100644 --- a/release-notes/current.yaml +++ b/release-notes/current.yaml @@ -42,6 +42,7 @@ bug fixes: | Fixed issue where EnvoyExtensionPolicy ExtProc body processing mode is set to FullDuplexStreamed, but trailers were not sent. Fixed validation issue where EnvoyExtensionPolicy ExtProc failOpen is true, and body processing mode FullDuplexStreamed is not rejected. Add ConfigMap indexers for EnvoyExtensionPolicies to reconcile Lua changes + Fixed issue that default accesslog format not working. # Enhancements that improve performance.