-
Notifications
You must be signed in to change notification settings - Fork 148
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
[Helm] Allow providing CA certificate of the Fleet Server when running the agent in fleet mode #6285
Comments
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
@pkoutsovasilis I assume that those variables are missing from Helm - correct? which would be required before GA of this. Does it make sense to ensure that all the options available can be configured via Helm? (referring to these) |
Hey @nimarezainia 👋, apologies for the delay - this one slipped off my radar. To address your question, we’re indeed missing the values to pass inside the container for these variables:
Regarding the proxy extra args, it seems these aren’t supported when running a containerized agent (relevant code reference). One issue is that variables like FLEET_CA, KIBANA_CA, ELASTICSEARCH_CA, ELASTIC_AGENT_CERT, and ELASTIC_AGENT_CERT_KEY are essentially file paths. Since Helm doesn’t allow users to directly input or read file contents, the workaround is to let users specify their content instead. Then, we can create custom ConfigMaps that the Helm chart can mount, setting up the respective container environment variables accordingly. |
just a correction, these may be file-paths or actual CA/certs. It would be great if we could support the file path option also. |
I believe at least elasticsearch ca is ignored in fleet mode (which the issue creator mentions), worth checking the other variables as well. |
@nimarezainia I indeed do remember some certificate-related env vars that could be either a path or the actual certificate value but for these ones from what I have seen in the code and from what I read in the documentation
are paths only? please tell me what I am missing. Moreover, supporting a user specifying a path during the installation and making this path appear inside a pod with the same contents is not possible as Helm doesn't support reading contents of arbitrary paths. Two possible solutions I can thing of are:
|
I may be mistaken. @AndersonQ would you know? can these fields have a cert or is it always a path? |
When installing the agent in Fleet Mode with something like:
If the Fleet Server is configured with a certificate signed by a corporate / custom / intermediate CA the Elastic Agent should get the CA certificate configured on FLEET_CA environment variable (if I'm not mistaken, based on https://www.elastic.co/guide/en/fleet/current/agent-environment-variables.html#env-enroll-agent).
The only current workaround is to use
--set agent.fleet.insecure=true
to bypass the certificate check during enrollment.Note that providing the Elasticsearch CA for a normal agent (Fleet Managed) is not needed as it will be fetched from the policy at a later stage.
In my opinion this is important to achieve before considering the helm chart GA (cc: @nimarezainia / @pkoutsovasilis ).
The text was updated successfully, but these errors were encountered: