1
0
Fork 0

Add least time load balancing strategy

This commit is contained in:
Simon Delicata 2025-10-23 16:16:05 +02:00 committed by GitHub
parent 067c7e7152
commit a754236ce5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 1830 additions and 134 deletions

View file

@ -384,7 +384,7 @@ func (c configBuilder) buildServersLB(namespace string, svc traefikv1alpha1.Load
// TODO: remove this when the fake client apply default values.
if svc.Strategy != "" {
switch svc.Strategy {
case dynamic.BalancerStrategyWRR, dynamic.BalancerStrategyP2C, dynamic.BalancerStrategyHRW:
case dynamic.BalancerStrategyWRR, dynamic.BalancerStrategyP2C, dynamic.BalancerStrategyHRW, dynamic.BalancerStrategyLeastTime:
lb.Strategy = svc.Strategy
// Here we are just logging a warning as the default value is already applied.