hashicorp / hashicorp/consul

List mesh-gateways for datacenter via http api

Open
#13,324 3 comments 0 reactions 0 assignees View on GitHub
theme/api type/enhancement
Dominant language
Go
Stars
30.1k
Forks
4.6k
Avg merge
1d 18h
Merged PRs (30d)
39

Description

#### Feature Description
Add a 'public' api endpoint to retrieve the list of healthy mesh-gateways for a given consul datacenter.
The undocumented internal endpoint `v1/internal/federation-states/mesh-gateways` does exactly what I need but it's marked internal so I don't feel confident using it in my code. It's not available in the golang api package which is another strong signal I shouldn't be using it.

#### Use Case(s)
When building custom connect proxy integrations it is necessary to watch the list of mesh-gateways and use it to populate next-hop endpoints for cross datacenter traffic.
To do that with documented APIs (at least, I couldn't find another way) I need to either know the name of mesh-gateway services in advance or scan the catalog for services of `Kind: mesh-gateway` which is extremely inefficient.

Contributor guide

Open the contributing guide

Research direction

Start by examining the undocumented v1/internal/federation-states/mesh-gateways endpoint and the Go API package, as the issue identifies both as relevant references. Done means a documented public HTTP endpoint retrieves healthy mesh-gateways for a specified Consul datacenter and the capability is available through the Go API package.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, distributed-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.