wait for logr update

This commit is contained in:
ston1th 2021-10-20 20:28:16 +02:00
commit 201274a727
4 changed files with 60 additions and 61 deletions

View file

@ -83,10 +83,12 @@ func (lb *loadbalancer) EnsureLoadBalancer(ctx context.Context, clusterName stri
if bo, ok := service.Annotations[BackendHAProxyLBOptions]; ok {
slb.Options.Backend = strings.Split(bo, ",")
}
if cp, ok := service.Annotations[BackendHAProxyLBProxyProtocol]; ok {
if cp == "v1" || cp == "v2" {
slb.Options.ProxyProtocol = cp
if lbpp, ok := service.Annotations[BackendHAProxyLBProxyProtocol]; ok {
pp, err := schema.ParseProxyProtocol(lbpp)
if err != nil {
return nil, err
}
slb.Options.ProxyProtocol = pp
}
if cpp, ok := service.Annotations[BackendHAProxyLBCheckProxyProtocol]; ok {
slb.Options.CheckProxyProtocol = cpp == "true"