Merge branch v2.10 into v3.0

This commit is contained in:
Fernandez Ludovic 2023-06-05 11:05:29 +02:00
commit 606281a4a5
20 changed files with 196 additions and 73 deletions

View file

@ -420,8 +420,8 @@ func (c configBuilder) loadServers(parentNamespace string, svc traefikv1alpha1.L
return nil, fmt.Errorf("subset not found for %s/%s", namespace, sanitizedName)
}
var port int32
for _, subset := range endpoints.Subsets {
var port int32
for _, p := range subset.Ports {
if svcPort.Name == p.Name {
port = p.Port
@ -430,7 +430,7 @@ func (c configBuilder) loadServers(parentNamespace string, svc traefikv1alpha1.L
}
if port == 0 {
return nil, fmt.Errorf("cannot define a port for %s/%s", namespace, sanitizedName)
continue
}
protocol, err := parseServiceProtocol(svc.Scheme, svcPort.Name, svcPort.Port)