traefik/pkg/provider/kubernetes/crd/traefikio/v1alpha1/middlewaretcp.go

51 lines
1.9 KiB
Go
Raw Normal View History

2021-06-11 13:30:05 +00:00
package v1alpha1
import (
"github.com/traefik/traefik/v2/pkg/config/dynamic"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// MiddlewareTCP is the CRD implementation of a Traefik TCP middleware.
2024-01-03 10:12:05 +00:00
// More info: https://doc.traefik.io/traefik/v2.11/middlewares/overview/
2021-06-11 13:30:05 +00:00
type MiddlewareTCP struct {
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
// MiddlewareTCPSpec defines the desired state of a MiddlewareTCP.
2021-06-11 13:30:05 +00:00
type MiddlewareTCPSpec struct {
// InFlightConn defines the InFlightConn middleware configuration.
InFlightConn *dynamic.TCPInFlightConn `json:"inFlightConn,omitempty"`
// IPWhiteList defines the IPWhiteList middleware configuration.
// This middleware accepts/refuses connections based on the client IP.
// Deprecated: please use IPAllowList instead.
2024-01-03 10:12:05 +00:00
// More info: https://doc.traefik.io/traefik/v2.11/middlewares/tcp/ipwhitelist/
IPWhiteList *dynamic.TCPIPWhiteList `json:"ipWhiteList,omitempty"`
// IPAllowList defines the IPAllowList middleware configuration.
// This middleware accepts/refuses connections based on the client IP.
2024-01-03 10:12:05 +00:00
// More info: https://doc.traefik.io/traefik/v2.11/middlewares/tcp/ipallowlist/
IPAllowList *dynamic.TCPIPAllowList `json:"ipAllowList,omitempty"`
2021-06-11 13:30:05 +00:00
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// MiddlewareTCPList is a collection of MiddlewareTCP resources.
2021-06-11 13:30:05 +00:00
type MiddlewareTCPList struct {
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.ListMeta `json:"metadata"`
// Items is the list of MiddlewareTCP.
2021-06-11 13:30:05 +00:00
Items []MiddlewareTCP `json:"items"`
}