Skip to content

Commit

Permalink
Remove extra quotes in tracing tags
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-cattermole committed Feb 15, 2024
1 parent b0796bc commit 00db9df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion controllers/authorino_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion controllers/authorino_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 00db9df

Please sign in to comment.