-
Notifications
You must be signed in to change notification settings - Fork 2.9k
[chore][k8sattributesprocessor] Start informers in the provider function #39301
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
base: main
Are you sure you want to change the base?
[chore][k8sattributesprocessor] Start informers in the provider function #39301
Conversation
0bbecfc
to
278adbc
Compare
278adbc
to
722c85f
Compare
Please address conflict |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
8cea4e9
to
5519c24
Compare
5519c24
to
ee9242c
Compare
ee9242c
to
8daf5d5
Compare
8daf5d5
to
a9d7c90
Compare
a9d7c90
to
4564ab8
Compare
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.
The change LGTM. I think we can proceed with this one to unblock the follow-ups coming.
@dmitryax @TylerHelmuth @fatsheep9146 please take a look
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
Description
We'd like instances of the k8sattributes processor to share local K8s resource caches (represented by the
informer
concept from client-go). See #36234 for the justification and a broad overview. This change is the first in a series of refactors necessary to make this possible.In order to share informers, the processor cannot be responsible for starting them. This PR moves that logic to informer provider functions. Informers are still stopped by closing a channel provided at construction.
The processor also makes no assumptions about whether the informers will keep running after
Stop
is called. As a result, it needs to explicitly track its own event handler registration, and unregister in an orderly matter when stopping.See #36604 for all the refactoring changes put together. I've split this PR out to make review easier.
Link to tracking issue
Part of #36234
Split out from #36604
Testing
Modified existing tests.