Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat: implement L4 traffic matching #976
feat: implement L4 traffic matching #976
Changes from all commits
26dec1c
5f448f5
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Upstream differentiates between v4 and v6:
Should we?
Furthermore, do we need to think of cases where an implementation doesn't support IPv6 for any reason? Too hypothetical?
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.
My initial thoughts are: one reason we might want to differentiate would be if one or the other is not available on the
Gateway
network (e.g. theGateway
only has IPv4 OR IPv6). Given that we're simply using the existingIPAddress
type which already supported both IPv4 and IPv6 I feel like we would need a strong reason and a separate body of work to add this differentiation as it seems possible it would end up being backwards incompatible.To expand on that I think there could be cases where IPv4 isn't supported too, but as you've already suggested I personally wouldn't want to spend cycles trying to predict these kinds of situations. We have until February (at least) before we're going to start talking beta release, there's time in the interim for such use cases to present themselves.
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.
Let's discuss this in the office hour today. We will be asked about dual-stack as soon as this API hits beta and we need to have a good answer/plan for it. Best to follow upstream closely.
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.
My bad. No meeting today.
cc @robscott who may be more familiar with upstream dual-stack work
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.
Although that's true, at least part of that was motivated by simpler implementation. For example, EndpointSlices initially started with a single IPAddress type in v1alpha1 that was replaced with separate v4 and v6 types in large part to simplify proxy implementations where v4 and v6 addresses were handled entirely separately.
It does seem like it would be useful to be able to request the IP families you want to have assigned to a Gateway. I'm less sure that it's helpful to have separate matching types for v4 and v6 addresses. In that case, the families can already be derived by the value provided and a separate type does not seem as useful to me.
@khenidak has been most involved in upstream dual stack work, what do you think about representing IP matching? Should we have separate address types per IP family or rely on deriving that information from the address/cidr itself?
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.
This comment seems to be the lingering question, but has not gotten any further feedback in over a week. Given that this PR is not actually changing how we differentiate between v4 and v6 (this uses the pre-existing
AddressType
which already accepts both) I would like to suggest that we should split out reworking how we configure and differentiate IP versions into a separate GEP or body of work so that it doesn't have to hold this PR up?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 am looking at this now for CRDs (outside of Gateway) and I am leaning to follow Service which uses ipfamilies to follow existing semantics.
To easily express: match ipv6 traffic, match ipv4 traffic, match both
@shaneutt is that what you are thinking AddressType would do, equivalent-ish to Service ipfamilies?
This could allow matching on family alone without requiring the person to define a match pattern.
To your point, always requiring a match pattern to signify anything other than 'both' is only one key.
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.
If I'm understanding correctly, yes that's basically what I had in mind.
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.
As the value is a specific Value, having an additional IP family field seems to be redundant.
Minor style point, we should write all of the comment from the perspective of the users (the implemetors should...) style comments need to live somewhere else...
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.