2021-06-11 13:30:05 +00:00
|
|
|
package v1alpha1
|
|
|
|
|
|
|
|
import (
|
2023-02-03 14:24:05 +00:00
|
|
|
"github.com/traefik/traefik/v3/pkg/config/dynamic"
|
2021-06-11 13:30:05 +00:00
|
|
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
|
|
)
|
|
|
|
|
|
|
|
// +genclient
|
|
|
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
|
|
|
2022-06-24 10:40:08 +00:00
|
|
|
// MiddlewareTCP is the CRD implementation of a Traefik TCP middleware.
|
2024-06-27 14:28:03 +00:00
|
|
|
// More info: https://doc.traefik.io/traefik/v3.1/middlewares/overview/
|
2021-06-11 13:30:05 +00:00
|
|
|
type MiddlewareTCP struct {
|
2022-06-24 10:40:08 +00:00
|
|
|
metav1.TypeMeta `json:",inline"`
|
|
|
|
// Standard object's metadata.
|
|
|
|
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
2021-06-11 13:30:05 +00:00
|
|
|
metav1.ObjectMeta `json:"metadata"`
|
|
|
|
|
|
|
|
Spec MiddlewareTCPSpec `json:"spec"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// +k8s:deepcopy-gen=true
|
|
|
|
|
2022-06-24 10:40:08 +00:00
|
|
|
// MiddlewareTCPSpec defines the desired state of a MiddlewareTCP.
|
2021-06-11 13:30:05 +00:00
|
|
|
type MiddlewareTCPSpec struct {
|
2022-06-24 10:40:08 +00:00
|
|
|
// InFlightConn defines the InFlightConn middleware configuration.
|
2021-11-29 16:12:06 +00:00
|
|
|
InFlightConn *dynamic.TCPInFlightConn `json:"inFlightConn,omitempty"`
|
2024-01-11 09:40:06 +00:00
|
|
|
// IPWhiteList defines the IPWhiteList middleware configuration.
|
2024-01-29 16:32:05 +00:00
|
|
|
// This middleware accepts/refuses connections based on the client IP.
|
2024-01-11 09:40:06 +00:00
|
|
|
// Deprecated: please use IPAllowList instead.
|
2024-06-27 14:28:03 +00:00
|
|
|
// More info: https://doc.traefik.io/traefik/v3.1/middlewares/tcp/ipwhitelist/
|
2024-01-11 09:40:06 +00:00
|
|
|
IPWhiteList *dynamic.TCPIPWhiteList `json:"ipWhiteList,omitempty"`
|
2022-10-26 15:16:05 +00:00
|
|
|
// IPAllowList defines the IPAllowList middleware configuration.
|
2024-01-29 16:32:05 +00:00
|
|
|
// This middleware accepts/refuses connections based on the client IP.
|
2024-06-27 14:28:03 +00:00
|
|
|
// More info: https://doc.traefik.io/traefik/v3.1/middlewares/tcp/ipallowlist/
|
2022-10-26 15:16:05 +00:00
|
|
|
IPAllowList *dynamic.TCPIPAllowList `json:"ipAllowList,omitempty"`
|
2021-06-11 13:30:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
|
|
|
|
|
2022-06-24 10:40:08 +00:00
|
|
|
// MiddlewareTCPList is a collection of MiddlewareTCP resources.
|
2021-06-11 13:30:05 +00:00
|
|
|
type MiddlewareTCPList struct {
|
|
|
|
metav1.TypeMeta `json:",inline"`
|
2022-06-24 10:40:08 +00:00
|
|
|
// Standard object's metadata.
|
|
|
|
// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
|
2021-06-11 13:30:05 +00:00
|
|
|
metav1.ListMeta `json:"metadata"`
|
|
|
|
|
2022-06-24 10:40:08 +00:00
|
|
|
// Items is the list of MiddlewareTCP.
|
2021-06-11 13:30:05 +00:00
|
|
|
Items []MiddlewareTCP `json:"items"`
|
|
|
|
}
|