Skip to content

Commit 5ad7a4f

Browse files
authored
feat(lb): add first to ForwardPortAlgorithm enum (#1467)
1 parent 28af2f1 commit 5ad7a4f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

cmd/scw/testdata/test-all-usage-lb-backend-create-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ARGS:
99
name=<generated> Resource name
1010
forward-protocol Backend protocol. TCP or HTTP (tcp | http)
1111
forward-port User sessions will be forwarded to this port of backend servers
12-
forward-port-algorithm=roundrobin Load balancing algorithm (roundrobin | leastconn)
12+
forward-port-algorithm=roundrobin Load balancing algorithm (roundrobin | leastconn | first)
1313
sticky-sessions=none Enables cookie-based session persistence (none | cookie | table)
1414
[sticky-sessions-cookie-name] Cookie name for for sticky sessions
1515
[health-check.mysql-config.user]

cmd/scw/testdata/test-all-usage-lb-backend-update-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ARGS:
1010
[name]
1111
[forward-protocol] (tcp | http)
1212
[forward-port]
13-
[forward-port-algorithm] (roundrobin | leastconn)
13+
[forward-port-algorithm] (roundrobin | leastconn | first)
1414
[sticky-sessions] (none | cookie | table)
1515
[sticky-sessions-cookie-name]
1616
[timeout-server]

internal/namespaces/lb/v1/lb_cli.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ func lbBackendCreate() *core.Command {
700700
Deprecated: false,
701701
Positional: false,
702702
Default: core.DefaultValueSetter("roundrobin"),
703-
EnumValues: []string{"roundrobin", "leastconn"},
703+
EnumValues: []string{"roundrobin", "leastconn", "first"},
704704
},
705705
{
706706
Name: "sticky-sessions",
@@ -931,7 +931,7 @@ func lbBackendUpdate() *core.Command {
931931
Required: false,
932932
Deprecated: false,
933933
Positional: false,
934-
EnumValues: []string{"roundrobin", "leastconn"},
934+
EnumValues: []string{"roundrobin", "leastconn", "first"},
935935
},
936936
{
937937
Name: "sticky-sessions",

0 commit comments

Comments
 (0)