2021-06-11 13:30:05 +00:00
|
|
|
package dynamic
|
|
|
|
|
|
|
|
// +k8s:deepcopy-gen=true
|
|
|
|
|
|
|
|
// TCPMiddleware holds the TCPMiddleware configuration.
|
|
|
|
type TCPMiddleware struct {
|
2022-04-06 09:06:08 +00:00
|
|
|
InFlightConn *TCPInFlightConn `json:"inFlightConn,omitempty" toml:"inFlightConn,omitempty" yaml:"inFlightConn,omitempty" export:"true"`
|
2021-11-29 16:12:06 +00:00
|
|
|
IPWhiteList *TCPIPWhiteList `json:"ipWhiteList,omitempty" toml:"ipWhiteList,omitempty" yaml:"ipWhiteList,omitempty" export:"true"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// +k8s:deepcopy-gen=true
|
|
|
|
|
2022-06-24 10:40:08 +00:00
|
|
|
// TCPInFlightConn holds the TCP InFlightConn middleware configuration.
|
|
|
|
// This middleware prevents services from being overwhelmed with high load,
|
|
|
|
// by limiting the number of allowed simultaneous connections for one IP.
|
|
|
|
// More info: https://doc.traefik.io/traefik/v2.7/middlewares/tcp/inflightconn/
|
2021-11-29 16:12:06 +00:00
|
|
|
type TCPInFlightConn struct {
|
2022-06-24 10:40:08 +00:00
|
|
|
// Amount defines the maximum amount of allowed simultaneous connections.
|
|
|
|
// The middleware closes the connection if there are already amount connections opened.
|
2021-11-29 16:12:06 +00:00
|
|
|
Amount int64 `json:"amount,omitempty" toml:"amount,omitempty" yaml:"amount,omitempty" export:"true"`
|
2021-06-11 13:30:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// +k8s:deepcopy-gen=true
|
|
|
|
|
2022-06-24 10:40:08 +00:00
|
|
|
// TCPIPWhiteList holds the TCP IPWhiteList middleware configuration.
|
|
|
|
// This middleware accepts/refuses connections based on the client IP.
|
2021-06-11 13:30:05 +00:00
|
|
|
type TCPIPWhiteList struct {
|
2022-06-24 10:40:08 +00:00
|
|
|
// SourceRange defines the allowed IPs (or ranges of allowed IPs by using CIDR notation).
|
2021-06-11 13:30:05 +00:00
|
|
|
SourceRange []string `json:"sourceRange,omitempty" toml:"sourceRange,omitempty" yaml:"sourceRange,omitempty"`
|
|
|
|
}
|