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

upstream: add EDS indirection to allow repeated hosts #5432

Merged
merged 6 commits into from
Jan 14, 2019

Conversation

snowp
Copy link
Contributor

@snowp snowp commented Dec 27, 2018

Adds the API for an additional EDS indirection that allows endpoints to
specified outside the LB structure. This opens up for being able to
reference the same endpoint multiple times in a single CLA.

Signed-off-by: Snow Pettersen [email protected]

Risk Level: Low, only API changes for now
Testing: n/a
Docs Changes: n/a
Release Notes: n/a

#4280

Adds the API for an additional EDS indirection that alllows endpoints to
specified outside the LB structure. This opens up for being able to
reference the same endpoint multiple times in a single CLA.

Signed-off-by: Snow Pettersen <[email protected]>
@snowp
Copy link
Contributor Author

snowp commented Dec 27, 2018

Wanted to make sure we agree on the API before committing to code changes, cc @htuch @bplotnick

Signed-off-by: Snow Pettersen <[email protected]>
Signed-off-by: Snow Pettersen <[email protected]>
bplotnick
bplotnick previously approved these changes Dec 28, 2018
Copy link
Contributor

@bplotnick bplotnick left a comment

Choose a reason for hiding this comment

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

lg2m. thanks for tackling this!

@@ -50,10 +50,22 @@ message Endpoint {
HealthCheckConfig health_check_config = 2;
}

// Named reference to an Endpoint.
message NamedEndpoint {
// Identifier for this endpoint. Should be unique within a given ClusterLoadAssignment.
Copy link
Contributor

Choose a reason for hiding this comment

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

"Must" be unique?

// Upstream host identifier or a named reference.
oneof host_identifier {
Endpoint endpoint = 1;
NamedEndpoint named_endpoint = 5;
Copy link
Contributor

Choose a reason for hiding this comment

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

i think what you have makes the most sense, but what's the tradeoff here over adding the optional identifier to the Endpoint message itself?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I reckon conceptually it might be simpler to just add an optional named field to the endpoint directly; the anonymous endpoints that we have today then fit neatly into this with proto defaults.

@htuch htuch self-assigned this Dec 30, 2018
// Upstream host identifier or a named reference.
oneof host_identifier {
Endpoint endpoint = 1;
NamedEndpoint named_endpoint = 5;
Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I reckon conceptually it might be simpler to just add an optional named field to the endpoint directly; the anonymous endpoints that we have today then fit neatly into this with proto defaults.

Signed-off-by: Snow Pettersen <[email protected]>
@@ -51,6 +51,9 @@ message ClusterLoadAssignment {
// List of endpoints to load balance to.
repeated endpoint.LocalityLbEndpoints endpoints = 2 [(gogoproto.nullable) = false];

// List of named endpoints that can be referenced multiple times in LocalityLbEndpoints.
repeated endpoint.Endpoint named_endpoints = 5;
Copy link
Member

Choose a reason for hiding this comment

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

Cool, this looks simpler. Could even minimize the PR further by making this a map with key being host name string and value being the endpoint. WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Works for me. Like how it enforces the key uniqueness

Signed-off-by: Snow Pettersen <[email protected]>
Copy link
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

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

LGTM; will leave it open for another day in case there are further comments.

@htuch
Copy link
Member

htuch commented Jan 14, 2019

@snowp looks like everyone is holding their peace; could you do a master merge to reduce the chance of breaking CI when I merge this? Thanks

@htuch htuch merged commit b49e379 into envoyproxy:master Jan 14, 2019
@jmarantz
Copy link
Contributor

This escaped my view and now I'm paying the price...what's the Envoy policy for breaking protocol buffer changes?

@mattklein123
Copy link
Member

@jmarantz what's the issue?

@jmarantz
Copy link
Contributor

The golang API into a protobuf 'oneof' is different, even with the wire format the same. I've already worked through it for the case I needed to fix, but others may bump into this.

@htuch
Copy link
Member

htuch commented Jan 16, 2019

@jmarantz we don't provide backward compatibility to language bindings, only at the wire level. See https://github.com/envoyproxy/envoy/blob/master/api/STYLE.md for the policy.

fredlas pushed a commit to fredlas/envoy that referenced this pull request Mar 5, 2019
Adds the API for an additional EDS indirection that allows endpoints to
specified outside the LB structure. This opens up for being able to
reference the same endpoint multiple times in a single CLA.

Risk Level: Low, only API changes for now
Testing: n/a
Docs Changes: n/a
Release Notes: n/a

envoyproxy#4280

Signed-off-by: Snow Pettersen <[email protected]>
Signed-off-by: Fred Douglas <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants