lib/promscrape/discovery/consul: properly pass namespace to Consul watcher

Follow-up for 58a2989fe7
This commit is contained in:
Aliaksandr Valialkin 2021-06-22 17:42:29 +03:00
parent 4adf6c9766
commit f10fa0d1d7

View file

@ -96,7 +96,7 @@ func newAPIConfig(sdc *SDConfig, baseDir string) (*apiConfig, error) {
namespace = os.Getenv("CONSUL_NAMESPACE")
}
cw := newConsulWatcher(client, sdc, dc, sdc.Namespace)
cw := newConsulWatcher(client, sdc, dc, namespace)
cfg := &apiConfig{
tagSeparator: tagSeparator,
consulWatcher: cw,