Add region and datacenter meta
And use conv.ToBool for .prometheus.enabled
This commit is contained in:
parent
a7aba5105a
commit
3f9a0060ca
|
@ -1,5 +1,5 @@
|
|||
meta {
|
||||
[[- if .prometheus.enabled ]]
|
||||
[[- if conv.ToBool .prometheus.enabled ]]
|
||||
[[- if not (has .consul.meta "metrics-port") ]]
|
||||
metrics-port = "${NOMAD_HOST_PORT_metrics}"
|
||||
[[- end ]]
|
||||
|
|
|
@ -81,6 +81,8 @@ consul:
|
|||
job: '${NOMAD_JOB_NAME}'
|
||||
group: '${NOMAD_GROUP_NAME}'
|
||||
namespace: '${NOMAD_NAMESPACE}'
|
||||
region: '${NOMAD_REGION}'
|
||||
datacenter: '${NOMAD_DC}'
|
||||
node: '${node.unique.name}'
|
||||
|
||||
# Consul connect config
|
||||
|
|
Loading…
Reference in New Issue