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

Allow setting tagged addresses to services #12950

Closed
jorgemarey opened this issue May 11, 2022 · 6 comments · Fixed by #12951
Closed

Allow setting tagged addresses to services #12950

jorgemarey opened this issue May 11, 2022 · 6 comments · Fixed by #12951

Comments

@jorgemarey
Copy link
Contributor

It would be nice to allow setting tagged addresses on the service registrations. For example:

    service {
      name = "gateway-mesh"
      port = "mesh_wan"

      check {
        name = "gateway-mesh-check-tcp"
        type = "tcp"
        interval = "1m"
        timeout = "15s"
      }

      tagged_addresses {
        wan = "${attr.unique.platform.aws.public-ipv4}:${NOMAD_PORT_mesh_wan}"
      }

      connect {
        gateway {
          mesh {}
          proxy {}
        }
      }
    }
@DerekStrickland
Copy link
Contributor

Hi @jorgemarey. Thanks for using Nomad!

So would this be separate and distinct from the existing tags config? If so, do you mind reworking the description using the issue template? It would give us some more context around the use case and would help us a lot in terms of understanding the desired end goal. I'm pasting the template below for you.

<!--
Hi there,

Thank you for opening an issue. Please note that we try to keep the Nomad issue
tracker reserved for bug reports and feature requests. For general usage
questions, please see: https://www.nomadproject.io/community

-->

### Proposal
<!--
If you have an idea for a way to address the problem via a change to Nomad’s
features, please describe it below.
-->

### Use-cases
<!--
In order to properly evaluate the feature request, it is necessary to understand
the use-cases for it. Please describe below the _end goal_ you are trying to
achieve that has led you to request this feature.
-->

### Attempted Solutions
<!--
If you have already tried to solve the problem within Nomad’s existing features
and found a limitation that prevented you from succeeding, please describe it
below.
-->

@shoenig
Copy link
Member

shoenig commented May 11, 2022

@DerekStrickland Consul has a distinct concept of tagged_addresses that are orthogonal to the tags familiar to Nomad

https://www.consul.io/api-docs/agent/service#taggedaddresses

This PR is an extension of #12720 where we enabled setting a custom address on service.address, but forgot about Consul's tagged_addresses.

@shoenig shoenig self-assigned this May 11, 2022
@DerekStrickland
Copy link
Contributor

@shoenig

Thanks for that context!

@shoenig
Copy link
Member

shoenig commented May 17, 2022

Just FYI @jorgemarey I haven't forgotten about this; I'm going to float a small RFC internally just to make sure folks are on the same page across Nomad / Consul.

@lkysow
Copy link
Member

lkysow commented May 27, 2022

FYI this is needed in some cases for Consul mesh gateway wan federation because Consul uses the wan tagged address to tell other Consul DC's how to reach the local DC. If you throw an LB in front of your gateway then you need to set the tagged address to the LB DNS or IP.

@github-actions
Copy link

github-actions bot commented Oct 7, 2022

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 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants