-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
service discovery: add RPC endpoints and FSM logic #12171
Conversation
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've left one question/comment about TLS cert checking that we should look at, but other than that this is really solid.
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 adds the RPC logic for service discovery. This includes a new endpoint as well as updates to the alloc and job endpoints to provide easy lookup of registrations associated to these objects.
The new
ServiceRegistration
endpoint is static/dynamic to ensure theUpsert
RPC, which is only callable via client agent, includes TLS verification. It also includes functionality for wildcard listing as is common across all list endpoint within Nomad.The
ipaddr
package mirrors Consul and ensure no service is registered which has an any IP address and therefore is not logically routable outside its local instance.Apologies for the size, although I believe at least 60% of the additions are tests. The PR is split into commits which group the additions into logical chunks and hope to make it easier to review.
closes https://github.com/hashicorp/team-nomad/issues/259