When using the binary install method, prometheus.yml is written to correctly, then binary.rb runs and ark overwrites it with the default prometheus.yml from the tarball.
As far as I can tell, the minimum effective fix is simply to move
include_recipe "prometheus::#{node['prometheus']['install_method']}"
above the config section of default.rb, so the recipe workflow becomes directory setup -> installation -> write config -> run service. (Gitlab's Prometheus cookbook appears to have taken this approach.)
I'd be happy to submit a (slightly more refined) patch, but would like a second pair of eyes to confirm that this is an actual bug and not a case of me being new to Chef and missing a gotcha.
When using the binary install method,
prometheus.yml
is written to correctly, thenbinary.rb
runs and ark overwrites it with the defaultprometheus.yml
from the tarball.As far as I can tell, the minimum effective fix is simply to move
include_recipe "prometheus::#{node['prometheus']['install_method']}"
above the config section ofdefault.rb
, so the recipe workflow becomes directory setup -> installation -> write config -> run service. (Gitlab's Prometheus cookbook appears to have taken this approach.)I'd be happy to submit a (slightly more refined) patch, but would like a second pair of eyes to confirm that this is an actual bug and not a case of me being new to Chef and missing a gotcha.