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

consul/connect: enable setting local_bind_address in upstream #10071

Merged
merged 2 commits into from
Feb 26, 2021

Conversation

Ilhicas
Copy link
Contributor

@Ilhicas Ilhicas commented Feb 23, 2021

Upstreams configuration in service->proxy->upstream stanza currently doesn't allow for the upstream local_bind_address definition

This allows to define different local_bind_addresses allowing envoy to read values from consul xds for example to bind the upstream to 127.0.0.X or others, allowing it to effectively avoid port binding in upstreams.

As an example

127.0.0.1:5432
127.0.0.2:5432

Could be used in multiple upstream stanzas without port binding issues.

This field is optional and defaults to the local_bind_address.

Closes #6248

More info on the motivations can be found at : #10057

@hashicorp-cla
Copy link

hashicorp-cla commented Feb 23, 2021

CLA assistant check
All committers have signed the CLA.

@jorgensoares
Copy link

@tgross can we have this reviewed :) thank you!

@tgross
Copy link
Member

tgross commented Feb 24, 2021

@jorgensoares we're in the middle of prepping the Nomad 1.0.4 release but it'll get reviewed soon.

@shoenig shoenig self-requested a review February 24, 2021 14:27
@Ilhicas
Copy link
Contributor Author

Ilhicas commented Feb 24, 2021

Hi regarding the changelog I added it there, but might not make sense, since I noticed other PR's were adding it 1.0.4 incorrectly as well.
So might have to set it elsewhere?
What is approriate here?

Copy link
Member

@shoenig shoenig left a comment

Choose a reason for hiding this comment

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

This is looking really great @Ilhicas, thanks for the PR!

There's a block of code where we interpolate fields, and we'll want to add support for interpolating the local_bind_address also

func interpolateConnectSidecarService(taskEnv *TaskEnv, sidecar *structs.ConsulSidecarService) {

Just that and the CHANGELOG shuffle, I think this will be good to go.

@@ -1,4 +1,5 @@
## 1.0.4 (Unreleased)
* consul/connect: Enable setting `local_bind_address` field on connect upstreams [[GH-6248](https://github.com/hashicorp/nomad/issues/6248)]
Copy link
Member

Choose a reason for hiding this comment

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

Like you already mentioned, we'll want this under the 1.1.0 header now, specifically under the IMPROVEMENTS sub header

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated changelog

Also added LocalBindAddress to interpolation function, and updated interpolation tests

Copy link
Member

@shoenig shoenig left a comment

Choose a reason for hiding this comment

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

LGTM; thanks @Ilhicas !

@shoenig shoenig merged commit 7ae1273 into hashicorp:master Feb 26, 2021
@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 Nov 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support local_bind_address for Conusl Connect upstreams
5 participants