[WIP] Ensure fleet outputs block is added when fleet is enabled.#9127
[WIP] Ensure fleet outputs block is added when fleet is enabled.#9127naemono wants to merge 9 commits intoelastic:mainfrom
Conversation
Ensure fleet agent ES hosts block is removed when fleet is enabled. Tests Cleanup Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Signed-off-by: Michael Montgomery <mmontg1@gmail.com>
Review: Breaking use-case analysisI looked at this PR with a focus on use cases that could break. The overall direction of removing the init-container CA trust hack and moving to Kibana-side Fleet outputs configuration is sound, but there are several scenarios where the current implementation would cause regressions. Critical1.
|
Resolves: #9112
Summary
Configuring Fleet-Server with ECK has historically been difficult for the end-user with some edge cases that, without reading through all of the documentation, will cause the deployment to fail. Specifically trusting the necessary Certificate Authorities when using self-signed certificates (which ECK does by default) has not been simple with the different ways that Agent/Fleet-Server can be configured (root/non-root/etc).
Current State
If Agent/Fleet-server is run as root, we inject the CA directly into the containers OS-level CA trust, which allows the CA to be trusted explicitly. When running as non-root, which is required in many secure environments, one must add the following configuration block in Kibana, or Fleet-server will fail (docs reference):
In addition, the following field must not exist in the Kibana configuration when this outputs block exists:
xpack.fleet.agents.elasticsearch.hostsFuture State
This change is an attempt to do the following
xpack.fleet.outputsblock when appropriatexpack.fleet-agents.elasticsearch.hostsfield is missing when theoutputsblock exists.This will allow the following Kibana configuration block to "just work"
Testing
Manual
Resulting Kibana configuration
E2E