You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: geps/gep-3798/index.md
+10-60Lines changed: 10 additions & 60 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,8 @@
10
10
### What
11
11
This GEP proposes the addition of Client IP-based session persistence to the Gateway API. This feature will allow Gateway API implementations to ensure that requests originating from a specific client IP address (or a subnet defined by an IP mask) are consistently routed to the same backend endpoint for a configurable duration. This aims to provide a standardized and centralized mechanism for client IP persistence across various Gateway API implementations.
12
12
13
+
As mentioned in the [GEP-1619](https://gateway-api.sigs.k8s.io/geps/gep-1619/#api), `SessionPersistence` can be applied via `BackendLBPolicy` and `RouteRule` API. Similar [edge case behaviour](https://gateway-api.sigs.k8s.io/geps/gep-1619/#edge-case-behavior) and [API Granularity](https://gateway-api.sigs.k8s.io/geps/gep-1619/#api-granularity) for ClientIP Persistence type should be applicable as well.
14
+
13
15
## Goals
14
16
15
17
* Define an API extension within Gateway API to enable client IP-based session persistence.
@@ -52,66 +54,7 @@ This GEP addresses these issues by providing a first-class API mechanism for cli
52
54
53
55
## API
54
56
55
-
As mentioned in the [GEP-1619](https://gateway-api.sigs.k8s.io/geps/gep-1619/#api), `SessionPersistence` can be applied via `BackendLBPolicy` and `RouteRule` API .Similar [edge case behaviour](https://gateway-api.sigs.k8s.io/geps/gep-1619/#edge-case-behavior) and [API Granularity](https://gateway-api.sigs.k8s.io/geps/gep-1619/#api-granularity) for ClientIP Persistence type should be applicable as well.
56
-
57
-
Requirement is to introduce a new `SessionPersistenceType` called `ClientIP`
58
-
59
-
Example (illustrative, exact field names and structure are subject to review):
60
-
61
-
```
62
-
# Existing SessionPersistence (simplified for example)
63
-
# apiVersion: gateway.networking.k8s.io/v1beta1
64
-
# kind: HTTPRoute
65
-
66
-
spec:
67
-
rules:
68
-
- backendRefs:
69
-
- name: my-service
70
-
port: 80
71
-
sessionPersistence:
72
-
# New field for client IP based persistence
73
-
type: "ClientIP"
74
-
absoluteTimeout: "5m"
75
-
ipMask: 24 # Optional: IP mask for subnet persistence (e.g., "24" for /24 subnet)
76
-
```
77
-
```
78
-
type SessionPersistence struct {
79
-
...
80
-
81
-
// IPMask defines the IP mask to be applied on client this may be
82
-
// used to persist clients from a same subnet to stick to same session
0 commit comments