Use new constraints template
This commit is contained in:
parent
89d47a023a
commit
1229b2a3d1
|
@ -10,12 +10,14 @@ job "traefik" {
|
|||
count = 2
|
||||
shutdown_delay = "6s"
|
||||
|
||||
# Force different instances to run on distinct nodes
|
||||
|
||||
|
||||
constraint {
|
||||
operator = "distinct_hosts"
|
||||
value = "true"
|
||||
}
|
||||
|
||||
|
||||
network {
|
||||
mode = "bridge"
|
||||
port "http" {
|
||||
|
@ -116,7 +118,7 @@ job "traefik" {
|
|||
template {
|
||||
data = <<_EOF
|
||||
log:
|
||||
level: INFO
|
||||
level: DEBUG
|
||||
|
||||
accessLog:
|
||||
bufferingSize: 100
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
log:
|
||||
level: INFO
|
||||
level: DEBUG
|
||||
|
||||
accessLog:
|
||||
bufferingSize: 100
|
||||
|
|
|
@ -8,11 +8,7 @@ job "[[ .instance ]]" {
|
|||
count = [[ .traefik.count ]]
|
||||
shutdown_delay = "6s"
|
||||
|
||||
# Force different instances to run on distinct nodes
|
||||
constraint {
|
||||
operator = "distinct_hosts"
|
||||
value = "true"
|
||||
}
|
||||
[[ template "common/constraints" $c ]]
|
||||
|
||||
network {
|
||||
mode = "bridge"
|
||||
|
|
|
@ -19,9 +19,13 @@ traefik:
|
|||
# Number of traefik instances
|
||||
count: 2
|
||||
|
||||
# Set a high priority for the job
|
||||
nomad:
|
||||
# Set a high priority for the job
|
||||
priority: 70
|
||||
# Ensure we run on distinct hosts
|
||||
constraints:
|
||||
- operator: distinct_hosts
|
||||
value: true
|
||||
|
||||
api:
|
||||
traefik:
|
||||
|
|
Loading…
Reference in New Issue