Commit graph

6 commits

Author SHA1 Message Date
agile6v
bafbd4cccf Enable lj-releng tool to lint lua code. 2020-06-09 18:01:35 +08:00
Elvin Efendi
41c925f390 bugfix: set canary attributes when initializing balancer 2018-11-13 15:44:57 +04:00
Conor Landry
412cd70d3a implement canary annotation and alternative backends
Adds the ability to create alternative backends. Alternative backends enable
traffic shaping by sharing a single location but routing to different
backends depending on the TrafficShapingPolicy defined by AlternativeBackends.

When the list of upstreams and servers are retrieved, we then call
mergeAlternativeBackends which iterates through the paths of every ingress
and checks if the backend supporting the path is a AlternativeBackend. If
so, we then iterate through the map of servers and find the real backend
that the AlternativeBackend should fall under. Once found, the
AlternativeBackend is embedded in the list of VirtualBackends for the real
backend.

If no matching real backend for a AlternativeBackend is found, then the
AlternativeBackend is deleted as it cannot be backed by any server.
2018-11-06 13:13:14 -05:00
Elvin Efendi
4b07e73e5d refactor lua balancer and fix ipv6 issue 2018-08-16 13:03:41 -04:00
Elvin Efendi
cb4755835e refactor some lua code 2018-06-19 12:46:49 +04:00
Elvin Efendi
e9dc275b81 refactor balancer into more testable and extensible interface 2018-05-28 15:51:58 -04:00