[8.x](backport #6381) [k8s] embed hints inputs in agent container image #6409
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR embeds the hints-based autodiscovery templates directly into the Elastic Agent container image. These templates, previously fetched by an init container, are now included in the image under
/usr/share/elastic-agent/hints.inputs.d
. The Elastic Agent has been updated to optionally use these embedded templates based on the Kubernetes hints configuration in the user's settings. If hints-based autodiscovery is enabled, the Elastic Agent dynamically reads from the embedded templates directory, ensuring seamless integration without external dependencies.Additionally:
Why is it important?
This change improves the robustness and efficiency of Elastic Agent deployment in Kubernetes environments by:
Checklist
./changelog/fragments
using the changelog toolDisruptive User Impact
This change should not cause any disruption for users. For users who enable hints-based autodiscovery, the behavior remains consistent, with improved reliability. For users who do not enable this feature, the embedded templates will remain unused, ensuring no impact on performance or functionality.
How to test this PR locally
Related issues
This is an automatic backport of pull request [k8s] embed hints inputs in agent container image #6381 done by Mergify.