Skip to content

Commit a28bf0e

Browse files
jgraniecznyoktalz
authored andcommitted
BUG/MINOR: Fix parsing for load balancing algorithm params
When using annotation for load balancing algorithm with parameters, the arguments were not parsed correctly for "hdr", "random" and "rdp-cook ie" due to wrong regex
1 parent 3d15d2d commit a28bf0e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

controller/annotations/service/loadbalance.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func getParamsFromInput(value string) (*models.Balance, error) {
5252
return nil, fmt.Errorf("missing algorithm name")
5353
}
5454

55-
reg := regexp.MustCompile(`(\\(|\\))"`)
55+
reg := regexp.MustCompile(`(\(|\))`)
5656
algorithmTokens := reg.Split(tokens[0], -1)
5757
algorithm := algorithmTokens[0]
5858
balance.Algorithm = &algorithm

0 commit comments

Comments
 (0)