-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove extra quotes in tracing tags #172
Remove extra quotes in tracing tags #172
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #172 +/- ##
=======================================
Coverage 61.78% 61.78%
=======================================
Files 2 2
Lines 785 785
=======================================
Hits 485 485
Misses 249 249
Partials 51 51
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -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)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tested with tag values containing white spaces?
spec:
tracing:
tags:
tag-with-white-space: value with spaces
Maybe also a key containing white spaces:
spec:
tracing:
tags:
"tag key with spaces": some-value
I wonder if it could break the deployment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep tested now:
tracing:
endpoint: rpc://jaeger-collector.istio-system.svc.cluster.local:4317
insecure: true
tags:
key with spaces: value with spaces
test-key: test-value
spec:
containers:
- args:
- --allow-superseding-host-subsets
- --tracing-service-endpoint=rpc://jaeger-collector.istio-system.svc.cluster.local:4317
- --tracing-service-insecure
- --tracing-service-tag=key with spaces=value with spaces
- --tracing-service-tag=test-key=test-value
I see no reason now for keeping the usage of trim functions in the tests:
WDYT? |
638fbdc
to
00db9df
Compare
Agreed, removed in commit 00db9df |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! 😍
Tested with new image built from this (quay.io/acatterm/authorino-operator:fix-tracing-tags):
Authorino CR spec:
Resolves #171