-
Notifications
You must be signed in to change notification settings - Fork 344
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
add env var JAEGER_DISABLED #1285
add env var JAEGER_DISABLED #1285
Conversation
Signed-off-by: Simon Schneider <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #1285 +/- ##
==========================================
+ Coverage 87.32% 87.36% +0.03%
==========================================
Files 89 89
Lines 4947 4970 +23
==========================================
+ Hits 4320 4342 +22
- Misses 464 465 +1
Partials 163 163
Continue to review full report at Codecov.
|
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.
As well as adding theJAEGER_DISABLED
flag, it would be good to avoid injecting the agent with the query service.
// JaegerDisabled adds the JAEGER_DISABLED environment flag to the | ||
// query component to prevent it from adding its own traces. | ||
// The default, if ommited, is false | ||
JaegerDisabled *bool `json:"jaegerDisabled,omitempty"` |
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.
Would it be better calling it tracingEnabled
- with a default of true
?
// JaegerDisabled adds the JAEGER_DISABLED environment flag to the | ||
// query component to prevent it from adding its own traces. | ||
// The default, if ommited, is false | ||
JaegerDisabled *bool `json:"jaegerDisabled,omitempty"` |
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.
Same here.
Signed-off-by: Simon Schneider <[email protected]>
Where should this be implemented? Directly in inject.Sidecar()? |
@sschne Just don't include the |
Signed-off-by: Simon Schneider <[email protected]>
@objectiser thanks for the hint, but that was not enough. The Strategy would inject the sidecar regardless of the annotation, so there is will be a race between the Strategy and namespace controller. Now i also prevented the strategy from injecting the sidecar. |
queryDep := inject.Sidecar(jaeger, inject.OAuthProxy(jaeger, query.Get())) | ||
queryDep := inject.OAuthProxy(jaeger, query.Get()) | ||
if jaeger.Spec.Query.TracingEnabled == nil || *jaeger.Spec.Query.TracingEnabled == true { | ||
queryDep = inject.Sidecar(jaeger, queryDep) |
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.
@jpkrohling should it be necessary to explicitly add the sidecar if the annotation has been defined? If so, what is the purpose of adding the annotation?
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.
We can then avoid the query deployment from being created without the sidecar, only to get the sidecar injected on the next reconciliation for the Deployment
resource.
Thanks @sschne |
Adds option to set the environment variable JAEGER_DISABLED to query or all-in-one deployment.
Closes: #1148
Signed-off-by: Simon Schneider [email protected]