Native Kubernetes service load-balancing
This commit is contained in:
parent
7af9d16208
commit
6e460cd652
37 changed files with 1013 additions and 67 deletions
|
@ -115,10 +115,14 @@ type LoadBalancerSpec struct {
|
|||
// It allows to configure the transport between Traefik and your servers.
|
||||
// Can only be used on a Kubernetes Service.
|
||||
ServersTransport string `json:"serversTransport,omitempty"`
|
||||
|
||||
// Weight defines the weight and should only be specified when Name references a TraefikService object
|
||||
// (and to be precise, one that embeds a Weighted Round Robin).
|
||||
Weight *int `json:"weight,omitempty"`
|
||||
// NativeLB controls, when creating the load-balancer,
|
||||
// whether the LB's children are directly the pods IPs or if the only child is the Kubernetes Service clusterIP.
|
||||
// The Kubernetes Service itself does load-balance to the pods.
|
||||
// By default, NativeLB is false.
|
||||
NativeLB bool `json:"nativeLB,omitempty"`
|
||||
}
|
||||
|
||||
// Service defines an upstream HTTP service to proxy traffic to.
|
||||
|
|
|
@ -78,6 +78,11 @@ type ServiceTCP struct {
|
|||
// ProxyProtocol defines the PROXY protocol configuration.
|
||||
// More info: https://doc.traefik.io/traefik/v2.9/routing/services/#proxy-protocol
|
||||
ProxyProtocol *dynamic.ProxyProtocol `json:"proxyProtocol,omitempty"`
|
||||
// NativeLB controls, when creating the load-balancer,
|
||||
// whether the LB's children are directly the pods IPs or if the only child is the Kubernetes Service clusterIP.
|
||||
// The Kubernetes Service itself does load-balance to the pods.
|
||||
// By default, NativeLB is false.
|
||||
NativeLB bool `json:"nativeLB,omitempty"`
|
||||
}
|
||||
|
||||
// +genclient
|
||||
|
|
|
@ -33,6 +33,11 @@ type ServiceUDP struct {
|
|||
Port intstr.IntOrString `json:"port"`
|
||||
// Weight defines the weight used when balancing requests between multiple Kubernetes Service.
|
||||
Weight *int `json:"weight,omitempty"`
|
||||
// NativeLB controls, when creating the load-balancer,
|
||||
// whether the LB's children are directly the pods IPs or if the only child is the Kubernetes Service clusterIP.
|
||||
// The Kubernetes Service itself does load-balance to the pods.
|
||||
// By default, NativeLB is false.
|
||||
NativeLB bool `json:"nativeLB,omitempty"`
|
||||
}
|
||||
|
||||
// +genclient
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue