Do not allocate a port for metrics unless prometheus is enabled

This commit is contained in:
Daniel Berteaud 2024-01-05 16:38:01 +01:00
parent b55a2f232d
commit 9d6c2e62c6
2 changed files with 2 additions and 1 deletions

View File

@ -23,7 +23,6 @@ job "traefik" {
static = 443
to = 5443
}
port "metrics" {}
}
service {

View File

@ -29,7 +29,9 @@ job [[ .instance | toJSON ]] {
}
[[- end ]]
[[- end ]]
[[- if .prometheus.enabled ]]
port "metrics" {}
[[- end ]]
}
service {