-
Notifications
You must be signed in to change notification settings - Fork 345
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
Per namespace agent injection #897
Per namespace agent injection #897
Conversation
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
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.
Only a couple of things that can be improved, but looks very good overall!
JaegerCommonSpec: v1.JaegerCommonSpec{ | ||
// add inject annotation to jaeger deployment to non existing Jaeger instance | ||
// we don't want to inject agent to jaeger deployment because the port collisions | ||
Annotations: map[string]string{inject.Annotation: "doesNotExists"}, |
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.
Not sure I get it. Are you saying that if a Jaeger CR for all-in-one is created, it will get a sidecar injected if the namespace is annotated, unless the deployment is annotated with a non-existing Jaeger instance?
I think the operator should handle this special case: we can detect that the deployment is a Jaeger deployment, skip 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.
Not sure I get it. Are you saying that if a Jaeger CR for all-in-one is created, it will get a sidecar injected if the namespace is annotated, unless the deployment is annotated with a non-existing Jaeger instance?
Yes, it will get sidecar injected.
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.
I will create an issue for it
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.
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 possible to fix it in this PR? This currently isn't a problem, as the Jaeger deployment has to be explicitly annotated to reach this situation, whereas current deployment will fail once this PR is merged and the namespace gets annotated. It should be relatively simple, as the Needed
could just check for label app: jaeger
, or app.kubernetes.io/part-of: jaeger
.
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.
I would prefer a separate PR this is already a medium size.
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.
Alright, let's just keep in mind that we probably don't want to release 1.17 with this bug.
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
Signed-off-by: Pavol Loffay <[email protected]>
@jpkrohling I have applied requested changes. It should be ready from my side. |
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.
Just need to clarify #900.
Resolves #373
This adds a capability to auto inject Jaeger agent to namespaces annotated with
sidecar.jaegertracing.io/inject
- the same annotation which is used for deployments.It brings a complication when the annotation is present on both namespace and deployment. Then the deployment has higher precedence, however if the specified instance on deployment is not found it does not fallback to the instance specified on the namespace.
Other notable changes
namespaces
to cluster role bindingdeploy/
directoryThere was a discussion that Jaeger should not require access to the cluster resources and this PR adds the requirement on accessing
Namespaces
. At the moment the operator requires access toClusterRoleBinding
. To make the operator work without cluster-wide RBAC it will need more refactoring in a separate PR - related to #791.Once merged
My test notes:
Signed-off-by: Pavol Loffay [email protected]