spring-cloud / spring-cloud/spring-cloud-consul
Whitelisting/blacklisting services based on consul tag
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 822
- Forks
- 539
- Avg merge
- 9h 31m
- Merged PRs (30d)
- 7
Description
We expose a number of our services in a consul cluster. Some of those services we want to expose through a Zuul proxy, but some are intended only to be used by internal services. We could blacklist them in the proxy configuration, but that could potentially leave new services exposed unintentionally. We could whitelist in the proxy configuration, but that requires a change to the proxy each time we want to release a new service.
My thought was that we could tag desired services with a specific value and filter services that don't match that value in the ConsulDiscoveryClient. More generally, a "filter" in ConsulDiscoveryClient might be useful for other developers. Is there something like this that I haven't discovered yet?
Thanks for any pointers or suggestions.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading ConsulDiscoveryClient and checking how Consul service tags are currently obtained and whether filtering is supported. Review the Zuul service-exposure path to understand where discovered services are selected. Done should be a decided approach for tag-based filtering, with the behavior covered by appropriate tests if implementation is accepted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- distributed-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100