From e43de39d9e3e34bf3b0c7ddc4c02aafdf1b6c89b Mon Sep 17 00:00:00 2001 From: Trekkie Coder Date: Tue, 4 Jun 2024 09:57:39 +0900 Subject: [PATCH] added support for LB select type for N2 interface --- cmd/create/create_loadbalancer.go | 3 +++ cmd/get/get_loadbalancer.go | 2 ++ 2 files changed, 5 insertions(+) diff --git a/cmd/create/create_loadbalancer.go b/cmd/create/create_loadbalancer.go index 21a448c..d9c4a14 100644 --- a/cmd/create/create_loadbalancer.go +++ b/cmd/create/create_loadbalancer.go @@ -84,6 +84,8 @@ func SelectToNum(sel string) int { ret = 3 case "lc": ret = 4 + case "n2": + ret = 5 default: ret = 0 } @@ -120,6 +122,7 @@ func NewCreateLoadBalancerCmd(restOptions *api.RESTOptions) *cobra.Command { hash - select the lb end-points based on hashing priority - select the lb based on weighted round-robin persist - select the lb end-point based on sender + n2 - select the lb end-point base on N2 interface params (only available with fullproxy mode) --mode value options onearm - LB put LB-IP as srcIP fullnat - LB put Service IP as scrIP diff --git a/cmd/get/get_loadbalancer.go b/cmd/get/get_loadbalancer.go index 2cc87ab..5aa947e 100644 --- a/cmd/get/get_loadbalancer.go +++ b/cmd/get/get_loadbalancer.go @@ -76,6 +76,8 @@ func NumToSelect(sel int) string { ret = "persist" case 4: ret = "lc" + case 5: + ret = "n2" default: ret = "rr" }