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 group and subsets #601
Conversation
personally i am not in favor of extending our api with new api objects, additions to core fields (upstream spec, destination spec) to support an api which increases the coupling between the route and the upstream (route must now know which subsets are available on the upstream) my suggestion is to implement a new |
to support envoy subsets route will have to know the subsets regardless; this has nothing to do with the upstream group. I see a difference in semantic between an Upstream and an UpstreamGroup Additionally making an upstream group a type of upstream will allow recursive upstream groups, which there is no need to have IMHO Also unlike Upstream, UpstreamGroup is not translated to a cluster. I see UpstreamGroup as an abstraction of the MultiDestionation part in the route. I believe these semantic differences merits a new type of api object. |
this is the purpose for putting the subset only in one place (on the upstream). preserve semantics rather than making things more complex. want to route to a subset? create a route like normal, and select an upstream which represents a subset
i see this edge case as trivial, it can be easily verified with validation on the cli and translator levels. i prefer it to the complexity your proposal would add to the current api
This is up to us to decide. the translator can easily be modified so that it does not create a cluster for every upstream
I see UpstreamGroup as an Upstream which represents a set of weighted upstreams. It's taking the concept of a
to be an equivalent form for
|
There are subsets defined by discovery. This PR introduces a new type - subsets defined by the user.
Why allow configuration to have an invalid state if we can prevent that?
It is up for us to decide but it does introduce special cases to our code, so I think it nullifies also consider that things that are general cluster concepts do not work will with an upstream group as an upstream type. things like:
|
projects/gloo/api/v1/plugins.proto
Outdated
// Sub set configuration. For discovery sources that has labels (like kubernetes). this | ||
// configuration allows you to partition the upstream to a set of subsets. | ||
// for each unique set of keys and values, a subset will be created. | ||
SubsetConfig subset_config = 7; |
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.
i think this functionality is already available through the use of the selector on the kubernetes upstream spec
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.
The idea here is to allow subsets beyond the labels on the service.
In addition the user needs to be aware of what they are so at a minimum we need to write them here.
I'm not sure I 100% understand you here so let's discuss this tomorrow in person
you make good points. taking a second look at the code, i think it makes sense to have a new crd for upstreams with |
Issues linked to changelog: |
.plugins.gloo.solo.io.ServiceSpec service_spec = 5; | ||
|
||
|
||
// Sub set configuration. For discovery sources that has labels (like kubernetes). this |
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.
nit: subset
projects/gloo/api/v1/proxy.proto
Outdated
// message UpstreamGroupSpec { | ||
repeated WeightedDestination destinations = 1; | ||
// } | ||
// UpstreamGroupSpec spec = 1; |
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.
Remove commented out stuff
projects/gloo/api/v1/subset.proto
Outdated
option (gogoproto.equal_all) = true; | ||
|
||
message Subset { | ||
map<string, string> values =1; |
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.
nit: formatting -> "... values = 1;"
}, | ||
} | ||
params.Snapshot.Upstreams["gloo-system"] = append(params.Snapshot.Upstreams["gloo-system"], upstream2) | ||
params.Snapshot.Upstreamgroups = v1.UpstreamgroupsByNamespace{ |
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.
Realize this is not related to this PR, but kinda annoying that solo-kit doesn't respect "UpstreamGroupsByNamespace"
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.
yea..
/kick ssl flake |
The draft for groups and subsets.
adding tests now, but figure you guys should take a look.