-
Notifications
You must be signed in to change notification settings - Fork 452
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
Choose target container injection with annotation #689
Choose target container injection with annotation #689
Conversation
|
@pavolloffay can you review these changes as they are around auto-instrumentation? |
@fscellos does this PR implement the discussed approach from |
Hello. Not really. |
This PR is missing e2e test, this is a major feature that deserves it. |
@anuraaga @BronzeDeer could you please take a look at the proposal in this PR? The proposal is to basically add an optional annotation e.g. The original proposal from #529 (comment) allows specifying container name per language. |
This PR solves the problem for the special case of injecting into a single container that is not the first, while the suggestion from #529 and PR #683 is the more general solution which allows to configure injection of arbitrary languages into arbitrary many containers at the cost of a slightly increased complexity (allthough not much IMO, its basically filter and map over the container list with the existing injection function, you could even argue that it serves to decouple the injection logic from pod modification logic) Which solution is the correct one in the long-term probably comes down more to whether the idea of injecting multiple containers with potentially different languages in a single pods is a probable use case or falls under YAGNI. Making that call likely falls solely on the shoulders of the maintainers/stewards of the project |
That's ok @BronzeDeer, i just adress problemematic of injection with istio sidecar. |
@pavolloffay @anuraaga could you comment on the design decision between the simple and more general case? And if you decide we stick with the more general approach, could you answer my two small questions in #683, so I can get that PR ready? |
I am fine to move this forward. Right now we don't have any requests to support instrumenting a pod with 2 different languages (e.g. java and nodejs containers). If this requirements comes we could introduce more specific container name annotation per language:
|
@fscellos any update on this PR? |
Hello @pavolloffay, not now. |
Hello @pavolloffay : i can begin to work again on it again. I'll keep you inform. |
Hello @pavolloffay : i just updated PR with :
|
README.md
Outdated
``` | ||
In case of injection on multiple containers, you can indicates all your containers'name separate with comma. | ||
|
||
#### Use customized or vendor instrumentation |
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.
This change should not be here, maybe the PR was not rebased properly?
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.
This section should not be added in this PR
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.
OK. I didn't understand you don't want any modifications in documentation.
I remove all of this and get Readme from main branch of main repo.
@fscellos thanks for working on this, I have left some comments. I would like to move this PR forward, let me know if you have time or I should take over. |
Hello @pavolloffay. |
Hello @pavolloffay. |
Tests started. |
Hello @pavolloffay , @jpkrohling. I correct the two linting problems. |
config/manager/kustomization.yaml
Outdated
@@ -1,2 +1,8 @@ | |||
resources: | |||
- manager.yaml | |||
- manager.yaml |
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.
this file shouldn't be changed in this PR
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.
Yes. I don't understand what happens locally. I keep file from main branch of principal repository.
Apologize.
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.
It don't know why but it seems that something in prepare-e2e (or e2e) targets, something modify this file.
I didn't commit it again.
README.md
Outdated
``` | ||
In case of injection on multiple containers, you can indicates all your containers'name separate with comma. | ||
|
||
#### Use customized or vendor instrumentation |
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.
This section should not be added in this PR
@fscellos please clean the PR - readme and kustomization.yaml and also the lint failed. Otherwise it looks good and we an merge it. |
Hello @pavolloffay. |
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.
PR needs to be rebased and we should add the annotation to the root readme.
README.md
Outdated
@@ -258,6 +258,8 @@ The OpenTelemetry Operator *might* work on versions outside of the given range, | |||
|
|||
| OpenTelemetry Operator | Kubernetes | Cert-Manager | | |||
|------------------------|----------------------|----------------------| | |||
| v0.48.0 | v1.19 to v1.23 | 1.6.1 | |
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 should not be changes in this support table.
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 rebased. I will let you add documentation on your convenience (I already added it then remove)
09721f5
to
e84c061
Compare
@fscellos now the CI is failing :/ |
Hello @pavolloffay . Yes i saw that. I would check it but impossible to pull any image from github repo this morning (so all e2e failed on my side too). |
Hello @pavolloffay . |
@fscellos I have restarted failed jobs. However the PR needs to be rebased again :/. |
e84c061
to
1291dcd
Compare
Hello @pavolloffay. Rebase done. |
Hello @pavolloffay : any news on review ? |
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.
@fscellos great work!
I think we have lost the readme documentation for this feature during the rebasing. I will merge it without the docs, but please open a follow up PR to document this.
Ok. I think i didin't understand one of your remarks because i explicitlty remove documention about this feature. |
Choose container injection by annotation
This PR address the same problem of the following PR (#683) without introducing big changes in codebase.
I just introduce a new annotation near existing auto-inject instrumenation that allow to search first for a corresponding containername before fallback to the first one by default :
This approach present the advantage to let end user to define exact injection target (as is some cases, cluster administrator won't want user to manipulate Instrumentation ressources to keep control on sampling rate)
Resolves #618