Skip to content

Commit b318269

Browse files
authored
Merge pull request #143 from loxilb-io/fullproxy
PR : support for fullproxy annotation
2 parents b4529cb + 67e20ad commit b318269

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

pkg/agent/manager/loadbalancer/loadbalancer.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,9 @@ func (m *Manager) addLoadBalancer(svc *corev1.Service) error {
401401

402402
// Check for loxilb specific annotations - NAT LB Mode
403403
if lbm := svc.Annotations[lbModeAnnotation]; lbm != "" {
404-
if lbm == "dsr" {
404+
if lbm == "fullproxy" {
405+
lbMode = 4
406+
} else if lbm == "dsr" {
405407
lbMode = 3
406408
} else if lbm == "fullnat" {
407409
lbMode = 2
@@ -493,6 +495,8 @@ func (m *Manager) addLoadBalancer(svc *corev1.Service) error {
493495
epSelect = api.LbSelRrPersist
494496
} else if eps == "lc" {
495497
epSelect = api.LbSelLeastConnections
498+
} else if eps == "n2" {
499+
epSelect = api.LbSelN2
496500
} else {
497501
epSelect = api.LbSelRr
498502
}

pkg/api/lb.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ const (
1919
LbSelRrPersist
2020
// LbSelLeastConnections - select client based on least connections
2121
LbSelLeastConnections
22+
// LbSelN2 - select client based on N2 interface contents
23+
LbSelN2
2224
)
2325

2426
type LbMode int32

0 commit comments

Comments
 (0)