2020-04-10 23:42:32 +00:00
|
|
|
job "service-connect-proxy" {
|
|
|
|
type = "service"
|
|
|
|
|
|
|
|
group "group" {
|
|
|
|
service {
|
|
|
|
name = "example"
|
2020-04-23 18:32:44 +00:00
|
|
|
|
2020-04-10 23:42:32 +00:00
|
|
|
connect {
|
|
|
|
sidecar_service {
|
|
|
|
proxy {
|
|
|
|
local_service_port = 8080
|
|
|
|
local_service_address = "10.0.1.2"
|
2020-04-23 18:32:44 +00:00
|
|
|
|
2020-04-10 23:42:32 +00:00
|
|
|
upstreams {
|
|
|
|
destination_name = "upstream1"
|
|
|
|
local_bind_port = 2001
|
|
|
|
}
|
2020-04-23 18:32:44 +00:00
|
|
|
|
2020-04-10 23:42:32 +00:00
|
|
|
upstreams {
|
|
|
|
destination_name = "upstream2"
|
|
|
|
local_bind_port = 2002
|
|
|
|
}
|
2020-04-23 18:32:44 +00:00
|
|
|
|
2020-04-10 23:42:32 +00:00
|
|
|
expose {
|
|
|
|
path {
|
|
|
|
path = "/metrics"
|
|
|
|
protocol = "http"
|
|
|
|
local_path_port = 9001
|
|
|
|
listener_port = "metrics"
|
|
|
|
}
|
2020-04-23 18:32:44 +00:00
|
|
|
|
2020-04-10 23:42:32 +00:00
|
|
|
path {
|
|
|
|
path = "/health"
|
|
|
|
protocol = "http"
|
|
|
|
local_path_port = 9002
|
|
|
|
listener_port = "health"
|
|
|
|
}
|
|
|
|
}
|
2020-04-23 18:32:44 +00:00
|
|
|
|
2020-04-10 23:42:32 +00:00
|
|
|
config {
|
|
|
|
foo = "bar"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-04-23 18:32:44 +00:00
|
|
|
}
|