From b70d7854dc8dcad972ebcf79012a260dfbe7d3d4 Mon Sep 17 00:00:00 2001 From: dd di cesare Date: Tue, 19 Nov 2024 17:25:43 +0100 Subject: [PATCH] [refactor] Passing down logger for FailureMode Setting Signed-off-by: dd di cesare --- .../envoy_gateway_extension_reconciler.go | 2 +- controllers/istio_extension_reconciler.go | 2 +- pkg/wasm/utils.go | 20 +++--- .../envoygateway/extension_reconciler_test.go | 13 ++-- tests/istio/extension_reconciler_test.go | 71 ++++++++++++------- 5 files changed, 66 insertions(+), 42 deletions(-) diff --git a/controllers/envoy_gateway_extension_reconciler.go b/controllers/envoy_gateway_extension_reconciler.go index 4a89c0313..7aba34f5f 100644 --- a/controllers/envoy_gateway_extension_reconciler.go +++ b/controllers/envoy_gateway_extension_reconciler.go @@ -209,7 +209,7 @@ func (r *EnvoyGatewayExtensionReconciler) buildWasmConfigs(ctx context.Context, wasmConfigs := lo.MapValues(wasmActionSets.Sorted(), func(configs kuadrantgatewayapi.SortableHTTPRouteMatchConfigs, _ string) wasm.Config { return wasm.BuildConfigForActionSet(lo.Map(configs, func(c kuadrantgatewayapi.HTTPRouteMatchConfig, _ int) wasm.ActionSet { return c.Config.(wasm.ActionSet) - })) + }), &logger) }) return wasmConfigs, nil diff --git a/controllers/istio_extension_reconciler.go b/controllers/istio_extension_reconciler.go index 3b19ad8b3..491b506e7 100644 --- a/controllers/istio_extension_reconciler.go +++ b/controllers/istio_extension_reconciler.go @@ -212,7 +212,7 @@ func (r *IstioExtensionReconciler) buildWasmConfigs(ctx context.Context, state * wasmConfigs := lo.MapValues(wasmActionSets.Sorted(), func(configs kuadrantgatewayapi.SortableHTTPRouteMatchConfigs, _ string) wasm.Config { return wasm.BuildConfigForActionSet(lo.Map(configs, func(c kuadrantgatewayapi.HTTPRouteMatchConfig, _ int) wasm.ActionSet { return c.Config.(wasm.ActionSet) - })) + }), &logger) }) return wasmConfigs, nil diff --git a/pkg/wasm/utils.go b/pkg/wasm/utils.go index 976fc1037..3b807eed7 100644 --- a/pkg/wasm/utils.go +++ b/pkg/wasm/utils.go @@ -9,6 +9,8 @@ import ( "os" "strings" + "github.com/go-logr/logr" + "github.com/kuadrant/policy-machinery/machinery" "github.com/samber/lo" "google.golang.org/protobuf/types/known/structpb" @@ -31,19 +33,19 @@ func AuthServiceTimeout() string { return env.GetString("AUTH_SERVICE_TIMEOUT", "200ms") } -func AuthServiceFailureMode() FailureModeType { - return parseFailureModeValue("AUTH_SERVICE_FAILURE_MODE", FailureModeDeny) +func AuthServiceFailureMode(logger *logr.Logger) FailureModeType { + return parseFailureModeValue("AUTH_SERVICE_FAILURE_MODE", FailureModeDeny, logger) } func RatelimitServiceTimeout() string { return env.GetString("RATELIMIT_SERVICE_TIMEOUT", "100ms") } -func RatelimitServiceFailureMode() FailureModeType { - return parseFailureModeValue("RATELIMIT_SERVICE_FAILURE_MODE", FailureModeAllow) +func RatelimitServiceFailureMode(logger *logr.Logger) FailureModeType { + return parseFailureModeValue("RATELIMIT_SERVICE_FAILURE_MODE", FailureModeAllow, logger) } -func parseFailureModeValue(envVarName string, defaultValue FailureModeType) FailureModeType { +func parseFailureModeValue(envVarName string, defaultValue FailureModeType, logger *logr.Logger) FailureModeType { value := os.Getenv(envVarName) if value == "" { return defaultValue @@ -53,7 +55,7 @@ func parseFailureModeValue(envVarName string, defaultValue FailureModeType) Fail case string(FailureModeAllow), string(FailureModeDeny): return FailureModeType(value) default: - fmt.Printf("Warning: Invalid value '%s' for %s. Using default value '%s'.\n", value, envVarName, defaultValue) + logger.Info("Warning: Invalid FailureMode value '%s' for %s. Using default value '%s'.\n", value, envVarName, defaultValue) return defaultValue } } @@ -62,19 +64,19 @@ func ExtensionName(gatewayName string) string { return fmt.Sprintf("kuadrant-%s", gatewayName) } -func BuildConfigForActionSet(actionSets []ActionSet) Config { +func BuildConfigForActionSet(actionSets []ActionSet, logger *logr.Logger) Config { return Config{ Services: map[string]Service{ AuthServiceName: { Type: AuthServiceType, Endpoint: kuadrant.KuadrantAuthClusterName, - FailureMode: AuthServiceFailureMode(), + FailureMode: AuthServiceFailureMode(logger), Timeout: ptr.To(AuthServiceTimeout()), }, RateLimitServiceName: { Type: RateLimitServiceType, Endpoint: kuadrant.KuadrantRateLimitClusterName, - FailureMode: RatelimitServiceFailureMode(), + FailureMode: RatelimitServiceFailureMode(logger), Timeout: ptr.To(RatelimitServiceTimeout()), }, }, diff --git a/tests/envoygateway/extension_reconciler_test.go b/tests/envoygateway/extension_reconciler_test.go index 020cbd4a1..7f8d47b88 100644 --- a/tests/envoygateway/extension_reconciler_test.go +++ b/tests/envoygateway/extension_reconciler_test.go @@ -7,7 +7,10 @@ import ( "strings" "time" + "github.com/go-logr/logr" + egv1alpha1 "github.com/envoyproxy/gateway/api/v1alpha1" + "github.com/kuadrant/policy-machinery/controller" "github.com/kuadrant/policy-machinery/machinery" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" @@ -37,6 +40,7 @@ var _ = Describe("wasm controller", func() { gwHost = fmt.Sprintf("*.toystore-%s.com", rand.String(4)) gatewayClass *gatewayapiv1.GatewayClass gateway *gatewayapiv1.Gateway + logger logr.Logger ) BeforeEach(func(ctx SpecContext) { @@ -49,6 +53,7 @@ var _ = Describe("wasm controller", func() { Gateway err = testClient().Create(ctx, gateway) Expect(err).ToNot(HaveOccurred()) + logger = controller.LoggerFromContext(ctx).WithName("EnvoyExtensionReconcilerTest") Eventually(tests.GatewayIsReady(ctx, testClient(), gateway)).WithContext(ctx).Should(BeTrue()) }) @@ -171,13 +176,13 @@ var _ = Describe("wasm controller", func() { wasm.AuthServiceName: { Type: wasm.AuthServiceType, Endpoint: kuadrant.KuadrantAuthClusterName, - FailureMode: wasm.AuthServiceFailureMode(), + FailureMode: wasm.AuthServiceFailureMode(&logger), Timeout: ptr.To(wasm.AuthServiceTimeout()), }, wasm.RateLimitServiceName: { Type: wasm.RateLimitServiceType, Endpoint: kuadrant.KuadrantRateLimitClusterName, - FailureMode: wasm.RatelimitServiceFailureMode(), + FailureMode: wasm.RatelimitServiceFailureMode(&logger), Timeout: ptr.To(wasm.RatelimitServiceTimeout()), }, }, @@ -337,13 +342,13 @@ var _ = Describe("wasm controller", func() { wasm.AuthServiceName: { Type: wasm.AuthServiceType, Endpoint: kuadrant.KuadrantAuthClusterName, - FailureMode: wasm.AuthServiceFailureMode(), + FailureMode: wasm.AuthServiceFailureMode(&logger), Timeout: ptr.To(wasm.AuthServiceTimeout()), }, wasm.RateLimitServiceName: { Type: wasm.RateLimitServiceType, Endpoint: kuadrant.KuadrantRateLimitClusterName, - FailureMode: wasm.RatelimitServiceFailureMode(), + FailureMode: wasm.RatelimitServiceFailureMode(&logger), Timeout: ptr.To(wasm.RatelimitServiceTimeout()), }, }, diff --git a/tests/istio/extension_reconciler_test.go b/tests/istio/extension_reconciler_test.go index 9d411172c..c6d14bd49 100644 --- a/tests/istio/extension_reconciler_test.go +++ b/tests/istio/extension_reconciler_test.go @@ -7,7 +7,10 @@ import ( "reflect" "time" + "github.com/go-logr/logr" + "github.com/google/go-cmp/cmp" + "github.com/kuadrant/policy-machinery/controller" "github.com/kuadrant/policy-machinery/machinery" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" @@ -64,6 +67,7 @@ var _ = Describe("Rate Limiting WasmPlugin controller", func() { rlpName = "toystore-rlp" gatewayClass *gatewayapiv1.GatewayClass gateway *gatewayapiv1.Gateway + logger logr.Logger ) beforeEachCallback := func(ctx SpecContext) { @@ -73,6 +77,7 @@ var _ = Describe("Rate Limiting WasmPlugin controller", func() { gateway = tests.BuildBasicGateway(TestGatewayName, testNamespace) err = testClient().Create(ctx, gateway) Expect(err).ToNot(HaveOccurred()) + logger = controller.LoggerFromContext(ctx).WithName("IstioExtensionReconcilerTest") Eventually(tests.GatewayIsReady(ctx, testClient(), gateway)).WithContext(ctx).Should(BeTrue()) } @@ -148,13 +153,13 @@ var _ = Describe("Rate Limiting WasmPlugin controller", func() { wasm.AuthServiceName: { Type: wasm.AuthServiceType, Endpoint: kuadrant.KuadrantAuthClusterName, - FailureMode: wasm.AuthServiceFailureMode(), + FailureMode: wasm.AuthServiceFailureMode(&logger), Timeout: ptr.To(wasm.AuthServiceTimeout()), }, wasm.RateLimitServiceName: { Type: wasm.RateLimitServiceType, Endpoint: kuadrant.KuadrantRateLimitClusterName, - FailureMode: wasm.RatelimitServiceFailureMode(), + FailureMode: wasm.RatelimitServiceFailureMode(&logger), Timeout: ptr.To(wasm.RatelimitServiceTimeout()), }, }, @@ -287,7 +292,7 @@ var _ = Describe("Rate Limiting WasmPlugin controller", func() { Expect(err).ToNot(HaveOccurred()) Expect(existingWASMConfig.Services).To(HaveKeyWithValue(wasm.RateLimitServiceName, wasm.Service{ Endpoint: kuadrant.KuadrantRateLimitClusterName, - FailureMode: wasm.RatelimitServiceFailureMode(), + FailureMode: wasm.RatelimitServiceFailureMode(&logger), Type: wasm.RateLimitServiceType, Timeout: ptr.To(wasm.RatelimitServiceTimeout()), })) @@ -716,13 +721,13 @@ var _ = Describe("Rate Limiting WasmPlugin controller", func() { wasm.AuthServiceName: { Type: wasm.AuthServiceType, Endpoint: kuadrant.KuadrantAuthClusterName, - FailureMode: wasm.AuthServiceFailureMode(), + FailureMode: wasm.AuthServiceFailureMode(&logger), Timeout: ptr.To(wasm.AuthServiceTimeout()), }, wasm.RateLimitServiceName: { Type: wasm.RateLimitServiceType, Endpoint: kuadrant.KuadrantRateLimitClusterName, - FailureMode: wasm.RatelimitServiceFailureMode(), + FailureMode: wasm.RatelimitServiceFailureMode(&logger), Timeout: ptr.To(wasm.RatelimitServiceTimeout()), }, }, @@ -829,6 +834,7 @@ var _ = Describe("Rate Limiting WasmPlugin controller", func() { gatewayClass *gatewayapiv1.GatewayClass gateway *gatewayapiv1.Gateway gwBName = "gw-b" + logger logr.Logger ) beforeEachCallback := func(ctx SpecContext) { @@ -838,6 +844,7 @@ var _ = Describe("Rate Limiting WasmPlugin controller", func() { gateway = tests.BuildBasicGateway(TestGatewayName, testNamespace) err = testClient().Create(ctx, gateway) Expect(err).ToNot(HaveOccurred()) + logger = controller.LoggerFromContext(ctx).WithName("IstioExtensionReconcilerTest") Eventually(tests.GatewayIsReady(ctx, testClient(), gateway)).WithContext(ctx).Should(BeTrue()) } @@ -939,13 +946,13 @@ var _ = Describe("Rate Limiting WasmPlugin controller", func() { wasm.AuthServiceName: { Type: wasm.AuthServiceType, Endpoint: kuadrant.KuadrantAuthClusterName, - FailureMode: wasm.AuthServiceFailureMode(), + FailureMode: wasm.AuthServiceFailureMode(&logger), Timeout: ptr.To(wasm.AuthServiceTimeout()), }, wasm.RateLimitServiceName: { Type: wasm.RateLimitServiceType, Endpoint: kuadrant.KuadrantRateLimitClusterName, - FailureMode: wasm.RatelimitServiceFailureMode(), + FailureMode: wasm.RatelimitServiceFailureMode(&logger), Timeout: ptr.To(wasm.RatelimitServiceTimeout()), }, }, @@ -1151,13 +1158,13 @@ var _ = Describe("Rate Limiting WasmPlugin controller", func() { wasm.AuthServiceName: { Type: wasm.AuthServiceType, Endpoint: kuadrant.KuadrantAuthClusterName, - FailureMode: wasm.AuthServiceFailureMode(), + FailureMode: wasm.AuthServiceFailureMode(&logger), Timeout: ptr.To(wasm.AuthServiceTimeout()), }, wasm.RateLimitServiceName: { Type: wasm.RateLimitServiceType, Endpoint: kuadrant.KuadrantRateLimitClusterName, - FailureMode: wasm.RatelimitServiceFailureMode(), + FailureMode: wasm.RatelimitServiceFailureMode(&logger), Timeout: ptr.To(wasm.RatelimitServiceTimeout()), }, }, @@ -1281,13 +1288,13 @@ var _ = Describe("Rate Limiting WasmPlugin controller", func() { wasm.AuthServiceName: { Type: wasm.AuthServiceType, Endpoint: kuadrant.KuadrantAuthClusterName, - FailureMode: wasm.AuthServiceFailureMode(), + FailureMode: wasm.AuthServiceFailureMode(&logger), Timeout: ptr.To(wasm.AuthServiceTimeout()), }, wasm.RateLimitServiceName: { Type: wasm.RateLimitServiceType, Endpoint: kuadrant.KuadrantRateLimitClusterName, - FailureMode: wasm.RatelimitServiceFailureMode(), + FailureMode: wasm.RatelimitServiceFailureMode(&logger), Timeout: ptr.To(wasm.RatelimitServiceTimeout()), }, }, @@ -1337,6 +1344,7 @@ var _ = Describe("Rate Limiting WasmPlugin controller", func() { TestGatewayName = "toystore-gw" gatewayClass *gatewayapiv1.GatewayClass gateway *gatewayapiv1.Gateway + logger logr.Logger ) beforeEachCallback := func(ctx SpecContext) { @@ -1346,6 +1354,7 @@ var _ = Describe("Rate Limiting WasmPlugin controller", func() { gateway = tests.BuildBasicGateway(TestGatewayName, testNamespace) err = testClient().Create(ctx, gateway) Expect(err).ToNot(HaveOccurred()) + logger = controller.LoggerFromContext(ctx).WithName("IstioExtensionReconcilerTest") Eventually(tests.GatewayIsReady(ctx, testClient(), gateway)).WithContext(ctx).Should(BeTrue()) } @@ -1483,13 +1492,13 @@ var _ = Describe("Rate Limiting WasmPlugin controller", func() { wasm.AuthServiceName: { Type: wasm.AuthServiceType, Endpoint: kuadrant.KuadrantAuthClusterName, - FailureMode: wasm.AuthServiceFailureMode(), + FailureMode: wasm.AuthServiceFailureMode(&logger), Timeout: ptr.To(wasm.AuthServiceTimeout()), }, wasm.RateLimitServiceName: { Type: wasm.RateLimitServiceType, Endpoint: kuadrant.KuadrantRateLimitClusterName, - FailureMode: wasm.RatelimitServiceFailureMode(), + FailureMode: wasm.RatelimitServiceFailureMode(&logger), Timeout: ptr.To(wasm.RatelimitServiceTimeout()), }, }, @@ -1576,13 +1585,13 @@ var _ = Describe("Rate Limiting WasmPlugin controller", func() { wasm.AuthServiceName: { Type: wasm.AuthServiceType, Endpoint: kuadrant.KuadrantAuthClusterName, - FailureMode: wasm.AuthServiceFailureMode(), + FailureMode: wasm.AuthServiceFailureMode(&logger), Timeout: ptr.To(wasm.AuthServiceTimeout()), }, wasm.RateLimitServiceName: { Type: wasm.RateLimitServiceType, Endpoint: kuadrant.KuadrantRateLimitClusterName, - FailureMode: wasm.RatelimitServiceFailureMode(), + FailureMode: wasm.RatelimitServiceFailureMode(&logger), Timeout: ptr.To(wasm.RatelimitServiceTimeout()), }, }, @@ -1632,6 +1641,7 @@ var _ = Describe("Rate Limiting WasmPlugin controller", func() { TestGatewayName = "toystore-gw" gatewayClass *gatewayapiv1.GatewayClass gateway *gatewayapiv1.Gateway + logger logr.Logger ) beforeEachCallback := func(ctx SpecContext) { @@ -1641,6 +1651,7 @@ var _ = Describe("Rate Limiting WasmPlugin controller", func() { gateway = tests.BuildBasicGateway(TestGatewayName, testNamespace) err = testClient().Create(ctx, gateway) Expect(err).ToNot(HaveOccurred()) + logger = controller.LoggerFromContext(ctx).WithName("IstioExtensionReconcilerTest") Eventually(tests.GatewayIsReady(ctx, testClient(), gateway)).WithContext(ctx).Should(BeTrue()) } @@ -1753,13 +1764,13 @@ var _ = Describe("Rate Limiting WasmPlugin controller", func() { wasm.AuthServiceName: { Type: wasm.AuthServiceType, Endpoint: kuadrant.KuadrantAuthClusterName, - FailureMode: wasm.AuthServiceFailureMode(), + FailureMode: wasm.AuthServiceFailureMode(&logger), Timeout: ptr.To(wasm.AuthServiceTimeout()), }, wasm.RateLimitServiceName: { Type: wasm.RateLimitServiceType, Endpoint: kuadrant.KuadrantRateLimitClusterName, - FailureMode: wasm.RatelimitServiceFailureMode(), + FailureMode: wasm.RatelimitServiceFailureMode(&logger), Timeout: ptr.To(wasm.RatelimitServiceTimeout()), }, }, @@ -1864,13 +1875,13 @@ var _ = Describe("Rate Limiting WasmPlugin controller", func() { wasm.AuthServiceName: { Type: wasm.AuthServiceType, Endpoint: kuadrant.KuadrantAuthClusterName, - FailureMode: wasm.AuthServiceFailureMode(), + FailureMode: wasm.AuthServiceFailureMode(&logger), Timeout: ptr.To(wasm.AuthServiceTimeout()), }, wasm.RateLimitServiceName: { Type: wasm.RateLimitServiceType, Endpoint: kuadrant.KuadrantRateLimitClusterName, - FailureMode: wasm.RatelimitServiceFailureMode(), + FailureMode: wasm.RatelimitServiceFailureMode(&logger), Timeout: ptr.To(wasm.RatelimitServiceTimeout()), }, }, @@ -1920,6 +1931,7 @@ var _ = Describe("Rate Limiting WasmPlugin controller", func() { TestGatewayName = "toystore-gw" gatewayClass *gatewayapiv1.GatewayClass gateway *gatewayapiv1.Gateway + logger logr.Logger ) beforeEachCallback := func(ctx SpecContext) { @@ -1929,6 +1941,7 @@ var _ = Describe("Rate Limiting WasmPlugin controller", func() { gateway = tests.BuildBasicGateway(TestGatewayName, testNamespace) err = testClient().Create(ctx, gateway) Expect(err).ToNot(HaveOccurred()) + logger = controller.LoggerFromContext(ctx).WithName("IstioExtensionReconcilerTest") Eventually(tests.GatewayIsReady(ctx, testClient(), gateway)).WithContext(ctx).Should(BeTrue()) } @@ -2077,13 +2090,13 @@ var _ = Describe("Rate Limiting WasmPlugin controller", func() { wasm.AuthServiceName: { Type: wasm.AuthServiceType, Endpoint: kuadrant.KuadrantAuthClusterName, - FailureMode: wasm.AuthServiceFailureMode(), + FailureMode: wasm.AuthServiceFailureMode(&logger), Timeout: ptr.To(wasm.AuthServiceTimeout()), }, wasm.RateLimitServiceName: { Type: wasm.RateLimitServiceType, Endpoint: kuadrant.KuadrantRateLimitClusterName, - FailureMode: wasm.RatelimitServiceFailureMode(), + FailureMode: wasm.RatelimitServiceFailureMode(&logger), Timeout: ptr.To(wasm.RatelimitServiceTimeout()), }, }, @@ -2185,13 +2198,13 @@ var _ = Describe("Rate Limiting WasmPlugin controller", func() { wasm.AuthServiceName: { Type: wasm.AuthServiceType, Endpoint: kuadrant.KuadrantAuthClusterName, - FailureMode: wasm.AuthServiceFailureMode(), + FailureMode: wasm.AuthServiceFailureMode(&logger), Timeout: ptr.To(wasm.AuthServiceTimeout()), }, wasm.RateLimitServiceName: { Type: wasm.RateLimitServiceType, Endpoint: kuadrant.KuadrantRateLimitClusterName, - FailureMode: wasm.RatelimitServiceFailureMode(), + FailureMode: wasm.RatelimitServiceFailureMode(&logger), Timeout: ptr.To(wasm.RatelimitServiceTimeout()), }, }, @@ -2271,6 +2284,7 @@ var _ = Describe("Rate Limiting WasmPlugin controller", func() { gatewayClass *gatewayapiv1.GatewayClass gateway *gatewayapiv1.Gateway gwHostname = "*.gw.example.com" + logger logr.Logger ) beforeEachCallback := func(ctx SpecContext) { @@ -2281,6 +2295,7 @@ var _ = Describe("Rate Limiting WasmPlugin controller", func() { gateway.Spec.Listeners[0].Hostname = ptr.To(gatewayapiv1.Hostname(gwHostname)) err = testClient().Create(ctx, gateway) Expect(err).ToNot(HaveOccurred()) + logger = controller.LoggerFromContext(ctx).WithName("IstioExtensionReconcilerTest") Eventually(tests.GatewayIsReady(ctx, testClient(), gateway)).WithContext(ctx).Should(BeTrue()) } @@ -2352,13 +2367,13 @@ var _ = Describe("Rate Limiting WasmPlugin controller", func() { wasm.AuthServiceName: { Type: wasm.AuthServiceType, Endpoint: kuadrant.KuadrantAuthClusterName, - FailureMode: wasm.AuthServiceFailureMode(), + FailureMode: wasm.AuthServiceFailureMode(&logger), Timeout: ptr.To(wasm.AuthServiceTimeout()), }, wasm.RateLimitServiceName: { Type: wasm.RateLimitServiceType, Endpoint: kuadrant.KuadrantRateLimitClusterName, - FailureMode: wasm.RatelimitServiceFailureMode(), + FailureMode: wasm.RatelimitServiceFailureMode(&logger), Timeout: ptr.To(wasm.RatelimitServiceTimeout()), }, }, @@ -2402,6 +2417,7 @@ var _ = Describe("Rate Limiting WasmPlugin controller", func() { TestGatewayName = "toystore-gw" gatewayClass *gatewayapiv1.GatewayClass gateway *gatewayapiv1.Gateway + logger logr.Logger ) beforeEachCallback := func(ctx SpecContext) { @@ -2411,6 +2427,7 @@ var _ = Describe("Rate Limiting WasmPlugin controller", func() { gateway = tests.BuildBasicGateway(TestGatewayName, testNamespace) err = testClient().Create(ctx, gateway) Expect(err).ToNot(HaveOccurred()) + logger = controller.LoggerFromContext(ctx).WithName("IstioExtensionReconcilerTest") Eventually(tests.GatewayIsReady(ctx, testClient(), gateway)).WithContext(ctx).Should(BeTrue()) } @@ -2430,13 +2447,13 @@ var _ = Describe("Rate Limiting WasmPlugin controller", func() { wasm.AuthServiceName: { Type: wasm.AuthServiceType, Endpoint: kuadrant.KuadrantAuthClusterName, - FailureMode: wasm.AuthServiceFailureMode(), + FailureMode: wasm.AuthServiceFailureMode(&logger), Timeout: ptr.To(wasm.AuthServiceTimeout()), }, wasm.RateLimitServiceName: { Type: wasm.RateLimitServiceType, Endpoint: kuadrant.KuadrantRateLimitClusterName, - FailureMode: wasm.RatelimitServiceFailureMode(), + FailureMode: wasm.RatelimitServiceFailureMode(&logger), Timeout: ptr.To(wasm.RatelimitServiceTimeout()), }, },