forked from envoyproxy/gateway
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into dev-fix-warning-message
Signed-off-by: tmsnan <zhaonan06@corp.netease.com>
- Loading branch information
Showing
243 changed files
with
2,697 additions
and
522 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,5 +20,8 @@ reviewers: | |
- chauhanshubham | ||
- kflynn | ||
- LanceEa | ||
- qicz | ||
- zhaohuabing | ||
- tmsnan | ||
- tanujd11 | ||
- cnvergence | ||
- shawnh2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// Copyright Envoy Gateway Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// The full text of the Apache license is available in the LICENSE file at | ||
// the root of the repo. | ||
|
||
package v1alpha1 | ||
|
||
// LoadBalancer defines the load balancer policy to be applied. | ||
// +union | ||
type LoadBalancer struct { | ||
// Type decides the type of Load Balancer policy. | ||
// Valid RateLimitType values are | ||
// "ConsistentHash", | ||
// "LeastRequest", | ||
// "Random", | ||
// "RoundRobin", | ||
// | ||
// +unionDiscriminator | ||
Type LoadBalancerType `json:"type"` | ||
// ConsistentHash defines the configuration when the load balancer type is | ||
// set to ConsistentHash | ||
// | ||
// +optional | ||
ConsistentHash *ConsistentHash `json:"consistentHash,omitempty"` | ||
} | ||
|
||
// LoadBalancerType specifies the types of LoadBalancer. | ||
// +kubebuilder:validation:Enum=ConsistentHash;LeastRequest;Random;RoundRobin | ||
type LoadBalancerType string | ||
|
||
const ( | ||
// ConsistentHashLoadBalancerType load balancer policy. | ||
ConsistentHashLoadBalancerType LoadBalancerType = "ConsistentHash" | ||
// LeastRequestLoadBalancerType load balancer policy. | ||
LeastRequestLoadBalancerType LoadBalancerType = "LeastRequest" | ||
// RandomLoadBalancerType load balancer policy. | ||
RandomLoadBalancerType LoadBalancerType = "Random" | ||
// RoundRobinLoadBalancerType load balancer policy. | ||
RoundRobinLoadBalancerType LoadBalancerType = "RoundRobin" | ||
) | ||
|
||
// ConsistentHash defines the configuration related to the consistent hash | ||
// load balancer policy | ||
type ConsistentHash struct { | ||
Type ConsistentHashType `json:"type"` | ||
} | ||
|
||
// ConsistentHashType defines the type of input to hash on. | ||
// +kubebuilder:validation:Enum=SourceIP | ||
type ConsistentHashType string | ||
|
||
const ( | ||
// SourceIPConsistentHashType hashes based on the source IP address. | ||
SourceIPConsistentHashType ConsistentHashType = "SourceIP" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.