From 00db9df0e7f47ff7add8a6e04038d8bcf2e34bf5 Mon Sep 17 00:00:00 2001 From: Adam Cattermole Date: Thu, 15 Feb 2024 12:57:21 +0000 Subject: [PATCH] Remove extra quotes in tracing tags --- controllers/authorino_controller.go | 2 +- controllers/authorino_controller_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/authorino_controller.go b/controllers/authorino_controller.go index 3f6a8233..dabe2d68 100644 --- a/controllers/authorino_controller.go +++ b/controllers/authorino_controller.go @@ -384,7 +384,7 @@ func (r *AuthorinoReconciler) buildAuthorinoArgs(authorino *api.Authorino) []str if tracingServiceEndpoint := authorino.Spec.Tracing.Endpoint; tracingServiceEndpoint != "" { args = append(args, fmt.Sprintf("--%s=%s", flagTracingServiceEndpoint, tracingServiceEndpoint)) for key, value := range authorino.Spec.Tracing.Tags { - args = append(args, fmt.Sprintf(`--%s="%s=%s"`, flagTracingServiceTag, key, value)) + args = append(args, fmt.Sprintf(`--%s=%s=%s`, flagTracingServiceTag, key, value)) } if authorino.Spec.Tracing.Insecure { args = append(args, fmt.Sprintf(`--%s`, flagTracingServiceInsecure)) diff --git a/controllers/authorino_controller_test.go b/controllers/authorino_controller_test.go index 0caca238..eb002c7b 100644 --- a/controllers/authorino_controller_test.go +++ b/controllers/authorino_controller_test.go @@ -352,7 +352,7 @@ func checkAuthorinoArgs(authorinoInstance *api.Authorino, args []string) { case flagTracingServiceEndpoint: Expect(value).Should(Equal(authorinoInstance.Spec.Tracing.Endpoint)) case flagTracingServiceTag: - kv := strings.Split(strings.TrimPrefix(strings.TrimSuffix(value, `"`), `"`), "=") + kv := strings.Split(value, "=") Expect(len(kv)).Should(Equal(2)) Expect(kv[1]).Should(Equal(authorinoInstance.Spec.Tracing.Tags[kv[0]])) case flagTracingServiceInsecure: