Enhance controller to allow a single HTTPbackend ref to have targets across multiple clusters
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
sameK8S service name e.g.foo - all cluster(s) define
sameK8S serviceexport namefoo - 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"
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?