Skip to content
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

[8.x](backport #6169) Only run providers that are referenced in the policy #6181

Open
wants to merge 1 commit into
base: 8.x
Choose a base branch
from

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Dec 2, 2024

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:

  • Reduces the memory and load of the Elastic Agent, by only running the providers it references.
  • No longer requires access to the kubernetes API or resources just to run an Elastic Agent (as long as its not using any ${kubernetes*` references in the policy).
  • Fixes an issue where if no providers are running that a set of empty variables is passed to the coordinator.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [ ] I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in ./changelog/fragments using 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


This is an automatic backport of pull request #6169 done by [Mergify](https://mergify.com).

@mergify mergify bot requested a review from a team as a code owner December 2, 2024 13:52
@mergify mergify bot added the backport label Dec 2, 2024
@mergify mergify bot requested review from blakerouse and kaanyalti and removed request for a team December 2, 2024 13:52
Copy link

Quality Gate failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 40%)

See analysis details on SonarQube

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant