-
Notifications
You must be signed in to change notification settings - Fork 321
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
NET-5104 envoy port mapping #2707
Merged
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
bda5f57
Adds port mapping to avoid running envoy on admin ports
missylbytes 88611e2
add tests, only add to value for privileged ports
missylbytes 34def4c
added changelog
missylbytes b7adcf9
missed some tests
missylbytes 73b9029
Update control-plane/api-gateway/common/translation.go
missylbytes 3c5d8a5
Update .changelog/2707.txt
missylbytes 531170f
Update control-plane/api-gateway/common/translation.go
missylbytes db21d04
adds basic check for port conflicts, needs details ironed out
missylbytes 2ae6d92
cleanup
missylbytes 64e446d
fix imports
missylbytes 01a563d
add one more test for user-conflicted ports and mapping-conflicted ports
missylbytes 854289f
moved port-mapping to gatewayclassconfig
missylbytes eeea753
fix typo, update changelog
missylbytes c75334c
more naming cleanup
missylbytes 19ada94
Add validation tests for mapping privileged container ports
nathancoleman 9575c29
Fix translation_test.go
nathancoleman 1fceb65
Use correct flag name for privileged port mapping
nathancoleman fe8267f
Correct casing of ManagedGatewayClass property
nathancoleman 0db299c
Update GatewayClassConfig in test to map privileged container ports
nathancoleman 1b9b752
Update control-plane/api-gateway/binding/binder_test.go
nathancoleman 2dd5c5a
fix linting issue
missylbytes 3d1df20
update comment for binding result
missylbytes 72eb032
lint
missylbytes cbb7409
Apply suggestions from code review
missylbytes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```release-note:feature | ||
api-gateway: adds ability to map privileged ports on Gateway listeners to unprivileged ports so that containers do not require additional privileges | ||
``` |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,10 @@ type HelmConfig struct { | |
// EnableOpenShift indicates whether we're deploying into an OpenShift environment | ||
// and should create SecurityContextConstraints. | ||
EnableOpenShift bool | ||
|
||
// MapPrivilegedServicePorts is the value which Consul will add to privileged container port values (ports < 1024) | ||
// defined on a Gateway. | ||
MapPrivilegedServicePorts int | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Non-blocker, but it would be nice to have a comment here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will add comment, this is a non-obvious field.
missylbytes marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
|
||
type ConsulConfig struct { | ||
|
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.
This is a really clean implementation! O(1) and easy to read. Excellent 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.
Kudos to @nathancoleman for this one.