1
0
Fork 0

Improve CEL validation on Ingress CRD resources

This commit is contained in:
Michel Loiseleur 2025-03-06 14:48:04 +00:00 committed by GitHub
parent 740b4cfd25
commit c166a41c99
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 282 additions and 0 deletions

View file

@ -28,9 +28,11 @@ type RouteTCP struct {
Match string `json:"match"`
// Priority defines the router's priority.
// More info: https://doc.traefik.io/traefik/v3.3/routing/routers/#priority_1
// +kubebuilder:validation:Maximum=9223372036854774807
Priority int `json:"priority,omitempty"`
// Syntax defines the router's rule syntax.
// More info: https://doc.traefik.io/traefik/v3.3/routing/routers/#rulesyntax_1
// +kubebuilder:validation:Enum=v3;v2
Syntax string `json:"syntax,omitempty"`
// Services defines the list of TCP services.
Services []ServiceTCP `json:"services,omitempty"`
@ -69,8 +71,10 @@ type ServiceTCP struct {
Namespace string `json:"namespace,omitempty"`
// Port defines the port of a Kubernetes Service.
// This can be a reference to a named port.
// +kubebuilder:validation:XIntOrString
Port intstr.IntOrString `json:"port"`
// Weight defines the weight used when balancing requests between multiple Kubernetes Service.
// +kubebuilder:validation:Minimum=0
Weight *int `json:"weight,omitempty"`
// TerminationDelay defines the deadline that the proxy sets, after one of its connected peers indicates
// it has closed the writing capability of its connection, to close the reading capability as well,