diff --git a/components/operator/internal/controllers/stack/testdata/monopod-disabled-one-service/results/configmaps--v1/gateway-config.yaml b/components/operator/internal/controllers/stack/testdata/monopod-disabled-one-service/results/configmaps--v1/gateway-config.yaml index 582038911d..389cf27eba 100644 --- a/components/operator/internal/controllers/stack/testdata/monopod-disabled-one-service/results/configmaps--v1/gateway-config.yaml +++ b/components/operator/internal/controllers/stack/testdata/monopod-disabled-one-service/results/configmaps--v1/gateway-config.yaml @@ -26,7 +26,6 @@ data: # c.f. https://caddyserver.com/docs/caddyfile/directives#directive-order order auth before basicauth order versions after metrics - order audit after encode } :8000 { diff --git a/components/operator/internal/controllers/stack/testdata/monopod-latest/results/configmaps--v1/gateway-config.yaml b/components/operator/internal/controllers/stack/testdata/monopod-latest/results/configmaps--v1/gateway-config.yaml index 55d39d9238..2e8699256c 100644 --- a/components/operator/internal/controllers/stack/testdata/monopod-latest/results/configmaps--v1/gateway-config.yaml +++ b/components/operator/internal/controllers/stack/testdata/monopod-latest/results/configmaps--v1/gateway-config.yaml @@ -26,7 +26,6 @@ data: # c.f. https://caddyserver.com/docs/caddyfile/directives#directive-order order auth before basicauth order versions after metrics - order audit after encode } :8000 { diff --git a/components/operator/internal/controllers/stack/testdata/monopod-ledgerv1/results/configmaps--v1/gateway-config.yaml b/components/operator/internal/controllers/stack/testdata/monopod-ledgerv1/results/configmaps--v1/gateway-config.yaml index 887ef007a8..a71ae30a27 100644 --- a/components/operator/internal/controllers/stack/testdata/monopod-ledgerv1/results/configmaps--v1/gateway-config.yaml +++ b/components/operator/internal/controllers/stack/testdata/monopod-ledgerv1/results/configmaps--v1/gateway-config.yaml @@ -26,7 +26,6 @@ data: # c.f. https://caddyserver.com/docs/caddyfile/directives#directive-order order auth before basicauth order versions after metrics - order audit after encode } :8000 { diff --git a/components/operator/internal/controllers/stack/testdata/monopod-payments-after-v1.0.0-alpha.6/results/configmaps--v1/gateway-config.yaml b/components/operator/internal/controllers/stack/testdata/monopod-payments-after-v1.0.0-alpha.6/results/configmaps--v1/gateway-config.yaml index 07944dc107..e3db1166b1 100644 --- a/components/operator/internal/controllers/stack/testdata/monopod-payments-after-v1.0.0-alpha.6/results/configmaps--v1/gateway-config.yaml +++ b/components/operator/internal/controllers/stack/testdata/monopod-payments-after-v1.0.0-alpha.6/results/configmaps--v1/gateway-config.yaml @@ -26,7 +26,6 @@ data: # c.f. https://caddyserver.com/docs/caddyfile/directives#directive-order order auth before basicauth order versions after metrics - order audit after encode } :8000 { diff --git a/components/operator/internal/controllers/stack/testdata/monopod-payments-before-v1.0.0-alpha.6/results/configmaps--v1/gateway-config.yaml b/components/operator/internal/controllers/stack/testdata/monopod-payments-before-v1.0.0-alpha.6/results/configmaps--v1/gateway-config.yaml index b019df6671..2b1dd5f5eb 100644 --- a/components/operator/internal/controllers/stack/testdata/monopod-payments-before-v1.0.0-alpha.6/results/configmaps--v1/gateway-config.yaml +++ b/components/operator/internal/controllers/stack/testdata/monopod-payments-before-v1.0.0-alpha.6/results/configmaps--v1/gateway-config.yaml @@ -26,7 +26,6 @@ data: # c.f. https://caddyserver.com/docs/caddyfile/directives#directive-order order auth before basicauth order versions after metrics - order audit after encode } :8000 { diff --git a/components/operator/internal/controllers/stack/testdata/monopod-search-before-v0.7.0/results/configmaps--v1/gateway-config.yaml b/components/operator/internal/controllers/stack/testdata/monopod-search-before-v0.7.0/results/configmaps--v1/gateway-config.yaml index ad6eefd2f8..3ecc1c3d9f 100644 --- a/components/operator/internal/controllers/stack/testdata/monopod-search-before-v0.7.0/results/configmaps--v1/gateway-config.yaml +++ b/components/operator/internal/controllers/stack/testdata/monopod-search-before-v0.7.0/results/configmaps--v1/gateway-config.yaml @@ -26,7 +26,6 @@ data: # c.f. https://caddyserver.com/docs/caddyfile/directives#directive-order order auth before basicauth order versions after metrics - order audit after encode } :8000 { diff --git a/components/operator/internal/controllers/stack/testdata/multipod-debug/results/configmaps--v1/gateway-config.yaml b/components/operator/internal/controllers/stack/testdata/multipod-debug/results/configmaps--v1/gateway-config.yaml index 145a2d2067..c3b68b81f3 100644 --- a/components/operator/internal/controllers/stack/testdata/multipod-debug/results/configmaps--v1/gateway-config.yaml +++ b/components/operator/internal/controllers/stack/testdata/multipod-debug/results/configmaps--v1/gateway-config.yaml @@ -26,7 +26,6 @@ data: # c.f. https://caddyserver.com/docs/caddyfile/directives#directive-order order auth before basicauth order versions after metrics - order audit after encode } :8000 { diff --git a/components/operator/internal/controllers/stack/testdata/multipod-debug/results/deployments-apps-v1/gateway.yaml b/components/operator/internal/controllers/stack/testdata/multipod-debug/results/deployments-apps-v1/gateway.yaml index 140f427045..a919562349 100644 --- a/components/operator/internal/controllers/stack/testdata/multipod-debug/results/deployments-apps-v1/gateway.yaml +++ b/components/operator/internal/controllers/stack/testdata/multipod-debug/results/deployments-apps-v1/gateway.yaml @@ -23,7 +23,7 @@ spec: template: metadata: annotations: - stack.formance.cloud/volumes-hash: ZNfFU88ePwn2xdPMGP11WIBMaRgaIm0dFu-Oha_n9GQ= + stack.formance.cloud/volumes-hash: QPoPikY8V9LdSakc-CRiDDGku35FuM6uznQALGAN308= creationTimestamp: null labels: app.kubernetes.io/name: gateway diff --git a/components/operator/internal/controllers/stack/testdata/multipod-disabled-one-service/results/configmaps--v1/gateway-config.yaml b/components/operator/internal/controllers/stack/testdata/multipod-disabled-one-service/results/configmaps--v1/gateway-config.yaml index 22690322d3..94afe50241 100644 --- a/components/operator/internal/controllers/stack/testdata/multipod-disabled-one-service/results/configmaps--v1/gateway-config.yaml +++ b/components/operator/internal/controllers/stack/testdata/multipod-disabled-one-service/results/configmaps--v1/gateway-config.yaml @@ -26,7 +26,6 @@ data: # c.f. https://caddyserver.com/docs/caddyfile/directives#directive-order order auth before basicauth order versions after metrics - order audit after encode } :8000 { diff --git a/components/operator/internal/controllers/stack/testdata/multipod-disabled-one-service/results/deployments-apps-v1/gateway.yaml b/components/operator/internal/controllers/stack/testdata/multipod-disabled-one-service/results/deployments-apps-v1/gateway.yaml index 9340365a0f..0925866bdc 100644 --- a/components/operator/internal/controllers/stack/testdata/multipod-disabled-one-service/results/deployments-apps-v1/gateway.yaml +++ b/components/operator/internal/controllers/stack/testdata/multipod-disabled-one-service/results/deployments-apps-v1/gateway.yaml @@ -23,7 +23,7 @@ spec: template: metadata: annotations: - stack.formance.cloud/volumes-hash: w3lqVr2tqPGU9vJTRCSJFaer9cm-CxSFVT8z8GJe9vU= + stack.formance.cloud/volumes-hash: q1cjlPTVc24ROZvkPA4_y3wLIDF9DU3ZbfqueyJ6Wfs= creationTimestamp: null labels: app.kubernetes.io/name: gateway diff --git a/components/operator/internal/controllers/stack/testdata/multipod-latest-no-monitoring/results/configmaps--v1/gateway-config.yaml b/components/operator/internal/controllers/stack/testdata/multipod-latest-no-monitoring/results/configmaps--v1/gateway-config.yaml index 0804f0fbac..67ed7523f8 100644 --- a/components/operator/internal/controllers/stack/testdata/multipod-latest-no-monitoring/results/configmaps--v1/gateway-config.yaml +++ b/components/operator/internal/controllers/stack/testdata/multipod-latest-no-monitoring/results/configmaps--v1/gateway-config.yaml @@ -26,7 +26,6 @@ data: # c.f. https://caddyserver.com/docs/caddyfile/directives#directive-order order auth before basicauth order versions after metrics - order audit after encode } :8000 { diff --git a/components/operator/internal/controllers/stack/testdata/multipod-latest-no-monitoring/results/deployments-apps-v1/gateway.yaml b/components/operator/internal/controllers/stack/testdata/multipod-latest-no-monitoring/results/deployments-apps-v1/gateway.yaml index 5ba6bb61e8..7cd271db16 100644 --- a/components/operator/internal/controllers/stack/testdata/multipod-latest-no-monitoring/results/deployments-apps-v1/gateway.yaml +++ b/components/operator/internal/controllers/stack/testdata/multipod-latest-no-monitoring/results/deployments-apps-v1/gateway.yaml @@ -23,7 +23,7 @@ spec: template: metadata: annotations: - stack.formance.cloud/volumes-hash: 7p3kZCm5cFpCNLRGw3c9Lm-amWoDWT2Kvnp62eC5maI= + stack.formance.cloud/volumes-hash: lVeRbxA7y5XobMRStzHbXMCQAB2JhVSZryUEZEZwVvs= creationTimestamp: null labels: app.kubernetes.io/name: gateway diff --git a/components/operator/internal/controllers/stack/testdata/multipod-latest-with-custom-registry/results/configmaps--v1/gateway-config.yaml b/components/operator/internal/controllers/stack/testdata/multipod-latest-with-custom-registry/results/configmaps--v1/gateway-config.yaml index ac86f6da55..80b337401a 100644 --- a/components/operator/internal/controllers/stack/testdata/multipod-latest-with-custom-registry/results/configmaps--v1/gateway-config.yaml +++ b/components/operator/internal/controllers/stack/testdata/multipod-latest-with-custom-registry/results/configmaps--v1/gateway-config.yaml @@ -26,7 +26,6 @@ data: # c.f. https://caddyserver.com/docs/caddyfile/directives#directive-order order auth before basicauth order versions after metrics - order audit after encode } :8000 { diff --git a/components/operator/internal/controllers/stack/testdata/multipod-latest-with-custom-registry/results/deployments-apps-v1/gateway.yaml b/components/operator/internal/controllers/stack/testdata/multipod-latest-with-custom-registry/results/deployments-apps-v1/gateway.yaml index 190f8f042b..d4a2283c11 100644 --- a/components/operator/internal/controllers/stack/testdata/multipod-latest-with-custom-registry/results/deployments-apps-v1/gateway.yaml +++ b/components/operator/internal/controllers/stack/testdata/multipod-latest-with-custom-registry/results/deployments-apps-v1/gateway.yaml @@ -23,7 +23,7 @@ spec: template: metadata: annotations: - stack.formance.cloud/volumes-hash: 7p3kZCm5cFpCNLRGw3c9Lm-amWoDWT2Kvnp62eC5maI= + stack.formance.cloud/volumes-hash: lVeRbxA7y5XobMRStzHbXMCQAB2JhVSZryUEZEZwVvs= creationTimestamp: null labels: app.kubernetes.io/name: gateway diff --git a/components/operator/internal/controllers/stack/testdata/multipod-latest-with-gateway-fallback/results/configmaps--v1/gateway-config.yaml b/components/operator/internal/controllers/stack/testdata/multipod-latest-with-gateway-fallback/results/configmaps--v1/gateway-config.yaml index 449f030b75..abe1b4cf19 100644 --- a/components/operator/internal/controllers/stack/testdata/multipod-latest-with-gateway-fallback/results/configmaps--v1/gateway-config.yaml +++ b/components/operator/internal/controllers/stack/testdata/multipod-latest-with-gateway-fallback/results/configmaps--v1/gateway-config.yaml @@ -26,7 +26,6 @@ data: # c.f. https://caddyserver.com/docs/caddyfile/directives#directive-order order auth before basicauth order versions after metrics - order audit after encode } :8000 { diff --git a/components/operator/internal/controllers/stack/testdata/multipod-latest-with-gateway-fallback/results/deployments-apps-v1/gateway.yaml b/components/operator/internal/controllers/stack/testdata/multipod-latest-with-gateway-fallback/results/deployments-apps-v1/gateway.yaml index 28c4abd075..cf3af3f0d2 100644 --- a/components/operator/internal/controllers/stack/testdata/multipod-latest-with-gateway-fallback/results/deployments-apps-v1/gateway.yaml +++ b/components/operator/internal/controllers/stack/testdata/multipod-latest-with-gateway-fallback/results/deployments-apps-v1/gateway.yaml @@ -23,7 +23,7 @@ spec: template: metadata: annotations: - stack.formance.cloud/volumes-hash: CqdbENklnQsWUPfR4ZmKTUH-h6k5rUG6IsvGyvTU8iU= + stack.formance.cloud/volumes-hash: uWibF55Tug6PWYx4ut_rrdxdVKwENi8zbKzIky-yofw= creationTimestamp: null labels: app.kubernetes.io/name: gateway diff --git a/components/operator/internal/controllers/stack/testdata/multipod-latest-with-secrets/results/configmaps--v1/gateway-config.yaml b/components/operator/internal/controllers/stack/testdata/multipod-latest-with-secrets/results/configmaps--v1/gateway-config.yaml index 097f60152c..925323bab0 100644 --- a/components/operator/internal/controllers/stack/testdata/multipod-latest-with-secrets/results/configmaps--v1/gateway-config.yaml +++ b/components/operator/internal/controllers/stack/testdata/multipod-latest-with-secrets/results/configmaps--v1/gateway-config.yaml @@ -26,7 +26,6 @@ data: # c.f. https://caddyserver.com/docs/caddyfile/directives#directive-order order auth before basicauth order versions after metrics - order audit after encode } :8000 { diff --git a/components/operator/internal/controllers/stack/testdata/multipod-latest-with-secrets/results/deployments-apps-v1/gateway.yaml b/components/operator/internal/controllers/stack/testdata/multipod-latest-with-secrets/results/deployments-apps-v1/gateway.yaml index a0ab36a189..f653a05275 100644 --- a/components/operator/internal/controllers/stack/testdata/multipod-latest-with-secrets/results/deployments-apps-v1/gateway.yaml +++ b/components/operator/internal/controllers/stack/testdata/multipod-latest-with-secrets/results/deployments-apps-v1/gateway.yaml @@ -23,7 +23,7 @@ spec: template: metadata: annotations: - stack.formance.cloud/volumes-hash: 7p3kZCm5cFpCNLRGw3c9Lm-amWoDWT2Kvnp62eC5maI= + stack.formance.cloud/volumes-hash: lVeRbxA7y5XobMRStzHbXMCQAB2JhVSZryUEZEZwVvs= creationTimestamp: null labels: app.kubernetes.io/name: gateway diff --git a/components/operator/internal/controllers/stack/testdata/multipod-latest/results/configmaps--v1/gateway-config.yaml b/components/operator/internal/controllers/stack/testdata/multipod-latest/results/configmaps--v1/gateway-config.yaml index 125aac6934..89130963bf 100644 --- a/components/operator/internal/controllers/stack/testdata/multipod-latest/results/configmaps--v1/gateway-config.yaml +++ b/components/operator/internal/controllers/stack/testdata/multipod-latest/results/configmaps--v1/gateway-config.yaml @@ -26,7 +26,6 @@ data: # c.f. https://caddyserver.com/docs/caddyfile/directives#directive-order order auth before basicauth order versions after metrics - order audit after encode } :8000 { diff --git a/components/operator/internal/controllers/stack/testdata/multipod-latest/results/deployments-apps-v1/gateway.yaml b/components/operator/internal/controllers/stack/testdata/multipod-latest/results/deployments-apps-v1/gateway.yaml index b9c1bf99c3..893bca3538 100644 --- a/components/operator/internal/controllers/stack/testdata/multipod-latest/results/deployments-apps-v1/gateway.yaml +++ b/components/operator/internal/controllers/stack/testdata/multipod-latest/results/deployments-apps-v1/gateway.yaml @@ -23,7 +23,7 @@ spec: template: metadata: annotations: - stack.formance.cloud/volumes-hash: 7p3kZCm5cFpCNLRGw3c9Lm-amWoDWT2Kvnp62eC5maI= + stack.formance.cloud/volumes-hash: lVeRbxA7y5XobMRStzHbXMCQAB2JhVSZryUEZEZwVvs= creationTimestamp: null labels: app.kubernetes.io/name: gateway diff --git a/components/operator/internal/controllers/stack/testdata/multipod-service-annotation/results/configmaps--v1/gateway-config.yaml b/components/operator/internal/controllers/stack/testdata/multipod-service-annotation/results/configmaps--v1/gateway-config.yaml index bdfdcc89ba..b13b49f219 100644 --- a/components/operator/internal/controllers/stack/testdata/multipod-service-annotation/results/configmaps--v1/gateway-config.yaml +++ b/components/operator/internal/controllers/stack/testdata/multipod-service-annotation/results/configmaps--v1/gateway-config.yaml @@ -26,7 +26,6 @@ data: # c.f. https://caddyserver.com/docs/caddyfile/directives#directive-order order auth before basicauth order versions after metrics - order audit after encode } :8000 { diff --git a/components/operator/internal/controllers/stack/testdata/multipod-service-annotation/results/deployments-apps-v1/gateway.yaml b/components/operator/internal/controllers/stack/testdata/multipod-service-annotation/results/deployments-apps-v1/gateway.yaml index 0cbac676e6..80945de15a 100644 --- a/components/operator/internal/controllers/stack/testdata/multipod-service-annotation/results/deployments-apps-v1/gateway.yaml +++ b/components/operator/internal/controllers/stack/testdata/multipod-service-annotation/results/deployments-apps-v1/gateway.yaml @@ -23,7 +23,7 @@ spec: template: metadata: annotations: - stack.formance.cloud/volumes-hash: 7p3kZCm5cFpCNLRGw3c9Lm-amWoDWT2Kvnp62eC5maI= + stack.formance.cloud/volumes-hash: lVeRbxA7y5XobMRStzHbXMCQAB2JhVSZryUEZEZwVvs= creationTimestamp: null labels: app.kubernetes.io/name: gateway diff --git a/components/operator/internal/controllers/stack/testdata/multipod-without-audit-log/results/configmaps--v1/gateway-config.yaml b/components/operator/internal/controllers/stack/testdata/multipod-without-audit-log/results/configmaps--v1/gateway-config.yaml index 7b799277d9..c8a585486a 100644 --- a/components/operator/internal/controllers/stack/testdata/multipod-without-audit-log/results/configmaps--v1/gateway-config.yaml +++ b/components/operator/internal/controllers/stack/testdata/multipod-without-audit-log/results/configmaps--v1/gateway-config.yaml @@ -26,7 +26,6 @@ data: # c.f. https://caddyserver.com/docs/caddyfile/directives#directive-order order auth before basicauth order versions after metrics - order audit after encode } :8000 { diff --git a/components/operator/internal/controllers/stack/testdata/multipod-without-audit-log/results/deployments-apps-v1/gateway.yaml b/components/operator/internal/controllers/stack/testdata/multipod-without-audit-log/results/deployments-apps-v1/gateway.yaml index 62679ed3b4..69b6a55ac9 100644 --- a/components/operator/internal/controllers/stack/testdata/multipod-without-audit-log/results/deployments-apps-v1/gateway.yaml +++ b/components/operator/internal/controllers/stack/testdata/multipod-without-audit-log/results/deployments-apps-v1/gateway.yaml @@ -23,7 +23,7 @@ spec: template: metadata: annotations: - stack.formance.cloud/volumes-hash: 7p3kZCm5cFpCNLRGw3c9Lm-amWoDWT2Kvnp62eC5maI= + stack.formance.cloud/volumes-hash: lVeRbxA7y5XobMRStzHbXMCQAB2JhVSZryUEZEZwVvs= creationTimestamp: null labels: app.kubernetes.io/name: gateway diff --git a/components/operator/internal/modules/gateway/handler.go b/components/operator/internal/modules/gateway/handler.go index db12ae8b4b..14e3fde2a4 100644 --- a/components/operator/internal/modules/gateway/handler.go +++ b/components/operator/internal/modules/gateway/handler.go @@ -267,7 +267,9 @@ const caddyfile = `(cors) { # c.f. https://caddyserver.com/docs/caddyfile/directives#directive-order order auth before basicauth order versions after metrics + {{- if .EnableAudit }} order audit after encode + {{- end }} } :{{ .Port }} {