Skip to content

Hybrid gateways - EndpointSlice conversion #2264

@mlavacca

Description

@mlavacca

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 EndpointSliceConverter struct that implements the APIConverter interface and converts one EndpointSlice into the following set of resources:
    • KongUpstreams
    • One KongTarget per raw endpoint
  • Controller: Create a new instance of the HybridGatewayReconciler that reconciles EndpointSlices and uses the converter defined above
  • Watches: Define the set of Watches and Owns for 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 the KongUpstream and KongTarget CRs.

Acceptance Criteria

  • All the points described in the problem statement are properly implemented

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions