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

client/connect: ConsulProxy LocalServicePort/Address #6358

Merged
merged 1 commit into from
Sep 23, 2019

Conversation

tgross
Copy link
Member

@tgross tgross commented Sep 20, 2019

Fixes #6337

Without a LocalServicePort, Connect services will try to use the mapped port even when delivering traffic locally. A user can override this behavior by pinning the port value in the service stanza but this prevents us from using the Consul service name to reach the service.

This commits configures the Consul proxy with its LocalServicePort and LocalServiceAddress fields.

@tgross tgross added the theme/consul/connect Consul Connect integration label Sep 20, 2019
@tgross tgross added this to the 0.10.0 milestone Sep 20, 2019
@@ -1,12 +1,15 @@
job "foo" {
datacenters = ["dc1"]

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used hclfmt to clean up my own changes and it turns out this file was dirty. Apologies for the review noise.

@tgross
Copy link
Member Author

tgross commented Sep 20, 2019

Would it be at all valuable to expose these as a NOMAD_* variable to the tasks?

Copy link
Member

@schmichael schmichael left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestions are just suggestions although we should get rid of those TODO and add these fields to https://www.nomadproject.io/docs/job-specification/proxy.html

command/agent/consul/group_test.go Outdated Show resolved Hide resolved
nomad/structs/services.go Outdated Show resolved Hide resolved
nomad/structs/services.go Outdated Show resolved Hide resolved
@tgross tgross force-pushed the f-connect-localserviceport branch 4 times, most recently from 5a36f83 to 074aa45 Compare September 23, 2019 17:31
Without a `LocalServicePort`, Connect services will try to use the
mapped port even when delivering traffic locally. A user can override
this behavior by pinning the port value in the `service` stanza but
this prevents us from using the Consul service name to reach the
service.

This commits configures the Consul proxy with its `LocalServicePort`
and `LocalServiceAddress` fields.
@tgross tgross force-pushed the f-connect-localserviceport branch from 074aa45 to 9a0f8a4 Compare September 23, 2019 18:03
@tgross
Copy link
Member Author

tgross commented Sep 23, 2019

@schmichael thanks for catching those TODOs and suggesting some good language for them! I've addressed your comments, including adding docs here

@tgross tgross merged commit 4f687cf into master Sep 23, 2019
@tgross tgross deleted the f-connect-localserviceport branch September 23, 2019 18:30
@github-actions
Copy link

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.
If you have found a problem that seems related to this change, 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 Jan 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement LocalServicePort for Connect sidecars
2 participants