Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/dynamic upstreams #221

Merged
merged 1 commit into from
Sep 30, 2022
Merged

Feature/dynamic upstreams #221

merged 1 commit into from
Sep 30, 2022

Commits on Sep 30, 2022

  1. 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.
    kate-osborn committed Sep 30, 2022
    Configuration menu
    Copy the full SHA
    231937f View commit details
    Browse the repository at this point in the history