4ae115dc59
Fixes #3380 Adds address_mode to checks (but no auto) and allows services and checks to set literal port numbers when using address_mode=driver. This allows SDNs, overlays, etc to advertise internal and host addresses as well as do checks against either.
39 lines
751 B
HCL
39 lines
751 B
HCL
job "address_mode_driver" {
|
|
type = "service"
|
|
group "group" {
|
|
task "task" {
|
|
service {
|
|
name = "http-service"
|
|
port = "http"
|
|
|
|
address_mode = "auto"
|
|
|
|
check {
|
|
name = "http-check"
|
|
type = "http"
|
|
path = "/"
|
|
port = "http"
|
|
|
|
address_mode = "driver"
|
|
}
|
|
}
|
|
|
|
service {
|
|
name = "random-service"
|
|
port = "9000"
|
|
|
|
address_mode = "driver"
|
|
|
|
check {
|
|
name = "random-check"
|
|
type = "tcp"
|
|
port = "9001"
|
|
|
|
address_mode = "driver"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|