Skip to content

Commit

Permalink
Set consistent hash table size's minimum as the smallest prime number: 2
Browse files Browse the repository at this point in the history
Signed-off-by: Dingkang Li <dingkang1743@gmail.com>
  • Loading branch information
aoledk committed May 8, 2024
1 parent 7a37883 commit 78f31d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/v1alpha1/loadbalancer_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 78f31d0

Please sign in to comment.