From 4bffd5ed4778f30f712b031b006b0c2c5bb6705d 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 --- api/v1beta1/zz_generated.deepcopy.go | 2 +- .../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 | 70 ++++++++++++------- 6 files changed, 66 insertions(+), 43 deletions(-) diff --git a/api/v1beta1/zz_generated.deepcopy.go b/api/v1beta1/zz_generated.deepcopy.go index ce406a60e..8c36005f5 100644 --- a/api/v1beta1/zz_generated.deepcopy.go +++ b/api/v1beta1/zz_generated.deepcopy.go @@ -21,7 +21,7 @@ limitations under the License. package v1beta1 import ( - "k8s.io/apimachinery/pkg/apis/meta/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" ) diff --git a/controllers/envoy_gateway_extension_reconciler.go b/controllers/envoy_gateway_extension_reconciler.go index 4a89c0313..0ca2cd060 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..a66d0bad2 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..57f71ddd7 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..b58e1c412 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..ae5a9692f 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) { @@ -74,6 +78,7 @@ var _ = Describe("Rate Limiting WasmPlugin controller", func() { err = testClient().Create(ctx, gateway) Expect(err).ToNot(HaveOccurred()) Eventually(tests.GatewayIsReady(ctx, testClient(), gateway)).WithContext(ctx).Should(BeTrue()) + logger = controller.LoggerFromContext(ctx).WithName("IstioExtensionReconcilerTest") } BeforeEach(beforeEachCallback) @@ -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) { @@ -839,6 +845,7 @@ var _ = Describe("Rate Limiting WasmPlugin controller", func() { err = testClient().Create(ctx, gateway) Expect(err).ToNot(HaveOccurred()) Eventually(tests.GatewayIsReady(ctx, testClient(), gateway)).WithContext(ctx).Should(BeTrue()) + logger = controller.LoggerFromContext(ctx).WithName("IstioExtensionReconcilerTest") } BeforeEach(beforeEachCallback) @@ -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) { @@ -1347,6 +1355,7 @@ var _ = Describe("Rate Limiting WasmPlugin controller", func() { err = testClient().Create(ctx, gateway) Expect(err).ToNot(HaveOccurred()) Eventually(tests.GatewayIsReady(ctx, testClient(), gateway)).WithContext(ctx).Should(BeTrue()) + logger = controller.LoggerFromContext(ctx).WithName("IstioExtensionReconcilerTest") } BeforeEach(beforeEachCallback) @@ -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) { @@ -1642,6 +1652,7 @@ var _ = Describe("Rate Limiting WasmPlugin controller", func() { err = testClient().Create(ctx, gateway) Expect(err).ToNot(HaveOccurred()) Eventually(tests.GatewayIsReady(ctx, testClient(), gateway)).WithContext(ctx).Should(BeTrue()) + logger = controller.LoggerFromContext(ctx).WithName("IstioExtensionReconcilerTest") } BeforeEach(beforeEachCallback) @@ -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) { @@ -1930,6 +1942,7 @@ var _ = Describe("Rate Limiting WasmPlugin controller", func() { err = testClient().Create(ctx, gateway) Expect(err).ToNot(HaveOccurred()) Eventually(tests.GatewayIsReady(ctx, testClient(), gateway)).WithContext(ctx).Should(BeTrue()) + logger = controller.LoggerFromContext(ctx).WithName("IstioExtensionReconcilerTest") } BeforeEach(beforeEachCallback) @@ -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) { @@ -2282,6 +2296,7 @@ var _ = Describe("Rate Limiting WasmPlugin controller", func() { err = testClient().Create(ctx, gateway) Expect(err).ToNot(HaveOccurred()) Eventually(tests.GatewayIsReady(ctx, testClient(), gateway)).WithContext(ctx).Should(BeTrue()) + logger = controller.LoggerFromContext(ctx).WithName("IstioExtensionReconcilerTest") } BeforeEach(beforeEachCallback) @@ -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) { @@ -2430,13 +2446,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()), }, },