From 78f31d0522d0903913e2d2609febc23d635c05a1 Mon Sep 17 00:00:00 2001 From: Dingkang Li Date: Wed, 8 May 2024 17:32:05 +0800 Subject: [PATCH] Set consistent hash table size's minimum as the smallest prime number: 2 Signed-off-by: Dingkang Li --- api/v1alpha1/loadbalancer_types.go | 2 +- .../generated/gateway.envoyproxy.io_backendtrafficpolicies.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/v1alpha1/loadbalancer_types.go b/api/v1alpha1/loadbalancer_types.go index 2b3ab91b828..9e9026af3e7 100644 --- a/api/v1alpha1/loadbalancer_types.go +++ b/api/v1alpha1/loadbalancer_types.go @@ -58,7 +58,7 @@ type ConsistentHash struct { // The table size for consistent hashing, must be prime number limited to 5000011. // - // +kubebuilder:validation:Minimum=1 + // +kubebuilder:validation:Minimum=2 // +kubebuilder:validation:Maximum=5000011 // +kubebuilder:default=65537 // +optional diff --git a/charts/gateway-helm/crds/generated/gateway.envoyproxy.io_backendtrafficpolicies.yaml b/charts/gateway-helm/crds/generated/gateway.envoyproxy.io_backendtrafficpolicies.yaml index b51c0ae8cdc..afb60bee9b2 100644 --- a/charts/gateway-helm/crds/generated/gateway.envoyproxy.io_backendtrafficpolicies.yaml +++ b/charts/gateway-helm/crds/generated/gateway.envoyproxy.io_backendtrafficpolicies.yaml @@ -418,7 +418,7 @@ spec: prime number limited to 5000011. format: int64 maximum: 5000011 - minimum: 1 + minimum: 2 type: integer type: description: ConsistentHashType defines the type of input