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