How can we improve Prometheus design to suit our purposes better? How can we make it more dynamic and more scheduler friendly?
One improvement we can make is the usage of environment variables. That would save us from having to create a new image every time we need to change its configuration. At the same time, environment variables would remove the need to use a network drive (at least for configuration).
When using containers, environment variables are a preferable way of passing configuration information to the processes running inside them.
We can make a generic solution that will transform any environment variable into a Prometheus configuration entry or an initialization argument.
We'll go through the code I created. It is written in Go and should be relatively straightforward to understand even if you are not a Go developer...