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

@ -118,10 +118,10 @@ type LoadBalancerSpec struct {
// It defaults to https when Kubernetes Service port is 443, http otherwise.
Scheme string `json:"scheme,omitempty"`
// Strategy defines the load balancing strategy between the servers.
// Supported values are: wrr (Weighed round-robin), p2c (Power of two choices), and hrw (Highest Random Weight).
// Supported values are: wrr (Weighed round-robin), p2c (Power of two choices), hrw (Highest Random Weight), and leasttime (Least-Time).
// RoundRobin value is deprecated and supported for backward compatibility.
// TODO: when the deprecated RoundRobin value will be removed, set the default value to wrr.
// +kubebuilder:validation:Enum=wrr;p2c;hrw;RoundRobin
// TODO: when the deprecated RoundRobin value will be removed, set the default kubebuilder value to wrr.
// +kubebuilder:validation:Enum=wrr;p2c;hrw;leasttime;RoundRobin
Strategy dynamic.BalancerStrategy `json:"strategy,omitempty"`
// PassHostHeader defines whether the client Host header is forwarded to the upstream Kubernetes Service.
// By default, passHostHeader is true.