Improve CEL validation on Ingress CRD resources
This commit is contained in:
parent
740b4cfd25
commit
c166a41c99
21 changed files with 282 additions and 0 deletions
|
@ -52,6 +52,9 @@ spec:
|
|||
Prefix is the string to add before the current path in the requested URL.
|
||||
It should include a leading slash (/).
|
||||
type: string
|
||||
x-kubernetes-validations:
|
||||
- message: must start with a '/'
|
||||
rule: self.startsWith('/')
|
||||
type: object
|
||||
basicAuth:
|
||||
description: |-
|
||||
|
@ -152,6 +155,7 @@ spec:
|
|||
- type: string
|
||||
description: CheckPeriod is the interval between successive checks
|
||||
of the circuit breaker condition (when in standby state).
|
||||
pattern: ^([0-9]+(ns|us|µs|ms|s|m|h)?)+$
|
||||
x-kubernetes-int-or-string: true
|
||||
expression:
|
||||
description: Expression is the condition that triggers the tripped
|
||||
|
@ -171,10 +175,13 @@ spec:
|
|||
description: RecoveryDuration is the duration for which the circuit
|
||||
breaker will try to recover (as soon as it is in recovering
|
||||
state).
|
||||
pattern: ^([0-9]+(ns|us|µs|ms|s|m|h)?)+$
|
||||
x-kubernetes-int-or-string: true
|
||||
responseCode:
|
||||
description: ResponseCode is the status code that the circuit
|
||||
breaker will return while it is in the open state.
|
||||
maximum: 599
|
||||
minimum: 100
|
||||
type: integer
|
||||
type: object
|
||||
compress:
|
||||
|
@ -212,6 +219,7 @@ spec:
|
|||
description: |-
|
||||
MinResponseBodyBytes defines the minimum amount of bytes a response body must have to be compressed.
|
||||
Default: 1024.
|
||||
minimum: 0
|
||||
type: integer
|
||||
type: object
|
||||
contentType:
|
||||
|
@ -433,6 +441,10 @@ spec:
|
|||
description: |-
|
||||
SameSite defines the same site policy.
|
||||
More info: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite
|
||||
enum:
|
||||
- none
|
||||
- lax
|
||||
- strict
|
||||
type: string
|
||||
secure:
|
||||
description: Secure defines whether the cookie can
|
||||
|
@ -445,11 +457,14 @@ spec:
|
|||
description: |-
|
||||
Strategy defines the load balancing strategy between the servers.
|
||||
RoundRobin is the only supported value at the moment.
|
||||
enum:
|
||||
- RoundRobin
|
||||
type: string
|
||||
weight:
|
||||
description: |-
|
||||
Weight defines the weight and should only be specified when Name references a TraefikService object
|
||||
(and to be precise, one that embeds a Weighted Round Robin).
|
||||
minimum: 0
|
||||
type: integer
|
||||
required:
|
||||
- name
|
||||
|
@ -462,6 +477,7 @@ spec:
|
|||
as ranges by separating two codes with a dash (500-599),
|
||||
or a combination of the two (404,418,500-599).
|
||||
items:
|
||||
pattern: ^([0-5][0-9]{2}[,-]?)+$
|
||||
type: string
|
||||
type: array
|
||||
statusRewrites:
|
||||
|
@ -740,6 +756,7 @@ spec:
|
|||
STSSeconds defines the max-age of the Strict-Transport-Security header.
|
||||
If set to 0, the header is not set.
|
||||
format: int64
|
||||
minimum: 0
|
||||
type: integer
|
||||
type: object
|
||||
inFlightReq:
|
||||
|
@ -753,6 +770,7 @@ spec:
|
|||
Amount defines the maximum amount of allowed simultaneous in-flight request.
|
||||
The middleware responds with HTTP 429 Too Many Requests if there are already amount requests in progress (based on the same sourceCriterion strategy).
|
||||
format: int64
|
||||
minimum: 0
|
||||
type: integer
|
||||
sourceCriterion:
|
||||
description: |-
|
||||
|
@ -770,6 +788,7 @@ spec:
|
|||
description: Depth tells Traefik to use the X-Forwarded-For
|
||||
header and take the IP located at the depth position
|
||||
(starting from the right).
|
||||
minimum: 0
|
||||
type: integer
|
||||
excludedIPs:
|
||||
description: ExcludedIPs configures Traefik to scan the
|
||||
|
@ -810,6 +829,7 @@ spec:
|
|||
description: Depth tells Traefik to use the X-Forwarded-For
|
||||
header and take the IP located at the depth position (starting
|
||||
from the right).
|
||||
minimum: 0
|
||||
type: integer
|
||||
excludedIPs:
|
||||
description: ExcludedIPs configures Traefik to scan the X-Forwarded-For
|
||||
|
@ -847,6 +867,7 @@ spec:
|
|||
description: Depth tells Traefik to use the X-Forwarded-For
|
||||
header and take the IP located at the depth position (starting
|
||||
from the right).
|
||||
minimum: 0
|
||||
type: integer
|
||||
excludedIPs:
|
||||
description: ExcludedIPs configures Traefik to scan the X-Forwarded-For
|
||||
|
@ -989,12 +1010,14 @@ spec:
|
|||
The rate is actually defined by dividing Average by Period. So for a rate below 1req/s,
|
||||
one needs to define a Period larger than a second.
|
||||
format: int64
|
||||
minimum: 0
|
||||
type: integer
|
||||
burst:
|
||||
description: |-
|
||||
Burst is the maximum number of requests allowed to arrive in the same arbitrarily small period of time.
|
||||
It defaults to 1.
|
||||
format: int64
|
||||
minimum: 0
|
||||
type: integer
|
||||
period:
|
||||
anyOf:
|
||||
|
@ -1019,6 +1042,7 @@ spec:
|
|||
description: Depth tells Traefik to use the X-Forwarded-For
|
||||
header and take the IP located at the depth position
|
||||
(starting from the right).
|
||||
minimum: 0
|
||||
type: integer
|
||||
excludedIPs:
|
||||
description: ExcludedIPs configures Traefik to scan the
|
||||
|
@ -1116,6 +1140,7 @@ spec:
|
|||
attempts:
|
||||
description: Attempts defines how many times the request should
|
||||
be retried.
|
||||
minimum: 0
|
||||
type: integer
|
||||
initialInterval:
|
||||
anyOf:
|
||||
|
@ -1127,6 +1152,7 @@ spec:
|
|||
If unspecified, requests will be retried immediately.
|
||||
The value of initialInterval should be provided in seconds or as a valid duration format,
|
||||
see https://pkg.go.dev/time#ParseDuration.
|
||||
pattern: ^([0-9]+(ns|us|µs|ms|s|m|h)?)+$
|
||||
x-kubernetes-int-or-string: true
|
||||
type: object
|
||||
stripPrefix:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue