Skip to content

Commit

Permalink
BUG: correct parsing of url_param option for load-balance algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanmatmati authored and oktalz committed May 26, 2023
1 parent 3f4b7fa commit 891f3c6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/annotations/service/loadbalance.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ func getParamsFromInput(value string) (*models.Balance, error) {
}
i := 1
if algorithm == "url_param" {
if i >= len(tokens) {
return balance, fmt.Errorf("missing parameter for algorithm '%s' in balance configuration", algorithm)
}
balance.URLParam = tokens[i]
i++
}
Expand Down

0 comments on commit 891f3c6

Please sign in to comment.