-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
connect: enable setting connect upstream destination namespace #13125
Conversation
f756408
to
3bbf74d
Compare
Quick example
Using this PR cherry-picked onto nomad-enterpise because I'm too lazy to register Consul services by hand
job filejob "countdash" {
datacenters = ["dc1"]
group "api" {
network {
mode = "bridge"
}
consul {
namespace = "ns1"
}
service {
name = "count-api"
port = "9001"
connect {
sidecar_service {}
}
}
task "web" {
driver = "docker"
config {
image = "hashicorpnomad/counter-api:v3"
}
}
}
group "dashboard" {
network {
mode = "bridge"
port "http" {
static = 9002
to = 9002
}
}
consul {
namespace = "ns2"
}
service {
name = "count-dashboard"
port = "9002"
connect {consul namespace create -name ns1
consul namespace create -name ns2
sidecar_service {
proxy {
upstreams {
destination_name = "count-api"
destination_namespace = "ns1"
local_bind_port = 8080
}
}
}
}
}
task "dashboard" {
driver = "docker"
env {
COUNTING_SERVICE_URL = "http://${NOMAD_UPSTREAM_ADDR_count_api}"
}
config {
image = "hashicorpnomad/counter-dashboard:v3"
}
}
}
} |
3bbf74d
to
616988c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
This PR enables setting
destination_namespace
for a Connect proxy upstream.