Skip to content

PROVISIONAL: Backend GEP - #4818

Merged
k8s-ci-robot merged 4 commits into
kubernetes-sigs:mainfrom
keithmattix:backend-gep-provisional
May 4, 2026
Merged

k8s-ci-robot merged 4 commits into
kubernetes-sigs:mainfrom
keithmattix:backend-gep-provisional

Conversation

@keithmattix

@keithmattix keithmattix commented May 1, 2026 •

Copy link
Copy Markdown
Contributor

Opening a Provisional version of #4488 at @kflynn's request (and heckling 😉) to follow the proper Gateway API release management processes of having a "what" and "why" GEP in provisional before going into API design.

Add GEP for the `Backend` resource into Provisional status

@k8s-ci-robot k8s-ci-robot added do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels May 1, 2026
@k8s-ci-robot
k8s-ci-robot requested a review from howardjohn May 1, 2026 16:49
@k8s-ci-robot k8s-ci-robot added the kind/gep PRs related to Gateway Enhancement Proposal(GEP) label May 1, 2026
@k8s-ci-robot
k8s-ci-robot requested a review from youngnick May 1, 2026 16:49
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 1, 2026
Signed-off-by: Keith Mattix II <keithmattix@microsoft.com>
@keithmattix
keithmattix force-pushed the backend-gep-provisional branch from 2093034 to 513b54e Compare May 1, 2026 16:49
@kflynn

kflynn commented May 1, 2026

Copy link
Copy Markdown
Contributor

Oh c'mon, there was only a little heckling... 😂

I think this looks good! Two things I'd like to see before we merge this one:

  • There are still a couple of changes to the BackendTLSPolicy Go files that I think should be backed out.
  • We don't have the concept of "Alpha" and "Beta" any more in Gateway API, really; those graduation criteria could become the Implementable or Experimental advancement criteria, maybe? or, since that section is mostly duplicating things already written down for Gateway API, it could be rewritten to note just the additions to Gateway API's graduation criteria.

Thanks for turning this around so quickly!

Signed-off-by: Keith Mattix II <keithmattix@microsoft.com>
Signed-off-by: Keith Mattix II <keithmattix@microsoft.com>
@kflynn

kflynn commented May 1, 2026

Copy link
Copy Markdown
Contributor

Thanks!

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 1, 2026
Comment thread geps/gep-4488/index.md Outdated

## TLDR

This GEP proposes a new `Backend` resource to address the fact that Service is a mature and stable, if complex API. It is useful to be able to add Gateway-specific behaviors to Service, but previous approaches (like BackendTLSPolicy) have significant limltations, particuarly around discoverability and implementation complexity.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would like to propose a different name choice than Backend for this resource. If I understand correctly, Backend does not replace BackendTLSPolicy yet introduces some ambiguity between the two resources because of the similarity in names. We explicitly chose to use the terms backend and frontend as defined in GEP-2907: TLS Configuration Placement and Terminology
and if we decide to drop that terminology, we'd need to rename a few other resources.

Since this appears to be primarily for egress routing, how about calling it Egress, or something similar?
If it can be used in combination with BackendTLSPolicy, how about BackendConfig, or something similar?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Backend is actually designed to be more flexible than BackendTLSPolicy and more powerful for every comsumer-oriented use-case. The EndpointSelector mode in the GEP will allow it to decorate internal Service resources too so EgressBackend would actually be too limiting IMO.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Anything other than just Backend that describes better what this resource does, would be much appreciated.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Rereading @keithmattix's paragraph here, I can see potential for confusion.

The point of Backend, to my way of thinking, isn't to duplicate or replace BackendTLSPolicy: it's to give us a resource that we control that allows us to describe a routing destination. In other words, it's a thing to use instead of Service in the backend role (as described in GEP-2907). So in my mind, Backend is the correct name since the intention is that a Backend is always filling the backend role.

So BackendTLSPolicy isn't being used as an example of another resource in the same role that Backend is meant to fill -- rather, it's an example of a way in which we attached behavior to Service since we didn't have any other way to describe the backend role. Keith, we should probably spend a little time improving this language...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yeah, because this is effectively us saying "We're going to need to add a lot of things to Service, and having a Policy for each is going to be awful, let's use a Service replacement instead", Backend is actually the best name for it to me too.

I agree there's some overlap with BackendTLSPolicy, but that's because there's overlap with the functions they perform. To be honest, I wish we had moved forward with just wrapping Service like this proposal suggests instead of moving forward with a Policy, and I would anticipate that eventually, Backend will grow a copy of the BackendTLSPolicy spec aside from targetRefs, in addition to session persistence, retries, and so on.

Basically, the idea here is that everything we've ever said "man I wish we could just add this to Service", we'll put in Backend instead. And so, because this object will be referenced by backendRefs across many Routes, to me, the name makes sense.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah makes sense; reworded

@howardjohn

Copy link
Copy Markdown
Contributor

/lgtm
/approve

Comment thread geps/gep-4488/index.md

### As an Application Developer

> "I want to configure my application to call external APIs (like OpenAI) with specific TLS settings and authentication without creating synthetic Services that expose security risks or affect other applications."

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would love to see an additional story here that is not specific to egress gateway but to ingress traffic (eg.: I want to expose my application additional signaling to the Gateway how it should be connecting to it, what timeouts use, etc)

This is the idea, not necessarily the story but we could already map how backend could be used for non-egress cases

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added a couple; LMK what you think

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

:chefkiss:

Comment thread geps/gep-4488/index.md Outdated

```yaml
apiVersion: networking.example.com/v1
kind: RetryPolicy

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It is a bit conflicting for me the goal that says about all "enable backend-specific policies", with the proposal of making it better than BackendTLSPolicy and immediately here using RetryPolicy as an example.

Tbh I would expect that policy attachment to a Backend is a last resort, and even filters like retry, session persistence and others become a Backend filter (how to connect to a backend is the goal, right?) other than "now you can apply tls configuration in Backend, but you need to use a policy attachment for retry"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fantastic point; updated to discuss inline policy instead with a caveat that policy attachment is still available as a last resort

@youngnick

Copy link
Copy Markdown
Contributor

For me, this looks good enough for Provisional, so I'll approve and leave the hold for @rikatz to remove.

/approve

@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: howardjohn, keithmattix, kflynn, youngnick

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 4, 2026
Signed-off-by: Keith Mattix II <keithmattix2@gmail.com>
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels May 4, 2026
Comment thread geps/gep-4488/index.md

This conflation creates friction in a few notable areas:

### External Destination Limitationsr. The Backend resource provides

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

typo (can be fixed on a followup)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

also the title is kinda weird here,, I guess you forgot to remove the "The Backend resource provides"

Comment thread geps/gep-4488/index.md
└─────────────────────────────────────────────┘
```

Existing `Service`-based `backendRef`s in HTTPRoutes continue to work indefinitely. The `Backend` resource is an opt-in addition for users who need Gateway-specific backend configuration.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

just a clarification: this means that for filters that have a backendRef both services and Backend will work, right? So I can have an ext_auth that uses a Backend or should I use a service? (probably this should be declared on the API of each filter as well, as it may impact how each filter can, for instance use a TLS configuration instead of a BackendTLSPolicy, but also, I wouldn't expect that a filter would need a ratelimit or a backend of type MCP).

Just some loud thinking of something we need to sort out

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Agreed this needs a bit more work to refine and document, not an experimental blocker though.

@rikatz

rikatz commented May 4, 2026

Copy link
Copy Markdown
Member

/lgtm
@keithmattix unhold once you are ready to merge, given my comments. They can be addressed as a followup to this PR.

Thanks!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 4, 2026
@rikatz

rikatz commented May 4, 2026

Copy link
Copy Markdown
Member

/hold cancel
We will proceed with this and once we do experimental GEP Keith will make the fixes

Thanks!

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 4, 2026
@k8s-ci-robot
k8s-ci-robot merged commit e001205 into kubernetes-sigs:main May 4, 2026
32 checks passed
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. kind/gep PRs related to Gateway Enhancement Proposal(GEP) lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants