-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Refactor autodiscover to make it reusable in the Agent #19271
Comments
Pinging @elastic/integrations-platforms (Team:Platforms) |
Note that there are 2 Keystore types, file based one (or local) and k8s' Secret based one. |
The plan sounds good to me, any common logic that we can move out from the providers sounds great. |
It would be through the autodiscover events only. The providers will send start/stop events, but won't really know about the templates or what inputs get started. I understand static secrets (the ones in templates) must be handled by the manager, but we will need to figure out how we make k8s secrets work when coming from hints. |
I have implemented a Pod discovery provider here #21480, we are finally not reusing the whole autodiscover providers for this, but implementing things based on the common watcher code. I expect more conversations to happen around the missing pieces, will open issues for them:
|
Describe the enhancement:
We want to support autodiscover features in the Agent (#19225). For this, it would be nice if we could reuse the existing providers and make Agent handle the runner start/stop logic.
Current status
Right now, autodiscover providers send start/stop events through a bus. The autodiscover manager listens into this bus and manages input/module runners according to these events.
Providers are coupled to config generation (through templates or hints), although all this code is contained in libraries. It is used like this:
beats/libbeat/autodiscover/providers/docker/docker.go
Lines 307 to 315 in 93a4591
I don't see any reason why cannot be done by autodiscover manager (and not the providers) ^
Proposal
To make providers reusable, we need to decouple them from the config generation / runner handling, a few things we would need to do:
Some caveats:
Agent will implement a new template logic that can be hooked into provider events (see the parent issue for more details).
The text was updated successfully, but these errors were encountered: