Skip to content

GEP-1619: Backend as attachment point for Session Persistence - #4876

Merged
kubernetes-prow[bot] merged 4 commits into
kubernetes-sigs:mainfrom
gcs278:gep1619-backend-attachment
Sep 24, 2026
Merged

kubernetes-prow[bot] merged 4 commits into
kubernetes-sigs:mainfrom
gcs278:gep1619-backend-attachment

Conversation

@gcs278

@gcs278 gcs278 commented May 18, 2026 •

Copy link
Copy Markdown
Contributor

What type of PR is this?
/kind gep

What this PR does / why we need it:

Champions the Backend resource (GEP-4894) as the primary attachment point for session persistence, deprecating route-inline and BackendTrafficPolicy session persistence. Updates the GEP API sections, edge cases, and examples to reflect Backend. Adds deprecation notices to the sessionPersistence fields on HTTPRouteRule, GRPCRouteRule, and BackendTrafficPolicy.

This PR is a declaration of direction, not an implementation. It does not actually add sessionPersistence to the Backend API - that is blocked on Backend supporting Service or EndpointSelector bindings #4731.

Which issue(s) this PR fixes:
Fixes # N/A

Related: #4462 #4258

Does this PR introduce a user-facing change?:

SessionPersistence: deprecate route-inline and BackendTrafficPolicy session persistence

@k8s-ci-robot

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. 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 May 18, 2026
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: gcs278
Once this PR has been reviewed and has the lgtm label, please assign robscott for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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 requested review from kflynn and snorwin May 18, 2026 17:46
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 18, 2026
@rikatz

rikatz commented Jul 3, 2026

Copy link
Copy Markdown
Member

Backend is already experimental :)

Comment thread geps/gep-1619/index.md Resolved
@bjee19

bjee19 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Btw, the GEP link for the backend resource in the PR description seems to point to a missing GEP https://gateway-api.sigs.k8s.io/geps/gep-4488/, if that could be updated to the correct GEP and/or other information on the Backend resource that would be helpful, thanks!

@kubernetes-prow kubernetes-prow Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 6, 2026
@keithmattix

Copy link
Copy Markdown
Contributor

Oh yeah the GEP got renamed; it's https://gateway-api.sigs.k8s.io/geps/gep-4894/

@gcs278

gcs278 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

Btw, the GEP link for the backend resource in the PR description seems to point to a missing GEP https://gateway-api.sigs.k8s.io/geps/gep-4488/, if that could be updated to the correct GEP and/or other information on the Backend resource that would be helpful, thanks!

Done, thanks for pointing that out. I'll update the PR Description to be more complete when I update this PR.

@gcs278
gcs278 force-pushed the gep1619-backend-attachment branch 2 times, most recently from 15a928b to a9af888 Compare July 15, 2026 01:48
@kubernetes-prow kubernetes-prow Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 15, 2026
@gcs278
gcs278 force-pushed the gep1619-backend-attachment branch 4 times, most recently from 21e0518 to 6bc1c97 Compare July 16, 2026 02:01
@gcs278 gcs278 changed the title [WIP] GEP-1619: Backend as attachment point for Session Persistence GEP-1619: Backend as attachment point for Session Persistence Jul 16, 2026
@gcs278
gcs278 marked this pull request as ready for review July 16, 2026 02:17
@kubernetes-prow kubernetes-prow Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 16, 2026
Move session persistence from BackendTrafficPolicy and route-inline to
the Backend resource (GEP-4488). Remove BTP and route-inline API sections,
update API Attachment Points to only Backend, and deprecate route-inline.
@gcs278
gcs278 force-pushed the gep1619-backend-attachment branch from 74b55a8 to d05444f Compare September 15, 2026 00:59
Prior ART shows that most, if not all, implementations and data planes
apply session persistence after routing (backend selection). Update traffic
splitting guidance so that session persistence does not override backend
selection. Also remove redundant mixed-backends edge case.
@gcs278
gcs278 force-pushed the gep1619-backend-attachment branch from d05444f to a55ee65 Compare September 15, 2026 01:00
@gcs278

gcs278 commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

@mikemorris @youngnick @rikatz ready for another review. Sorry for the delays. One commit remove BackendTrafficPolicy and Route-inline for backend on the GEP + adding a deprecation notice for them on the API objects, and another commit follows up on the traffic splitting suggestion that @mikemorris made.

@gcs278

gcs278 commented Sep 22, 2026

Copy link
Copy Markdown
Contributor Author

@mikemorris @youngnick @rikatz PTAL when you get a chance. I'm hoping to get this in sometime this week so I can create a follow up PR that adds sessionPersistence fields to the Backend experimental API.

Comment thread geps/gep-1619/index.md Resolved
Comment thread geps/gep-1619/index.md Resolved
- Move SessionPersistence to be within EndpointSelector in Backend
- Specify relationship with backend protocol
- Clarify that the cookie/header MAY not be sent to the backend
@youngnick

Copy link
Copy Markdown
Contributor

This basically LGTM once @rikatz's questions are sorted.

@gcs278

gcs278 commented Sep 24, 2026

Copy link
Copy Markdown
Contributor Author

@youngnick @rikatz thanks ready for review again

Update from MAY to SHOULD for whether the backend behavior of receiving
the gateway generated cookie based on prior art.
@gcs278
gcs278 force-pushed the gep1619-backend-attachment branch from 0a6b0ef to 23dcf0a Compare September 24, 2026 02:19
@youngnick

Copy link
Copy Markdown
Contributor

LGTM now, thanks @gcs278.

/approve

@kubernetes-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gcs278, 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

@kubernetes-prow kubernetes-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 24, 2026
@rikatz

rikatz commented Sep 24, 2026

Copy link
Copy Markdown
Member

/lgtm

thanks! we may still need to validate that the protocol used is not some that does not support session persistence based on cookie, I would like to see it on conformance and once moving to experimental for real, but for now this is fine

@rikatz

rikatz commented Sep 24, 2026

Copy link
Copy Markdown
Member

/hold cancel

@kubernetes-prow kubernetes-prow Bot added lgtm "Looks good to me", indicates that a PR is ready to be merged. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Sep 24, 2026
@rikatz

rikatz commented Sep 24, 2026

Copy link
Copy Markdown
Member

/test pull-gateway-api-verify

@kubernetes-prow
kubernetes-prow Bot merged commit ddbd6ba into kubernetes-sigs:main Sep 24, 2026
20 checks passed
gcs278 added a commit to gcs278/gateway-api that referenced this pull request Sep 24, 2026
Implement Session Persistence API as described in kubernetes-sigs#4876 in Backend
spec.endpointSelector. Update GEP-4894 to reflect Session Persistence is
no longer future item.
gcs278 added a commit to gcs278/gateway-api that referenced this pull request Sep 28, 2026
Implement Session Persistence API as described in kubernetes-sigs#4876 in Backend
spec.endpointSelector. Update GEP-4894 to reflect Session Persistence is
no longer future item.
gcs278 added a commit to gcs278/gateway-api that referenced this pull request Sep 28, 2026
Implement Session Persistence API as described in kubernetes-sigs#4876 in Backend
spec.endpointSelector. Update GEP-4894 to reflect Session Persistence is
no longer future item.
kubernetes-prow Bot pushed a commit that referenced this pull request Sep 28, 2026
* GEP-1619: Add Session Persistence API to Backend

Implement Session Persistence API as described in #4876 in Backend
spec.endpointSelector. Update GEP-4894 to reflect Session Persistence is
no longer future item.

* GEP-1619: Move SessionPersistence to Top Level of Backend

Refactor SessionPersistence API to move to the top level of backend so
that it can potentially be re-used with other object references of
backend in the future. Use CEL to restrict it to EndpointSelector for
now.

* GEP-4894: Make inlined labelselector optional

The spec.endpointSelector.labelSelector field was inlined and has no
JSON property name which causes all objects to fail with invalid
required: [""] error. The matchLabel field within labelSelector is
already required, while the inlined struct should be optional.

* GEP-1619: Code Review Responses

- Update CEL to use ternary and CEL message
- Fix double negative of API doc
- Remove session persistence from GEP-4894
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.

7 participants