1
0
Fork 0
traefik/pkg/provider/kubernetes/crd/traefik/v1alpha1/ingressrouteudp.go
Jean-Baptiste Doumenjou 992d4c1b94
Upgrade the CRD version from apiextensions.k8s.io/v1beta1 to apiextensions.k8s.io/v1
Co-authored-by: kevinpollet <pollet.kevin@gmail.com>
2021-03-03 15:32:04 +01:00

52 lines
1.5 KiB
Go

package v1alpha1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
)
// IngressRouteUDPSpec is a specification for a IngressRouteUDPSpec resource.
type IngressRouteUDPSpec struct {
Routes []RouteUDP `json:"routes"`
EntryPoints []string `json:"entryPoints,omitempty"`
}
// RouteUDP contains the set of routes.
type RouteUDP struct {
Services []ServiceUDP `json:"services,omitempty"`
}
// TLSOptionUDPRef is a ref to the TLSOption resources.
type TLSOptionUDPRef struct {
Name string `json:"name"`
Namespace string `json:"namespace,omitempty"`
}
// ServiceUDP defines an upstream to proxy traffic.
type ServiceUDP struct {
Name string `json:"name"`
Namespace string `json:"namespace,omitempty"`
Port intstr.IntOrString `json:"port"`
Weight *int `json:"weight,omitempty"`
}
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// +kubebuilder:storageversion
// IngressRouteUDP is an Ingress CRD specification.
type IngressRouteUDP struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata"`
Spec IngressRouteUDPSpec `json:"spec"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// IngressRouteUDPList is a list of IngressRoutes.
type IngressRouteUDPList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
Items []IngressRouteUDP `json:"items"`
}