Skip to content

Commit 686d984

Browse files
Update: Add support for SlowStart configuration for ClientSideWeightedRoundRobin load balancer in Gateway CRDs, configurations, and tests. Adjust validation rules and documentation accordingly.
Signed-off-by: anurag.ag <[email protected]>
1 parent a479e67 commit 686d984

22 files changed

+287
-220
lines changed

api/v1alpha1/loadbalancer_types.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import gwapiv1 "sigs.k8s.io/gateway-api/apis/v1"
1212
//
1313
// +kubebuilder:validation:XValidation:rule="self.type == 'ConsistentHash' ? has(self.consistentHash) : !has(self.consistentHash)",message="If LoadBalancer type is consistentHash, consistentHash field needs to be set."
1414
// +kubebuilder:validation:XValidation:rule="self.type == 'ClientSideWeightedRoundRobin' ? has(self.clientSideWeightedRoundRobin) : !has(self.clientSideWeightedRoundRobin)",message="If LoadBalancer type is ClientSideWeightedRoundRobin, clientSideWeightedRoundRobin field needs to be set."
15-
// +kubebuilder:validation:XValidation:rule="self.type in ['Random', 'ConsistentHash', 'ClientSideWeightedRoundRobin'] ? !has(self.slowStart) : true ",message="Currently SlowStart is only supported for RoundRobin and LeastRequest load balancers."
15+
// +kubebuilder:validation:XValidation:rule="self.type in ['Random', 'ConsistentHash'] ? !has(self.slowStart) : true ",message="Currently SlowStart is only supported for RoundRobin, LeastRequest, and ClientSideWeightedRoundRobin load balancers."
1616
// +kubebuilder:validation:XValidation:rule="self.type in ['ConsistentHash', 'ClientSideWeightedRoundRobin'] ? !has(self.zoneAware) : true ",message="Currently ZoneAware is only supported for LeastRequest, Random, and RoundRobin load balancers."
1717
type LoadBalancer struct {
1818
// Type decides the type of Load Balancer policy.
@@ -47,7 +47,7 @@ type LoadBalancer struct {
4747

4848
// SlowStart defines the configuration related to the slow start load balancer policy.
4949
// If set, during slow start window, traffic sent to the newly added hosts will gradually increase.
50-
// Currently this is only supported for RoundRobin and LeastRequest load balancers
50+
// Supported for RoundRobin, LeastRequest, and ClientSideWeightedRoundRobin load balancers.
5151
//
5252
// +optional
5353
SlowStart *SlowStart `json:"slowStart,omitempty"`
@@ -160,7 +160,6 @@ type Cookie struct {
160160

161161
// ClientSideWeightedRoundRobin defines configuration for Envoy's Client-Side Weighted Round Robin policy.
162162
// See Envoy proto: envoy.extensions.load_balancing_policies.client_side_weighted_round_robin.v3.ClientSideWeightedRoundRobin
163-
// Note: SlowStart is not supported for this policy in Envoy Gateway at this time.
164163
type ClientSideWeightedRoundRobin struct {
165164
// A given endpoint must report load metrics continuously for at least this long before the endpoint weight will be used.
166165
// Default is 10s.

charts/gateway-crds-helm/templates/generated/gateway.envoyproxy.io_backendtrafficpolicies.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,7 @@ spec:
871871
description: |-
872872
SlowStart defines the configuration related to the slow start load balancer policy.
873873
If set, during slow start window, traffic sent to the newly added hosts will gradually increase.
874-
Currently this is only supported for RoundRobin and LeastRequest load balancers
874+
Supported for RoundRobin, LeastRequest, and ClientSideWeightedRoundRobin load balancers.
875875
properties:
876876
window:
877877
description: |-
@@ -948,10 +948,10 @@ spec:
948948
field needs to be set.
949949
rule: 'self.type == ''ClientSideWeightedRoundRobin'' ? has(self.clientSideWeightedRoundRobin)
950950
: !has(self.clientSideWeightedRoundRobin)'
951-
- message: Currently SlowStart is only supported for RoundRobin and
952-
LeastRequest load balancers.
953-
rule: 'self.type in [''Random'', ''ConsistentHash'', ''ClientSideWeightedRoundRobin'']
954-
? !has(self.slowStart) : true '
951+
- message: Currently SlowStart is only supported for RoundRobin, LeastRequest,
952+
and ClientSideWeightedRoundRobin load balancers.
953+
rule: 'self.type in [''Random'', ''ConsistentHash''] ? !has(self.slowStart)
954+
: true '
955955
- message: Currently ZoneAware is only supported for LeastRequest,
956956
Random, and RoundRobin load balancers.
957957
rule: 'self.type in [''ConsistentHash'', ''ClientSideWeightedRoundRobin'']

charts/gateway-crds-helm/templates/generated/gateway.envoyproxy.io_envoyextensionpolicies.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,7 @@ spec:
936936
description: |-
937937
SlowStart defines the configuration related to the slow start load balancer policy.
938938
If set, during slow start window, traffic sent to the newly added hosts will gradually increase.
939-
Currently this is only supported for RoundRobin and LeastRequest load balancers
939+
Supported for RoundRobin, LeastRequest, and ClientSideWeightedRoundRobin load balancers.
940940
properties:
941941
window:
942942
description: |-
@@ -1015,10 +1015,11 @@ spec:
10151015
clientSideWeightedRoundRobin field needs to be set.
10161016
rule: 'self.type == ''ClientSideWeightedRoundRobin'' ?
10171017
has(self.clientSideWeightedRoundRobin) : !has(self.clientSideWeightedRoundRobin)'
1018-
- message: Currently SlowStart is only supported for RoundRobin
1019-
and LeastRequest load balancers.
1020-
rule: 'self.type in [''Random'', ''ConsistentHash'', ''ClientSideWeightedRoundRobin'']
1021-
? !has(self.slowStart) : true '
1018+
- message: Currently SlowStart is only supported for RoundRobin,
1019+
LeastRequest, and ClientSideWeightedRoundRobin load
1020+
balancers.
1021+
rule: 'self.type in [''Random'', ''ConsistentHash''] ?
1022+
!has(self.slowStart) : true '
10221023
- message: Currently ZoneAware is only supported for LeastRequest,
10231024
Random, and RoundRobin load balancers.
10241025
rule: 'self.type in [''ConsistentHash'', ''ClientSideWeightedRoundRobin'']

charts/gateway-crds-helm/templates/generated/gateway.envoyproxy.io_envoyproxies.yaml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11947,7 +11947,7 @@ spec:
1194711947
description: |-
1194811948
SlowStart defines the configuration related to the slow start load balancer policy.
1194911949
If set, during slow start window, traffic sent to the newly added hosts will gradually increase.
11950-
Currently this is only supported for RoundRobin and LeastRequest load balancers
11950+
Supported for RoundRobin, LeastRequest, and ClientSideWeightedRoundRobin load balancers.
1195111951
properties:
1195211952
window:
1195311953
description: |-
@@ -12035,10 +12035,10 @@ spec:
1203512035
? has(self.clientSideWeightedRoundRobin)
1203612036
: !has(self.clientSideWeightedRoundRobin)'
1203712037
- message: Currently SlowStart is only
12038-
supported for RoundRobin and LeastRequest
12039-
load balancers.
12040-
rule: 'self.type in [''Random'', ''ConsistentHash'',
12041-
''ClientSideWeightedRoundRobin'']
12038+
supported for RoundRobin, LeastRequest,
12039+
and ClientSideWeightedRoundRobin load
12040+
balancers.
12041+
rule: 'self.type in [''Random'', ''ConsistentHash'']
1204212042
? !has(self.slowStart) : true '
1204312043
- message: Currently ZoneAware is only
1204412044
supported for LeastRequest, Random,
@@ -13260,7 +13260,7 @@ spec:
1326013260
description: |-
1326113261
SlowStart defines the configuration related to the slow start load balancer policy.
1326213262
If set, during slow start window, traffic sent to the newly added hosts will gradually increase.
13263-
Currently this is only supported for RoundRobin and LeastRequest load balancers
13263+
Supported for RoundRobin, LeastRequest, and ClientSideWeightedRoundRobin load balancers.
1326413264
properties:
1326513265
window:
1326613266
description: |-
@@ -13348,10 +13348,10 @@ spec:
1334813348
? has(self.clientSideWeightedRoundRobin)
1334913349
: !has(self.clientSideWeightedRoundRobin)'
1335013350
- message: Currently SlowStart is only
13351-
supported for RoundRobin and LeastRequest
13352-
load balancers.
13353-
rule: 'self.type in [''Random'', ''ConsistentHash'',
13354-
''ClientSideWeightedRoundRobin'']
13351+
supported for RoundRobin, LeastRequest,
13352+
and ClientSideWeightedRoundRobin load
13353+
balancers.
13354+
rule: 'self.type in [''Random'', ''ConsistentHash'']
1335513355
? !has(self.slowStart) : true '
1335613356
- message: Currently ZoneAware is only
1335713357
supported for LeastRequest, Random,
@@ -14659,7 +14659,7 @@ spec:
1465914659
description: |-
1466014660
SlowStart defines the configuration related to the slow start load balancer policy.
1466114661
If set, during slow start window, traffic sent to the newly added hosts will gradually increase.
14662-
Currently this is only supported for RoundRobin and LeastRequest load balancers
14662+
Supported for RoundRobin, LeastRequest, and ClientSideWeightedRoundRobin load balancers.
1466314663
properties:
1466414664
window:
1466514665
description: |-
@@ -14746,10 +14746,10 @@ spec:
1474614746
? has(self.clientSideWeightedRoundRobin)
1474714747
: !has(self.clientSideWeightedRoundRobin)'
1474814748
- message: Currently SlowStart is only supported
14749-
for RoundRobin and LeastRequest load balancers.
14750-
rule: 'self.type in [''Random'', ''ConsistentHash'',
14751-
''ClientSideWeightedRoundRobin''] ? !has(self.slowStart)
14752-
: true '
14749+
for RoundRobin, LeastRequest, and ClientSideWeightedRoundRobin
14750+
load balancers.
14751+
rule: 'self.type in [''Random'', ''ConsistentHash'']
14752+
? !has(self.slowStart) : true '
1475314753
- message: Currently ZoneAware is only supported
1475414754
for LeastRequest, Random, and RoundRobin
1475514755
load balancers.
@@ -15964,7 +15964,7 @@ spec:
1596415964
description: |-
1596515965
SlowStart defines the configuration related to the slow start load balancer policy.
1596615966
If set, during slow start window, traffic sent to the newly added hosts will gradually increase.
15967-
Currently this is only supported for RoundRobin and LeastRequest load balancers
15967+
Supported for RoundRobin, LeastRequest, and ClientSideWeightedRoundRobin load balancers.
1596815968
properties:
1596915969
window:
1597015970
description: |-
@@ -16048,10 +16048,10 @@ spec:
1604816048
rule: 'self.type == ''ClientSideWeightedRoundRobin''
1604916049
? has(self.clientSideWeightedRoundRobin) : !has(self.clientSideWeightedRoundRobin)'
1605016050
- message: Currently SlowStart is only supported for
16051-
RoundRobin and LeastRequest load balancers.
16052-
rule: 'self.type in [''Random'', ''ConsistentHash'',
16053-
''ClientSideWeightedRoundRobin''] ? !has(self.slowStart)
16054-
: true '
16051+
RoundRobin, LeastRequest, and ClientSideWeightedRoundRobin
16052+
load balancers.
16053+
rule: 'self.type in [''Random'', ''ConsistentHash'']
16054+
? !has(self.slowStart) : true '
1605516055
- message: Currently ZoneAware is only supported for
1605616056
LeastRequest, Random, and RoundRobin load balancers.
1605716057
rule: 'self.type in [''ConsistentHash'', ''ClientSideWeightedRoundRobin'']

0 commit comments

Comments
 (0)