Only run providers that are referenced in the policy#6169
Only run providers that are referenced in the policy#6169blakerouse merged 5 commits intoelastic:mainfrom
Conversation
|
This pull request does not have a backport label. Could you fix it @blakerouse? 🙏
|
|
|
|
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
swiatekm
left a comment
There was a problem hiding this comment.
Looks good overall, had some questions about the design and intended control flow.
|
(cherry picked from commit b811364)
|
Nice! We need to update the docs to indicate that providers are no longer enabled by default for the first release that will have this change (8.18 I believe): https://www.elastic.co/guide/en/fleet/current/providers.html#disable-providers-by-default Some of the individual providers also indicate they are enabled by default like https://www.elastic.co/guide/en/fleet/current/kubernetes_leaderelection-provider.html CC @kilfoyle |
We only signal from providers if the emitted data is different from the current state. This caused a bug where the data wasn't ever emitted if it was empty. The provider controller now distinguishes between no data (yet) and empty data. As a result, it's again possible to effectively disable all providers by using a local provider with no data. This is a regression caused by #6114. It doesn't apply to the main and 8.x branches due to #6169 refactoring provider initialisation in those.
We only signal from providers if the emitted data is different from the current state. This caused a bug where the data wasn't ever emitted if it was empty. The provider controller now distinguishes between no data (yet) and empty data. As a result, it's again possible to effectively disable all providers by using a local provider with no data. This is a regression caused by #6114. It doesn't apply to the main and 8.x branches due to #6169 refactoring provider initialisation in those.
We only signal from providers if the emitted data is different from the current state. This caused a bug where the data wasn't ever emitted if it was empty. The provider controller now distinguishes between no data (yet) and empty data. As a result, it's again possible to effectively disable all providers by using a local provider with no data. This is a regression caused by #6114. It doesn't apply to the main and 8.x branches due to #6169 refactoring provider initialisation in those. (cherry picked from commit 8ea9439)
We only signal from providers if the emitted data is different from the current state. This caused a bug where the data wasn't ever emitted if it was empty. The provider controller now distinguishes between no data (yet) and empty data. As a result, it's again possible to effectively disable all providers by using a local provider with no data. This is a regression caused by #6114. It doesn't apply to the main and 8.x branches due to #6169 refactoring provider initialisation in those. (cherry picked from commit 8ea9439) Co-authored-by: Mikołaj Świątek <mail@mikolajswiatek.com>




What does this PR do?
This updates the Elastic Agent to only run composable providers if they are referenced in the policy.
Why is it important?
This change provides the following benefits:
Checklist
[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration files./changelog/fragmentsusing the changelog tool[ ] I have added an integration test or an E2E test(covered by unit tests)Disruptive User Impact
None. As it still runs all those that are referenced from the user.
How to test this PR locally
Run the elastic-agent container with just the system integration and notice that it doesn't require access to the Kubernetes API any more.
Related issues