Skip to content

Commit 891f3c6

Browse files
ivanmatmatioktalz
authored andcommitted
BUG: correct parsing of url_param option for load-balance algorithm
1 parent 3f4b7fa commit 891f3c6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/annotations/service/loadbalance.go

+3
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ func getParamsFromInput(value string) (*models.Balance, error) {
7272
}
7373
i := 1
7474
if algorithm == "url_param" {
75+
if i >= len(tokens) {
76+
return balance, fmt.Errorf("missing parameter for algorithm '%s' in balance configuration", algorithm)
77+
}
7578
balance.URLParam = tokens[i]
7679
i++
7780
}

0 commit comments

Comments
 (0)