Skip to content

support endpoint picker based on host override policy #6456

@Xunzhuo

Description

@Xunzhuo

Description:

Support Endpoint Picker Based on the Host Override Policy: https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/load_balancing_policies/override_host/v3/override_host.proto

Host Override Policy selects the endpoint from the header or metadata, and lookup in the cluster endpoints. If there is no available endpoint selected, it will use the fallback policy to select an endpoint in the cluster endpoints.

Introducing a new loadbalancer type HostOverride in BackendTrafficPolicy to make this happen.

apiVersion: gateway.envoyproxy.io/v1alpha1
kind: BackendTrafficPolicy
metadata:
  name: host-override-policy
  namespace: default
spec:
  targetRefs:
    - group: gateway.networking.k8s.io
      kind: HTTPRoute
      name:  host-override-route
  loadBalancer:
    type: HostOverride
    hostOverrideSettings:
      overrideHostSources:
      - header: target-pod
      - metadata:
          key: "envoy.lb"
          path:
          - key: "override-host"
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: static-resolver-route
  namespace: default
spec:
  parentRefs:
    - name: eg
  hostnames:
    - "www.example.com"
  rules:
    - 
      backendRefs:
        - kind: Service
           name: inference-pool-svc
           port: 3000

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions