This commit is contained in:
Daniel Berteaud 2023-10-08 16:31:31 +02:00
parent 3c144226c2
commit c40b09d3e0
2 changed files with 7 additions and 5 deletions

View File

@ -1,6 +1,8 @@
job [[ .egress_gw.job_name | toJSON ]] {
[[ $c := merge .egress_gw . -]]
[[ template "common/job_start.tpl" . ]]
job [[ .egress_gw.instance | toJSON ]] {
[[ template "common/job_start.tpl" $c ]]
group "egress-gateway" {
@ -10,7 +12,7 @@ job [[ .egress_gw.job_name | toJSON ]] {
# Terminating gateway definition
service {
name = "egress-gateway[[ .env.suffix ]]"
name = "[[ .egress_gw.instance ]][[ $c.consul.suffix ]]"
connect {
gateway {
proxy {}
@ -30,7 +32,7 @@ job [[ .egress_gw.job_name | toJSON ]] {
# Access the CA certificate
volumes = ["../alloc/data:/data"]
}
[[ template "common/resources.tpl" .consul.connect.resources ]]
[[ template "common/resources.tpl" $c.consul.connect.resources ]]
}
}
}

View File

@ -2,7 +2,7 @@
egress_gw:
# Name of the Nomad job
job_name: egress-gateway
instance: egress-gateway
# Number of instances
count: 1