-
Notifications
You must be signed in to change notification settings - Fork 27
Description
Problem Statement
In #2262 the HTTPRoute BackendRefs are converted to KongTargets pointing to Kubernetes Services.
This issues explodes the Kubernetes Services in Endpoints and the KongTargets should point to actual Endpoints.
The weight assigned to each resulting KongTarget endpoint should be computed taking into account the weight assigned to the Service in the BackendRefs section of the HTTPRoute and the number of Endpoints belonging to the Service.
Configure EndpointSlice in Konnect Hybrid Gateways. To achieve this high-level result, the following set of tasks needs to be addressed:
- Conversion: Create a new
EndpointSliceConverterstruct that implements theAPIConverterinterface and converts oneEndpointSliceinto the following set of resources:KongUpstreams- One
KongTargetper raw endpoint
- Controller: Create a new instance of the
HybridGatewayReconcilerthat reconcilesEndpointSlices and uses the converter defined above - Watches: Define the set of
WatchesandOwnsfor the controller above, in order to be sure that all the needed APIs are properly used to trigger new reconciliation events - RBACs: Ensure the Controller has the set of RBACs needed to perform the CRUD operations on the underlying APIs.
- Status update: Ensure the status of the
HTTPRoutes is enriched with the proper set of conditions related to theKongUpstreamandKongTargetCRs.
Acceptance Criteria
- All the points described in the problem statement are properly implemented