diff --git a/api/v1alpha1/loadbalancer_types.go b/api/v1alpha1/loadbalancer_types.go index 795390bb525..d4912aebd4a 100644 --- a/api/v1alpha1/loadbalancer_types.go +++ b/api/v1alpha1/loadbalancer_types.go @@ -66,6 +66,15 @@ type ConsistentHash struct { // // +optional Header *Header `json:"header,omitempty"` + + // The table size for consistent hashing, must be prime number limited to 5000011. + // + // +kubebuilder:validation:Minimum=2 + // +kubebuilder:validation:Maximum=5000011 + // +kubebuilder:default=65537 + // +optional + // +notImplementedHide + TableSize *uint64 `json:"tableSize,omitempty"` } // Header defines the header hashing configuration for consistent hash based diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 5dc25960173..c584ae2d62a 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -783,6 +783,11 @@ func (in *ConsistentHash) DeepCopyInto(out *ConsistentHash) { *out = new(Header) **out = **in } + if in.TableSize != nil { + in, out := &in.TableSize, &out.TableSize + *out = new(uint64) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsistentHash. 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 6f5b369ce73..37aabbbefc1 100644 --- a/charts/gateway-helm/crds/generated/gateway.envoyproxy.io_backendtrafficpolicies.yaml +++ b/charts/gateway-helm/crds/generated/gateway.envoyproxy.io_backendtrafficpolicies.yaml @@ -422,6 +422,14 @@ spec: required: - name type: object + tableSize: + default: 65537 + description: The table size for consistent hashing, must be + prime number limited to 5000011. + format: int64 + maximum: 5000011 + minimum: 2 + type: integer type: description: ConsistentHashType defines the type of input to hash on. Valid Type values are "SourceIP" or "Header".