[9.3] (backport #15427) Override fleet.ssl.certificate_authorities from env vars in container mode#15467
[9.3] (backport #15427) Override fleet.ssl.certificate_authorities from env vars in container mode#15467mergify[bot] wants to merge 1 commit into
Conversation
⏳ Build in-progress, with failures
Failed CI Stepscc @lorienhu |
TL;DRThe FIPS-only unit job fails deterministically in the new Remediation
Investigation detailsRoot CauseAt Evidence
VerificationStatic analysis of the failing log, PR diff, and commit Follow-upNo existing What is this? | From workflow: PR Buildkite Detective Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not. |
What does this PR do?
When in container mode, override
fleet.ssl.certificate_authoritiesfrom env varsFLEET_CA,KIBANA_CA, andELASTICSEARCH_CAinstead of using savedfleet.encvalues.Follows the same first-set-wins fallback chain used in setup_config.go.
Why is it important?
Without this override, an agent running in container mode will crash during startup if
fleet.encstill contains afleet.ssl.certificate_authoritiespath that no longer exists on disk.Checklist
[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration files./changelog/fragmentsusing the changelog toolDisruptive User Impact
N/A
How to test this PR locally
Unit test: TestContainerEnvOverridesFleetTLSPaths
Integration test: TestContainerCMDTLSCertOverride
Manually: Using kind, deploy ECK cluster. Enroll an agent with FLEET_SERVER_CLIENT_AUTH=required and FLEET_CA pointing to a mounted CA bundle. Unmount the CA bundle, unset env vars, and verify that agent restarts healthy.
Related issues
Closes #15408
Relates #14408
This is an automatic backport of pull request #15427 done by Mergify.