1871c1edbc
* jobspec: breakup parse.go into smaller files * add sidecar_task parsing to jobspec and api * jobspec: combine service parsing logic for task and group service stanzas * api: use slice of ConsulUpstream values instead of pointers
55 lines
936 B
HCL
55 lines
936 B
HCL
job "foo" {
|
|
datacenters = ["dc1"]
|
|
group "bar" {
|
|
count = 3
|
|
network {
|
|
mode = "bridge"
|
|
port "http" {
|
|
static = 80
|
|
to = 8080
|
|
}
|
|
}
|
|
|
|
service {
|
|
name = "connect-service"
|
|
tags = ["foo", "bar"]
|
|
canary_tags = ["canary", "bam"]
|
|
port = "1234"
|
|
|
|
connect {
|
|
sidecar_service {
|
|
proxy {
|
|
upstreams {
|
|
destination_name = "other-service"
|
|
local_bind_port = 4567
|
|
}
|
|
}
|
|
}
|
|
sidecar_task {
|
|
resources {
|
|
cpu = 500
|
|
memory = 1024
|
|
}
|
|
|
|
env {
|
|
FOO = "abc"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
task "bar" {
|
|
driver = "raw_exec"
|
|
config {
|
|
command = "bash"
|
|
args = ["-c", "echo hi"]
|
|
}
|
|
resources {
|
|
network {
|
|
mbits = 10
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|