Skip to content
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

Initial Egress GEP #1971

Closed
wants to merge 9 commits into from
Closed

Conversation

quangnguyen101
Copy link

What type of PR is this?

/kind gep

What this PR does / why we need it:
GEP: Add support to Gateway API for Egress use case to enable egress traffic.

Which issue(s) this PR fixes:

Fixes #1856

Does this PR introduce a user-facing change?:

This GEP will propose a new API EgressRoute for the Gateway API to enable egress traffic.  

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/gep PRs related to Gateway Enhancement Proposal(GEP) labels Apr 24, 2023
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Apr 24, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Apr 24, 2023
@k8s-ci-robot
Copy link
Contributor

Welcome @quangnguyen101!

It looks like this is your first PR to kubernetes-sigs/gateway-api 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/gateway-api has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 24, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @quangnguyen101. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@quangnguyen101 quangnguyen101 marked this pull request as ready for review April 24, 2023 22:38
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 24, 2023
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Apr 24, 2023
Copy link
Member

@shaneutt shaneutt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking the time to create this GEP!

I've left a few comments, mainly about pulling back on implementation details and strengthening the motivation for the proposal a little bit.

Also I do think we should allow some soak time for other community members to take a look:

/hold

/cc @mlavacca @arkodg @sunjayBhatia @keithmattix @mikemorris @howardjohn

geps/gep-1856.md Outdated Show resolved Hide resolved
geps/gep-1856.md Outdated Show resolved Hide resolved
geps/gep-1856.md Outdated Show resolved Hide resolved
geps/gep-1856.md Show resolved Hide resolved
geps/gep-1856.md Outdated Show resolved Hide resolved
geps/gep-1856.md Outdated Show resolved Hide resolved
geps/gep-1856.md Outdated Show resolved Hide resolved
geps/gep-1856.md Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 25, 2023
Set Status to "Provisional". Remove other statuses.

Co-authored-by: Shane Utt <[email protected]>
@arkodg
Copy link
Contributor

arkodg commented Apr 25, 2023

hey @quangnguyen101 would https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.21/#networkpolicyegressrule-v1-networking-k8s-io be another location to add this feature (SNAT) ? so L3 policies live in NetworkPolicy and L4-L7 live in Gateway API ?

Accept suggested rewording.

Co-authored-by: Shane Utt <[email protected]>
@quangnguyen101
Copy link
Author

quangnguyen101 commented Aug 2, 2023 via email

@quangnguyen101
Copy link
Author

quangnguyen101 commented Aug 3, 2023 via email

@shaneutt
Copy link
Member

shaneutt commented Aug 3, 2023

Can we try to do a zoom next week?

Yes, hit me up on k8s slack

Copy link
Member

@shaneutt shaneutt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We talked about this one in a sync today, and have some major takeaways which we want to incorporate in the doc:

  • we want to drop the EgressRoute naming from the title
  • we want to add routing (as in network routing, as opposed to Gateway API *Routes) to the Gateway, giving it the ability to associate itself with "networks" and route traffic over those networks.
  • we want application developers to be able to declare "I need access to networks on a Gateway to send my egress traffic" (e.g. zero trust use cases, e.t.c.)

We also discussed the possibility that we might do ingress routing (again, network routing not gateway api routes) as well, but this needs more discussion as the use cases weren't entirely clear yet during the call.

@shaneutt
Copy link
Member

shaneutt commented Aug 14, 2023

Also after our discussion today, I would recommend we bring some of this discussion to the bi-monthly SIG Network sync, as this is steeped in more low-level and traditional networking concepts, and the group there is well versed. Recently when discussing routability the SIG Network group pointed us more towards the multi-network project, and generally speaking I think what you're getting into with this GEP has some very interesting and far reaching implications.

@quangnguyen101
Copy link
Author

quangnguyen101 commented Aug 17, 2023 via email

@k8s-ci-robot k8s-ci-robot added do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Aug 21, 2023
@k8s-ci-robot
Copy link
Contributor

New changes are detected. LGTM label has been removed.

@shaneutt shaneutt changed the title /kind gep #1856 Add EgressRoute to Gateway API Initial Egress GEP Aug 24, 2023
@k8s-ci-robot k8s-ci-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Aug 24, 2023
@shaneutt shaneutt removed the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Aug 24, 2023
@youngnick
Copy link
Contributor

Once #2689 merges, this will need a rebase and update - the GEP files have moved.

geps/gep-1856.md Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Mar 12, 2024
@k8s-ci-robot
Copy link
Contributor

Keywords which can automatically close issues and at(@) or hashtag(#) mentions are not allowed in commit messages.

The list of commits with invalid commit messages:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-ci-robot
Copy link
Contributor

@quangnguyen101: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-gateway-api-test ff40855 link true /test pull-gateway-api-test
pull-gateway-api-verify ff40855 link true /test pull-gateway-api-verify

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 10, 2024
@shaneutt
Copy link
Member

There hasn't been activity on this in a long while, and some of the fundamental problems (for instance, not having enough allied implementations that need this yet) still remain. I think at this point it's pretty fair to say that we should probably close this one for now?

/close

@quangnguyen101 if you disagree however, please do feel free to re-open if you're still ready to push! And in any case, I personally haven't forgotten about egress, I'm just wondering if its something we need to work on at a different level (that is to say, perhaps outside of Gateway API?).

@k8s-ci-robot
Copy link
Contributor

@shaneutt: Closed this PR.

In response to this:

There hasn't been activity on this in a long while, and some of the fundamental problems (for instance, not having enough allied implementations that need this yet) still remain. I think at this point it's pretty fair to say that we should probably close this one for now?

/close

@quangnguyen101 if you disagree however, please do feel free to re-open if you're still ready to push! And in any case, I personally haven't forgotten about egress, I'm just wondering if its something we need to work on at a different level (that is to say, perhaps outside of Gateway API?).

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@mikemorris
Copy link
Contributor

I'm just wondering if its something we need to work on at a different level (that is to say, perhaps outside of Gateway API?)

This is what I've been wondering about too, and at a minimum better defining a problem space that makes sense to solve within Gateway API if applicable. I'm curious if some of the telco/IP use cases may be a better fit for an L3 solution in the Network Policy working group, whether that's extending AdminNetworkPolicy or some new resource, and even some common mesh functionality like FQDN egress filtering might make sense to implement over there too.

@shaneutt
Copy link
Member

shaneutt commented Jun 21, 2024

I'm just wondering if its something we need to work on at a different level (that is to say, perhaps outside of Gateway API?)

This is what I've been wondering about too, and at a minimum better defining a problem space that makes sense to solve within Gateway API if applicable.

👍

I'm curious if some of the telco/IP use cases may be a better fit for an L3 solution

Yes, @quangnguyen101 and some of his team (Philip Klatte in particular) and I talked at some length about the possibilities for KNI to help with their use cases. I think the multi-network project also potentially has some play here.

in the Network Policy working group, whether that's extending AdminNetworkPolicy or some new resource, and even some common mesh functionality like FQDN egress filtering might make sense to implement over there too.

I'm open to suggestion, but I guess I would need to hear a bit more 🤔 If nothing else, it can't hurt to ask that group some of their thoughts on the subject. I've put an agenda item from us on the netpol meeting for July 2nd to at least just float the thoughts out there with the group. If you can't make that one let me know I'm happy to wait until a time we can both get their and have our coffee hot and ready ☕

@quangnguyen101
Copy link
Author

Hi @shaneutt @mikemorris thanks for your continue attention to this GEP. Sorry I have been busy on a high priority/tight schedule project, etc. etc. We are actually planning on a GW API implementation for Egress in our product along with TCP/UDP and HTTP that we've already implemented. @mikemorris can you please forward me the netpol meeting? Thanks!

@shaneutt
Copy link
Member

Hey @quangnguyen101! Let's keep staying in touch. Here's the list of meetings which includes the details for the netpol meeting!

@hochoy
Copy link

hochoy commented Jul 2, 2024

Hi there, I'm relatively inexperienced with the work in this group, but was trying to look for this feature.

From a functional perspective, how is this proposal different from this Egress Gateway implementation example from Istio docs?

  1. In the example below, I believe they connected 2 TLSRoutes via the same gateway to achieve Egress control.
  2. Is this proposal focused on adding syntax to the Gateway to allow the same (or more) Egress control?

https://istio.io/latest/docs/tasks/traffic-management/egress/egress-gateway/#egress-gateway-for-https-traffic
Screenshot 2024-07-02 at 9 10 41 AM

@mikemorris
Copy link
Contributor

mikemorris commented Jul 2, 2024

From a functional perspective, how is this proposal different from this Egress Gateway implementation example from Istio docs?

@hochoy This proposal would be to adopt functionality like that example within the actual Gateway API spec. Istio is using the TLSRoute CRD there, but with a bit of non-standard usage leveraging the extensibility available through the TLSRoute resource:

  • Adding an annotation to configure the Gateway with cluster-internal routability (refs GEP: Gateway Routability #1651 attempting to bring this capability in-spec)
  • Using parentRefs on the first TLSRoute to attach to an Istio ServiceEntry CRD (Gateway API doesn't have a comparable resource like this currently)
  • Using backendRefs on the second TLSRoute to attach to an Istio Hostname CRD (feels comparable to a Kubernetes Service resource with type ExternalName but there's been a lot of hesitancy around doing anything with ExternalName because of historical CVEs/vulnerabilties)

While this example feels like it makes logical sense composed like this, it does feel sligthly more verbose (requires deploying ~5 different resources) than I'd ideally like to see in spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. kind/gep PRs related to Gateway Enhancement Proposal(GEP) lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GEP: Enable egress use case for the Gateway API
10 participants