Skip to content

Commit

Permalink
Merge pull request #143 from loxilb-io/fullproxy
Browse files Browse the repository at this point in the history
PR : support for fullproxy annotation
  • Loading branch information
TrekkieCoder authored Jun 4, 2024
2 parents b4529cb + 67e20ad commit b318269
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/agent/manager/loadbalancer/loadbalancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,9 @@ func (m *Manager) addLoadBalancer(svc *corev1.Service) error {

// Check for loxilb specific annotations - NAT LB Mode
if lbm := svc.Annotations[lbModeAnnotation]; lbm != "" {
if lbm == "dsr" {
if lbm == "fullproxy" {
lbMode = 4
} else if lbm == "dsr" {
lbMode = 3
} else if lbm == "fullnat" {
lbMode = 2
Expand Down Expand Up @@ -493,6 +495,8 @@ func (m *Manager) addLoadBalancer(svc *corev1.Service) error {
epSelect = api.LbSelRrPersist
} else if eps == "lc" {
epSelect = api.LbSelLeastConnections
} else if eps == "n2" {
epSelect = api.LbSelN2
} else {
epSelect = api.LbSelRr
}
Expand Down
2 changes: 2 additions & 0 deletions pkg/api/lb.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ const (
LbSelRrPersist
// LbSelLeastConnections - select client based on least connections
LbSelLeastConnections
// LbSelN2 - select client based on N2 interface contents
LbSelN2
)

type LbMode int32
Expand Down

0 comments on commit b318269

Please sign in to comment.