Created a PR here to test a theory that it doesn't work properly when it comes to kubernetes secret mounts. https://github.com/elastic/elastic-agent/pull/11050 The PR is failing highlighting that the logic is flawed and needs to be fixed.