-
Notifications
You must be signed in to change notification settings - Fork 813
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(gameserver): New DirectToGameServer PortPolicy allows direct traffic to a GameServer #3807
Conversation
Build Failed 😱 Build Id: 3731534a-b65b-4e77-a055-462ef5bdc46d To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Build Failed 😱 Build Id: e6847a5f-161a-4f50-ab03-e6be1e0081c2 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Build Failed 😱 Build Id: 030c7f3c-8935-4ec8-b72b-7e7ae9cc05e4 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Build Failed 😱 Build Id: 41360ecd-663c-44d7-8e09-8587822142a9 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
I got stuck on the e2e test as setting up the pod so that you can send direct traffic to via a Pod IP and container port is not simple. Working on getting a decent e2e test in place. |
Build Succeeded 👏 Build Id: c6962355-3d36-4f21-9026-d3b93d385302 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
cc9cf8f
to
beeb337
Compare
Build Succeeded 👏 Build Id: e49c3f18-d140-410a-a33b-924dab8d4c7c The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
bc98c26
to
54e0509
Compare
Build Succeeded 👏 Build Id: acb281ac-fcd1-4cb6-aaf6-4e62ec96e8e1 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
Build Failed 😱 Build Id: 337cf488-70d8-4027-af85-190136be894c To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Build Succeeded 👏 Build Id: 083615e3-4a0a-4abc-b6ea-6580fd8c73fd The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
test/e2e/gameserver_test.go
Outdated
@@ -852,6 +848,28 @@ func TestGameServerPassthroughPort(t *testing.T) { | |||
assert.Equal(t, "ACK: Hello World !\n", reply) | |||
} | |||
|
|||
func TestGameServerPortPolicyNone(t *testing.T) { | |||
framework.SkipOnCloudProduct(t, "gke-autopilot", "does not support None PortPolicy") |
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.
That's not true, or implemented, AFAICT. :) (It looks like Autopilot should support this just fine, but separately, if you intended it not to be the case, you would need to modify the validation webhook.)
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.
Should I also change the error message "portPolicy must be Dynamic on GKE Autopilot" to something like "portPolicy must be Dynamic or None on GKE Autopilot"? Does that make sense?
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.
That's a good idea, yeah!
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.
In general LGTM, left one issue and you have a conflict to resolve now - after that and tests pass on Autopilot, you should be good to go.
Build Failed 😱 Build Id: 1b60ca10-cfc5-4e29-95e7-1edf9131cf5b To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Build Succeeded 👏 Build Id: e90fa6ad-4aa4-4046-8d4f-44a74c177a1f The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
Build Succeeded 👏 Build Id: 854189e9-5363-4ea9-b183-abbb8c4aee59 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
@zmerlynn let me know if there is anything else I need to change. In the meantime, I will try and keep the branch synchronized. |
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.
Thanks for all this work, and the discussions!
No issues with implementation here 👍🏻 a couple of notes on some docs.
Only thing I have -let's put it behind a feature gate, just so we have an opportunity to get feedback on the feature once it has landed, and can change it if need be - you may well find things you want to tweak once you've got it up and running.
I expect it'll promote pretty fast, but better safe than sorry.
Details on feature flags here:
- https://agones.dev/site/docs/guides/feature-stages/
- https://github.com/googleforgames/agones/blob/main/pkg/util/runtime/features.go (comments have implementation steps)
@@ -245,10 +246,11 @@ The `spec` field is the actual GameServer specification and it is composed as fo | |||
- `container` is the name of container running the GameServer in case you have more than one container defined in the [pod](https://kubernetes.io/docs/concepts/workloads/pods/pod-overview/). If you do, this is a mandatory field. For instance this is useful if you want to run a sidecar to ship logs. | |||
- `ports` are an array of ports that can be exposed as direct connections to the game server container | |||
- `name` is an optional descriptive name for a port | |||
- `portPolicy` has three options: | |||
- `portPolicy` has four options: |
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.
These changes will need to live behind a feature
shortcode please (our docs publish immediately on merge).
See: https://agones.dev/site/docs/contribute/ for details.
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
Build Failed 😱 Build Id: 7b1e124e-4dc4-443c-aa3a-288e9ddcea09 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
02b042e
to
876693d
Compare
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
Build Succeeded 👏 Build Id: e6767e78-02af-4024-b2e1-22621774be30 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
Finally got a green build. In the latest iteration, I have:
Let me know if I missed anything else around feature gates. |
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 LGTM. There's a conflict in generated docs - you can rebase and re-run make gen-crd-client
to resolve it quickly enough.
To be able to access a GameServer with a publicly routable address, this policy allows connecting directly wihout going via the host port. The other policies assume that a host port is always needed.
Revert the line with line ending changes.
Can't find a good way to send UDP traffic directly to a pod. This is not something that k8s does out of the box and requires a product like Calico or similar that uses BGP to provide direct access to pods. Removing the udp call and making the test much simpler
876693d
to
e8c699d
Compare
Build Succeeded 👏 Build Id: 9b7ffde6-8875-4307-8e13-ea7b16dc8a45 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
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.
Great job, thank you!
cc @markmandel who may want to review, or I'll merge it soon |
LGTM! |
Thank you both for all the help! |
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [agones](https://agones.dev) ([source](https://github.com/googleforgames/agones)) | minor | `1.40.0` -> `1.41.0` | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>googleforgames/agones (agones)</summary> ### [`v1.41.0`](https://github.com/googleforgames/agones/blob/HEAD/CHANGELOG.md#v1410-2024-06-04) [Compare Source](https://github.com/googleforgames/agones/compare/v1.40.0...v1.41.0) [Full Changelog](https://github.com/googleforgames/agones/compare/v1.40.0...v1.41.0) **Implemented enhancements:** - Configure Allocator Status Code by [@​Kalaiselvi84](https://github.com/Kalaiselvi84) in [https://github.com/googleforgames/agones/pull/3782](https://github.com/googleforgames/agones/pull/3782) - Graduate Counters and Lists to Beta by [@​Kalaiselvi84](https://github.com/Kalaiselvi84) in [https://github.com/googleforgames/agones/pull/3801](https://github.com/googleforgames/agones/pull/3801) - Passthrough autopilot - Adds an AutopilotPassthroughPort Feature Gate and new pod label by [@​vicentefb](https://github.com/vicentefb) in [https://github.com/googleforgames/agones/pull/3809](https://github.com/googleforgames/agones/pull/3809) - CountsAndLists: Move to Beta Protobuf by [@​Kalaiselvi84](https://github.com/Kalaiselvi84) in [https://github.com/googleforgames/agones/pull/3806](https://github.com/googleforgames/agones/pull/3806) - feat: support multiple port ranges by [@​nrwiersma](https://github.com/nrwiersma) in [https://github.com/googleforgames/agones/pull/3747](https://github.com/googleforgames/agones/pull/3747) - Changes `sdk-server` to Patch instead of Update by [@​igooch](https://github.com/igooch) in [https://github.com/googleforgames/agones/pull/3803](https://github.com/googleforgames/agones/pull/3803) - Generate grpc for nodejs from alpha to beta by [@​lacroixthomas](https://github.com/lacroixthomas) in [https://github.com/googleforgames/agones/pull/3825](https://github.com/googleforgames/agones/pull/3825) - Update CountsAndLists from Alpha to Beta by [@​Kalaiselvi84](https://github.com/Kalaiselvi84) in [https://github.com/googleforgames/agones/pull/3824](https://github.com/googleforgames/agones/pull/3824) - feat(gameserver): New DirectToGameServer PortPolicy allows direct traffic to a GameServer by [@​daniellee](https://github.com/daniellee) in [https://github.com/googleforgames/agones/pull/3807](https://github.com/googleforgames/agones/pull/3807) - Passthrough autopilot - Adds mutating webhook by [@​vicentefb](https://github.com/vicentefb) in [https://github.com/googleforgames/agones/pull/3833](https://github.com/googleforgames/agones/pull/3833) - Passthrough autopilot - added ports array case and updated unit tests by [@​vicentefb](https://github.com/vicentefb) in [https://github.com/googleforgames/agones/pull/3842](https://github.com/googleforgames/agones/pull/3842) - Nodejs counters and lists by [@​steven-supersolid](https://github.com/steven-supersolid) in [https://github.com/googleforgames/agones/pull/3726](https://github.com/googleforgames/agones/pull/3726) - Promote AutopilotPassthroughPort feature gate to Alpha by [@​vicentefb](https://github.com/vicentefb) in [https://github.com/googleforgames/agones/pull/3849](https://github.com/googleforgames/agones/pull/3849) **Fixed bugs:** - Helm Param Update: Default to agones.controller if agones.extensions is Missing by [@​Kalaiselvi84](https://github.com/Kalaiselvi84) in [https://github.com/googleforgames/agones/pull/3773](https://github.com/googleforgames/agones/pull/3773) - fix: rollout strategy issues by [@​nrwiersma](https://github.com/nrwiersma) in [https://github.com/googleforgames/agones/pull/3762](https://github.com/googleforgames/agones/pull/3762) - Set Minimum Buffer Size to 1 by [@​Kalaiselvi84](https://github.com/Kalaiselvi84) in [https://github.com/googleforgames/agones/pull/3749](https://github.com/googleforgames/agones/pull/3749) - Pin ltsc2019 to older SHA by [@​zmerlynn](https://github.com/zmerlynn) in [https://github.com/googleforgames/agones/pull/3829](https://github.com/googleforgames/agones/pull/3829) - TestGameServerAllocationDuringMultipleAllocationClients: Readdress flake by [@​zmerlynn](https://github.com/zmerlynn) in [https://github.com/googleforgames/agones/pull/3831](https://github.com/googleforgames/agones/pull/3831) - Refactor finalizer name to include valid domain name and path by [@​indexjoseph](https://github.com/indexjoseph) in [https://github.com/googleforgames/agones/pull/3840](https://github.com/googleforgames/agones/pull/3840) - agones-{extensions,allocator}: Be more defensive about draining by [@​zmerlynn](https://github.com/zmerlynn) in [https://github.com/googleforgames/agones/pull/3839](https://github.com/googleforgames/agones/pull/3839) - agones-{extensions,allocator}: Pause after cancelling context by [@​zmerlynn](https://github.com/zmerlynn) in [https://github.com/googleforgames/agones/pull/3843](https://github.com/googleforgames/agones/pull/3843) - Change the line to modify in Quickstart: Edit a Game Server by [@​peterzhongyi](https://github.com/peterzhongyi) in [https://github.com/googleforgames/agones/pull/3844](https://github.com/googleforgames/agones/pull/3844) **Other:** - Prep for Release v1.41.0 by [@​Kalaiselvi84](https://github.com/Kalaiselvi84) in [https://github.com/googleforgames/agones/pull/3800](https://github.com/googleforgames/agones/pull/3800) - Update site documentation to reflect firewall prefix and default to Autopilot cluster creation for Agones by [@​vicentefb](https://github.com/vicentefb) in [https://github.com/googleforgames/agones/pull/3769](https://github.com/googleforgames/agones/pull/3769) - Add a System Diagram and overview page by [@​zmerlynn](https://github.com/zmerlynn) in [https://github.com/googleforgames/agones/pull/3792](https://github.com/googleforgames/agones/pull/3792) - Update Side Menu: Preserve and Restore Scroll Position by [@​Kalaiselvi84](https://github.com/Kalaiselvi84) in [https://github.com/googleforgames/agones/pull/3805](https://github.com/googleforgames/agones/pull/3805) - fix: typo by [@​skmpf](https://github.com/skmpf) in [https://github.com/googleforgames/agones/pull/3808](https://github.com/googleforgames/agones/pull/3808) - Helm Config: Add httpUnallocatedStatusCode in Allocator Service by [@​Kalaiselvi84](https://github.com/Kalaiselvi84) in [https://github.com/googleforgames/agones/pull/3802](https://github.com/googleforgames/agones/pull/3802) - Update Docs: CountersAndLists to Beta by [@​Kalaiselvi84](https://github.com/Kalaiselvi84) in [https://github.com/googleforgames/agones/pull/3810](https://github.com/googleforgames/agones/pull/3810) - Disable Dev feature FeatureAutopilotPassthroughPort by [@​vicentefb](https://github.com/vicentefb) in [https://github.com/googleforgames/agones/pull/3815](https://github.com/googleforgames/agones/pull/3815) - Disable FeatureAutopilotPassthroughPort in features.go by [@​vicentefb](https://github.com/vicentefb) in [https://github.com/googleforgames/agones/pull/3816](https://github.com/googleforgames/agones/pull/3816) - SDK proto compatibility guarantees and deprecation policies documentation by [@​igooch](https://github.com/igooch) in [https://github.com/googleforgames/agones/pull/3774](https://github.com/googleforgames/agones/pull/3774) - Fix dangling "as of" by [@​zmerlynn](https://github.com/zmerlynn) in [https://github.com/googleforgames/agones/pull/3827](https://github.com/googleforgames/agones/pull/3827) - Steps to Promote SDK Features from Alpha to Beta by [@​Kalaiselvi84](https://github.com/Kalaiselvi84) in [https://github.com/googleforgames/agones/pull/3814](https://github.com/googleforgames/agones/pull/3814) - Adds comment for help troubleshooting issues with terraform tfstate by [@​igooch](https://github.com/igooch) in [https://github.com/googleforgames/agones/pull/3822](https://github.com/googleforgames/agones/pull/3822) - docs: improve counter and list example comments by [@​yonbh](https://github.com/yonbh) in [https://github.com/googleforgames/agones/pull/3818](https://github.com/googleforgames/agones/pull/3818) - Skip /tmp/ on yamllint by [@​zmerlynn](https://github.com/zmerlynn) in [https://github.com/googleforgames/agones/pull/3838](https://github.com/googleforgames/agones/pull/3838) - TestAllocatorAfterDeleteReplica: More logging by [@​zmerlynn](https://github.com/zmerlynn) in [https://github.com/googleforgames/agones/pull/3837](https://github.com/googleforgames/agones/pull/3837) - Instructions for upgrading golang version by [@​gongmax](https://github.com/gongmax) in [https://github.com/googleforgames/agones/pull/3819](https://github.com/googleforgames/agones/pull/3819) - Remove unused function FindGameServerContainer by [@​zmerlynn](https://github.com/zmerlynn) in [https://github.com/googleforgames/agones/pull/3841](https://github.com/googleforgames/agones/pull/3841) - Adds Unreal to the List of URL Links to Not Check by [@​igooch](https://github.com/igooch) in [https://github.com/googleforgames/agones/pull/3847](https://github.com/googleforgames/agones/pull/3847) - docs: clarify virtualization setup for Windows versions by [@​andresromerodev](https://github.com/andresromerodev) in [https://github.com/googleforgames/agones/pull/3850](https://github.com/googleforgames/agones/pull/3850) **New Contributors:** - [@​skmpf](https://github.com/skmpf) made their first contribution in [https://github.com/googleforgames/agones/pull/3808](https://github.com/googleforgames/agones/pull/3808) - [@​yonbh](https://github.com/yonbh) made their first contribution in [https://github.com/googleforgames/agones/pull/3818](https://github.com/googleforgames/agones/pull/3818) - [@​peterzhongyi](https://github.com/peterzhongyi) made their first contribution in [https://github.com/googleforgames/agones/pull/3844](https://github.com/googleforgames/agones/pull/3844) - [@​andresromerodev](https://github.com/andresromerodev) made their first contribution in [https://github.com/googleforgames/agones/pull/3850](https://github.com/googleforgames/agones/pull/3850) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zOTAuMCIsInVwZGF0ZWRJblZlciI6IjM3LjM5MC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9oZWxtIiwidHlwZS9taW5vciJdfQ==-->
What type of PR is this?
/kind feature
What this PR does / Why we need it:
Which issue(s) this PR fixes:
Closes #3804
Special notes for your reviewer: