vmagent: set consul datacenter to avoid agent:read requirement
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/kubeconform Pipeline was successful

The consul SD discovered 0 targets: VictoriaMetrics queried
/v1/agent/self to auto-detect the datacenter, which needs agent:read that
the anonymous consul token lacks (catalog/health reads work anonymously).
Set datacenter: au-syd1 explicitly so the agent/self call is skipped.
This commit is contained in:
2026-07-06 23:57:51 +10:00
parent 95c5d71222
commit 4f3c81a303
+4
View File
@@ -99,6 +99,10 @@ spec:
consul_sd_configs: consul_sd_configs:
- server: consul.service.consul:443 - server: consul.service.consul:443
scheme: https scheme: https
# Set datacenter explicitly so VM does not call /v1/agent/self
# (which needs agent:read that the anonymous token lacks); catalog
# and health reads work anonymously.
datacenter: au-syd1
tls_config: tls_config:
ca_file: /etc/vmagent-tls/ca.crt ca_file: /etc/vmagent-tls/ca.crt
relabel_configs: relabel_configs: