-
Notifications
You must be signed in to change notification settings - Fork 154
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
Investigate the copy of autodiscovery templates inside Elastic Agent image #5661
Comments
@cmacknz the ask here is; to copy the templates inside agent container images or not to copy?! I believe that, given the size of these templates 920KB, this makes sense as it will allow us to discard the need of an init container that downloads the respective agent release archive and extracts the templates from there. As a result, when hints autodiscovery feature is enabled, we get more robust and faster pod start sequence, as well as we are not prone to external network errors (we can also support airtight environments). Now on the downsides, the templates can't be updated without a new elastic-agent container image. To this end, this isn't a deal breaker for me as I don't believe there will be an urgent case that demands it and the frequency of stack releases is enough to cover them. Any thoughts? |
If it helps, we have run only 2 times the CI to update the templates so far |
Agreed
Most of the time this will be fine. If we do this can we make it possible to override the set of embedded integrations? Maybe just changing the location agent expects the inputs.d directory to exist at to something else so a new volume mount can provide the configurations? This doesn't have to be the default way but gives us an escape hatch to delivery fixes without requiring releases. |
Yes that's a nice proposal @cmacknz and it is actually feasible exactly the way you describe it. The only "tricky" part is to make agent detect these from another path outside it's state one as the latter most of the times is a mount of a host path. Maybe @gizas please correct me if I am wrong but the job that keeps these templates up to date is this one? I believe the solution to this issue is relatively straight forward and comprises of two steps:
|
We need to understand the performance impact this will have an users that are not using hints with Kubernetes. Being that all inputs are placed into This change #6169 will also no longer have an affect as the I don't think with this information, we just want these inputs to be read and parsed all the time because they are in |
thanks for chiming in @blakerouse, that is quite helpful 🙂 How about the following adjustment to the plan; embed the hints in the agent image under |
@pkoutsovasilis I think that is definitely a valid option, would be nice to do it based on the setting in the configuration though. I think having to have both a flag/env as well as the config setting seems complicated and easy to get wrong. It is also possible that we could remove the need to copy and just have agent read from that path in the case that the setting is enabled. See:
That could be changed to add another discover path when that setting is enabled. |
Ok I see what you mean and I agree |
@pkoutsovasilis I agree it is miles apart, but we don't allow live reloading of the providers configuration. I think just a direct check in this code path for it, is the simplest way to make it work. |
Currently we have a CI job that is responsible for creating all of the hints autdiscovery templates under https://github.com/elastic/elastic-agent/tree/main/deploy/kubernetes/elastic-agent-standalone/templates.d
The goal of this story is to make a copy of them inside the elastic agent image and keep them inside it for the users.
Pros: This will eliminate the need of an init container for our users
Neg: We need to figure out what we will do with the CI update cycle of the templates. The CI update is not affected by the agents release cycle but we need to see if want to keep both (the ci and the local copy inside image) and if yes to think of issues in case of differences
Initiator of the problem: #5643 (comment)
The text was updated successfully, but these errors were encountered: