aws-application-networking-k8s icon indicating copy to clipboard operation
aws-application-networking-k8s copied to clipboard

Enhance controller to allow a single HTTPbackend ref to have targets across multiple clusters

Open liwenwu-amazon opened this issue 3 years ago • 1 comments

Use Case

Requirement

Customer want to using one single HTTPbackend ref and dynamically scale out targets across multiple cluster(s)

Why

Customer want to automatically scale-out across multiple cluster(s) and want lattice to load balancing them.

Proposal

Define one backendRef and cluster splits traffic across multiple service names.

  • all cluster(s) define same K8S service name e.g. foo
  • all cluster(s) define same K8S serviceexport name foo
  • HTTPbackend ref just point to serviceimport name foo
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: HTTPRoute
metadata:
  name: foo
spec:
  parentRefs:
  - name: my-hotel
    sectionName: http 
  rules:
  - backendRefs:  
    - name: foo
      kind: serviceimport
      port: 80

each cluster will have

apiVersion: multicluster.x-k8s.io/v1alpha1
kind: ServiceExport
metadata:
  name: foo
  annotations:
          multicluster.x-k8s.io/federation: "amazon-vpc-lattice" 

liwenwu-amazon avatar Nov 17 '22 18:11 liwenwu-amazon

all cluster(s) define same K8S serviceexport name foo

I think currently lattice don't support duplicated tg names? to achieve allow a single HTTPbackend ref to have targets across multiple clusters, we need to change tg name convention to add cluster name in the tg name.

(Or another direction: same name serviceExport from multi clusters use one tg, and register different cluster pod ip targets in the tg)

What's the priority for this enhancement?

zijun726911 avatar Sep 15 '23 17:09 zijun726911