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
Add support for dynamic upstreams
Previously, NKG used the cluster IP of the Service to route traffic to the
backend Services specified by HTTPRoutes. With this commit, NKG will use the
endpoints of the Pods corresponding to a Service as the upstream servers for a
backend Service.
This change adds the following components:
* EndpointSlice controller for caching and listing EndpointSlices.
* Relationship.Capturer for tracking and reporting on relationships between
Gateway API resources and non-Gateway API resources (e.g. Services).
* ServiceResolver replaces the ServiceStore and resolves Service:Port to a list
* of endpoints.
This commit also adds upstreams to the nginx config generator. One upstream is
generated for each unique and valid Service:Port BackendRef. If a BackendRef
cannot be resolved, a 502 is returned.
Known Limitations:
* Traffic cannot be routed to Headless Services that do not have a defined port.
* If a user manually creates and EndpointSlice, they will need to populate the
"kubernetes.io/service-name" label and set the ready condition of the
endpoints to true. Otherwise, NKG will fail to resolve the Service endpoints.
Copy file name to clipboardExpand all lines: docs/gateway-api-compatibility.md.md
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -87,11 +87,16 @@ Fields:
87
87
* `headers` - partially supported. Only `Exact` type.
88
88
* `queryParams` - partially supported. Only `Exact` type.
89
89
* `method` - supported.
90
+
<<<<<<< HEAD
90
91
* `filters`
91
92
* `type` - supported.
92
93
* `requestRedirect` - supported except for the experimental `path` field. If multiple filters with `requestRedirect` are configured, NGINX Kubernetes Gateway will choose the first one and ignore the rest.
93
94
* `requestHeaderModifier`, `requestMirror`, `urlRewrite`, `extensionRef` - not supported.
94
95
* `backendRefs` - partially supported. Only a single backend ref without support for `weight`. Backend ref `filters` are not supported. NGINX Kubernetes Gateway will use the IP of the Service as a backend, not the IPs of the corresponding Pods. Watching for Service updates is not supported.
96
+
=======
97
+
* `filters` - not supported.
98
+
* `backendRefs` - partially supported. Only a single backend ref without support for `weight`. Backend ref `filters` are not supported.
99
+
>>>>>>> 1697a08... Add support for dynamic upstreams
95
100
*`status`
96
101
*`parents`
97
102
* `parentRef` - supported.
@@ -120,4 +125,4 @@ Fields:
120
125
121
126
Custom policies will be NGINX Kubernetes Gateway-specific CRDs that will allow supporting features like timeouts, load-balancing methods, authentication, etc. - important data-plane features that are not part of the Gateway API spec.
122
127
123
-
While those CRDs are not part of the Gateway API, the mechanism of attaching them to Gateway API resources is part of the Gateway API. See the [Policy Attachment doc](https://gateway-api.sigs.k8s.io/references/policy-attachment/).
128
+
While those CRDs are not part of the Gateway API, the mechanism of attaching them to Gateway API resources is part of the Gateway API. See the [Policy Attachment doc](https://gateway-api.sigs.k8s.io/references/policy-attachment/).
0 commit comments