Open t-8ch opened 3 years ago
Thanks for opening the issue @t-8ch, and for all the details/thought you put into it.
I agree that being able to configure apm-server using environment variables would be a nice. I don't think this is an easy task given the config framework we use, but it's worth looking into.
For Kubernetes specifically: in case you're not aware, there is an operator ("Elastic Cloud on Kubernetes") which you can use to orchestrate the setup of Elasticsearch, Kibana, Elastic APM Server, and more besides. The operator provides CRDs which can define configuration directly in the manifest: https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-apm-advanced-configuration.html
We're currently in the process of rearchitecting how APM Server is deployed, to build on top of Fleet: https://www.elastic.co/guide/en/fleet/current/index.html. That will mean APM Server is not deployed as a single standalone service, but will be delivered as an "integration" to Elastic Agent via Fleet. I'm not yet sure how declarative configuration will look in this new world -- we'll update this issue when things become clearer.
@axw Thanks for your response. The operator looks indeed very useful for my usecase. I will take a look at it.
Is your feature request related to a problem? Please describe.
The APM docker container can not be configured with environment variables. Environment variables have various advantages over the other available configuration mechanisms. (Especially on Kubernetes)
Describe the solution you'd like
It would be nice if the apm container could be configured with environment variables, similar to the other elastic products.
Describe alternatives you've considered
Volume mounting a custom configuration that uses custom configuration environment variables
Volume-mounting a custom configuration file into the container
Secret mounting a custom configuration file into the container
Image with custom configuration