Skip to content
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

[Feature Request] Add datacenter tag in Upstream Stanza #8964

Closed
CarelvanHeerden opened this issue Sep 25, 2020 · 1 comment · Fixed by #9472
Closed

[Feature Request] Add datacenter tag in Upstream Stanza #8964

CarelvanHeerden opened this issue Sep 25, 2020 · 1 comment · Fixed by #9472
Assignees
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/consul/connect Consul Connect integration type/enhancement

Comments

@CarelvanHeerden
Copy link

Nomad version

0.12.4

Operating system and Environment details

Ubuntu 18.04
Consul 18.4

Issue

No ability to specify the secondary datacenter in the Upstream stanza, to get upstream proxy to connect to service via mesh_gateway.

When specifying a Service in Consul, you have an extra tag to specify that the service is located in another DC

Example:

service {
  name = "web",
  port = 8080,
  token = "<token here>",
  connect {
    sidecar_service {
      proxy {
        upstreams = [
          {
            destination_name = "socat",
            datacenter = "primary",
            local_bind_port = 8181
          }
        ]
      }
    }
  }
}

However, this is not possible in the Nomad service definition.

Parse Error
error parsing 'job': group: 'example', service (0): 'example', sidecar_service, proxy, 1 error occurred: * upstream -> invalid key: datacenter
job "example" {
  datacenters = ["GENERAL"]
  region = "sa"
  group "tms" {
    count = 1
   
    network {
      mode = "bridge"
    }
    service {
      name = "example"
      port = "8681"
      connect {
        sidecar_service {
          proxy {
            upstreams {
              local_bind_port = 8556
              datacenter = "secondary",
              destination_name = "example2"
            }
          }
        }
      }
@shoenig shoenig added stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/consul/connect Consul Connect integration type/enhancement labels Sep 28, 2020
@shoenig shoenig self-assigned this Nov 19, 2020
shoenig added a commit that referenced this issue Nov 30, 2020
Before, upstreams could only be defined using the default datacenter.
Now, the `datacenter` field can be set in a connect upstream definition,
informing consul of the desire for an instance of the upstream service
in the specified datacenter. The field is optional and continues to
default to the local datacenter.

Closes #8964
@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/consul/connect Consul Connect integration type/enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants