-
Notifications
You must be signed in to change notification settings - Fork 392
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: Support UDP listeners in Network Load Balancer #4980
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
d053f7b
Initial support for NLB UDP listeners
tjhorner cb15323
Fix (NetworkLoadBalancerListener).exposedPorts for TLS listeners and …
tjhorner 5c4523b
Additional tests; revert erroneous documentation change
tjhorner 163bce3
More descriptive comment
tjhorner 2834406
Add UDP listener docs
tjhorner 7c5a96a
Merge branch 'mainline' into feature/nlb-udp-ports
Lou1415926 b46913e
Merge branch 'aws:mainline' into feature/nlb-udp-ports
tjhorner 413dbf4
convert lower case altogether
Lou1415926 1b27c0b
Merge branch 'mainline' into feature/nlb-udp-ports
Lou1415926 ea15d8a
Merge branch 'mainline' into feature/nlb-udp-ports
mergify[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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:
ECS doesn't let you expose the same port twice, even if they are different protocols. Although as a client side tool we don't have to do the same validations as the service, I think I'd prefer erroring out early here.
NLB can listen on a port for
TPC_UDP
traffic - judging by this design pattern, it is possible that when ECS does support this feature, they will support an "additional protocol" calledTCP_UDP
, instead of letting people expose the same port twice. This is my own personal intuition though. Here is a related feature request to ECS: aws/containers-roadmap#850.Anyway, based on this observation, it's likely that we won't need to change this if statement even after they'e supported the feature. So maintenance-wise, this probably won't cause burden in the future anyway.
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.
Sure, that makes sense. I'll add that note and revert the change there.
Wouldn't this just silently fail? No
err
is being returned, but I'm not sure if consumers of this method would interpret anil
[]ExposedPort
as a failure.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!! I somehow was thinking this code was written in
manifest/validate.go
, and was trying to point out that the "uniqueness" of a port is determined by the port only, not port + protocol.Now that I've had my coffee, I realize this comment doesn't make sense for the code here. This function is called after we've done all the manifest validation. At this point, it should be assumed that the manifest is totally valid - that is, no port is exposed twice.
Therefore, I think we can keep it as you have (port + protocol). Since the validation already happened, there is effectively no difference between
if targetPort == exposedPort.Port
andif targetPort == exposedPort.Port && targetProtocol == exposedPort.Protocol
; however, the latter is clearly and makes more sense 😂The validation code already checks that "no port is exposed twice" - it doesn't take protocol into consideration. So we are good there as well.
Sorry for the confusion!!
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.
hey there @tjhorner ! Do you want me to take over the code and address the nit, so that this PR can be merged before our next release?
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.
Sure, that's fine. Thanks!