diff --git a/third_party/gateway-api-latest/gateway-api.yaml b/third_party/gateway-api-latest/gateway-api.yaml
index 67cdb90928ad..a354ae3b4bc0 100644
--- a/third_party/gateway-api-latest/gateway-api.yaml
+++ b/third_party/gateway-api-latest/gateway-api.yaml
@@ -22,10 +22,12 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
- api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/2997
- gateway.networking.k8s.io/bundle-version: v1.1.0
+ api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/3328
+ gateway.networking.k8s.io/bundle-version: v1.2.1
gateway.networking.k8s.io/channel: experimental
creationTimestamp: null
+ labels:
+ gateway.networking.k8s.io/policy: Direct
name: backendlbpolicies.gateway.networking.k8s.io
spec:
group: gateway.networking.k8s.io
@@ -76,7 +78,6 @@ spec:
SessionPersistence defines and configures session persistence
for the backend.
-
Support: Extended
properties:
absoluteTimeout:
@@ -85,7 +86,6 @@ spec:
session. Once the AbsoluteTimeout duration has elapsed, the
session becomes invalid.
-
Support: Extended
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
@@ -94,7 +94,6 @@ spec:
CookieConfig provides configuration settings that are specific
to cookie-based session persistence.
-
Support: Core
properties:
lifetimeType:
@@ -106,20 +105,16 @@ spec:
attributes, while a session cookie is deleted when the current
session ends.
-
When set to "Permanent", AbsoluteTimeout indicates the
cookie's lifetime via the Expires or Max-Age cookie attributes
and is required.
-
When set to "Session", AbsoluteTimeout indicates the
absolute lifetime of the cookie tracked by the gateway and
is optional.
-
Support: Core for "Session" type
-
Support: Extended for "Permanent" type
enum:
- Permanent
@@ -132,7 +127,6 @@ spec:
Once the session has been idle for more than the specified
IdleTimeout duration, the session becomes invalid.
-
Support: Extended
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
@@ -143,7 +137,6 @@ spec:
should avoid reusing session names to prevent unintended
consequences, such as rejection or unpredictable behavior.
-
Support: Implementation-specific
maxLength: 128
type: string
@@ -154,10 +147,8 @@ spec:
the use a header or cookie. Defaults to cookie based session
persistence.
-
Support: Core for "Cookie" type
-
Support: Extended for "Header" type
enum:
- Cookie
@@ -166,7 +157,7 @@ spec:
type: object
x-kubernetes-validations:
- message: AbsoluteTimeout must be specified when cookie lifetimeType is Permanent
- rule: '!has(self.cookieConfig.lifetimeType) || self.cookieConfig.lifetimeType != ''Permanent'' || has(self.absoluteTimeout)'
+ rule: '!has(self.cookieConfig) || !has(self.cookieConfig.lifetimeType) || self.cookieConfig.lifetimeType != ''Permanent'' || has(self.absoluteTimeout)'
targetRefs:
description: |-
TargetRef identifies an API object to apply policy to.
@@ -225,27 +216,22 @@ spec:
the controller first sees the policy and SHOULD update the entry as
appropriate when the relevant ancestor is modified.
-
Note that choosing the relevant ancestor is left to the Policy designers;
an important part of Policy design is designing the right object level at
which to namespace this status.
-
Note also that implementations MUST ONLY populate ancestor status for
the Ancestor resources they are responsible for. Implementations MUST
use the ControllerName field to uniquely identify the entries in this list
that they are responsible for.
-
Note that to achieve this, the list of PolicyAncestorStatus structs
MUST be treated as a map with a composite key, made up of the AncestorRef
and ControllerName fields combined.
-
A maximum of 16 ancestors will be represented in this list. An empty list
means the Policy is not relevant for any ancestors.
-
If this slice is full, implementations MUST NOT add further entries.
Instead they MUST consider the policy unimplementable and signal that
on any related resources such as the ancestor that would be referenced
@@ -257,7 +243,6 @@ spec:
PolicyAncestorStatus describes the status of a route with respect to an
associated Ancestor.
-
Ancestors refer to objects that are either the Target of a policy or above it
in terms of object hierarchy. For example, if a policy targets a Service, the
Policy's Ancestors are, in order, the Service, the HTTPRoute, the Gateway, and
@@ -266,28 +251,23 @@ spec:
SHOULD use Gateway as the PolicyAncestorStatus object unless the designers
have a _very_ good reason otherwise.
-
In the context of policy attachment, the Ancestor is used to distinguish which
resource results in a distinct application of this policy. For example, if a policy
targets a Service, it may have a distinct result per attached Gateway.
-
Policies targeting the same resource may have different effects depending on the
ancestors of those resources. For example, different Gateways targeting the same
Service may have different capabilities, especially if they have different underlying
implementations.
-
For example, in BackendTLSPolicy, the Policy attaches to a Service that is
used as a backend in a HTTPRoute that is itself attached to a Gateway.
In this case, the relevant object for status is the Gateway, and that is the
ancestor object referred to in this status.
-
Note that a parent is also an ancestor, so for objects where the parent is the
relevant object for status, this struct SHOULD still be used.
-
This struct is intended to be used in a slice that's effectively a map,
with a composite key made up of the AncestorRef and the ControllerName.
properties:
@@ -304,7 +284,6 @@ spec:
To set the core API group (such as for a "Service" kind referent),
Group must be explicitly set to "" (empty string).
-
Support: Core
maxLength: 253
pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
@@ -314,14 +293,11 @@ spec:
description: |-
Kind is kind of the referent.
-
There are two kinds of parent resources with "Core" support:
-
* Gateway (Gateway conformance profile)
* Service (Mesh conformance profile, ClusterIP Services only)
-
Support for other resources is Implementation-Specific.
maxLength: 63
minLength: 1
@@ -331,7 +307,6 @@ spec:
description: |-
Name is the name of the referent.
-
Support: Core
maxLength: 253
minLength: 1
@@ -341,7 +316,6 @@ spec:
Namespace is the namespace of the referent. When unspecified, this refers
to the local namespace of the Route.
-
Note that there are specific rules for ParentRefs which cross namespace
boundaries. Cross-namespace references are only valid if they are explicitly
allowed by something in the namespace they are referring to. For example:
@@ -349,12 +323,10 @@ spec:
generic way to enable any other kind of cross-namespace reference.
-
ParentRefs from a Route to a Service in the same namespace are "producer"
routes, which apply default routing rules to inbound connections from
any namespace to the Service.
-
ParentRefs from a Route to a Service in a different namespace are
"consumer" routes, and these routing rules are only applied to outbound
connections originating from the same namespace as the Route, for which
@@ -362,7 +334,6 @@ spec:
ParentRef of the Route.
-
Support: Core
maxLength: 63
minLength: 1
@@ -373,7 +344,6 @@ spec:
Port is the network port this Route targets. It can be interpreted
differently based on the type of parent resource.
-
When the parent resource is a Gateway, this targets all listeners
listening on the specified port that also support this kind of Route(and
select this Route). It's not recommended to set `Port` unless the
@@ -383,18 +353,15 @@ spec:
must match both specified values.
-
When the parent resource is a Service, this targets a specific port in the
Service spec. When both Port (experimental) and SectionName are specified,
the name and port of the selected port must match both specified values.
-
Implementations MAY choose to support other parent resources.
Implementations supporting other types of parent resources MUST clearly
document how/if Port is interpreted.
-
For the purpose of status, an attachment is considered successful as
long as the parent resource accepts it partially. For example, Gateway
listeners can restrict which Routes can attach to them by Route kind,
@@ -403,7 +370,6 @@ spec:
attached. If no Gateway listeners accept attachment from this Route,
the Route MUST be considered detached from the Gateway.
-
Support: Extended
format: int32
maximum: 65535
@@ -414,7 +380,6 @@ spec:
SectionName is the name of a section within the target resource. In the
following resources, SectionName is interpreted as the following:
-
* Gateway: Listener name. When both Port (experimental) and SectionName
are specified, the name and port of the selected listener must match
both specified values.
@@ -422,12 +387,10 @@ spec:
are specified, the name and port of the selected listener must match
both specified values.
-
Implementations MAY choose to support attaching Routes to other resources.
If that is the case, they MUST clearly document how SectionName is
interpreted.
-
When unspecified (empty string), this will reference the entire resource.
For the purpose of status, an attachment is considered successful if at
least one section in the parent resource accepts it. For example, Gateway
@@ -437,7 +400,6 @@ spec:
attached. If no Gateway listeners accept attachment from this Route, the
Route MUST be considered detached from the Gateway.
-
Support: Core
maxLength: 253
minLength: 1
@@ -449,7 +411,7 @@ spec:
conditions:
description: Conditions describes the status of the Policy with respect to the given Ancestor.
items:
- description: "Condition contains details for one aspect of the current state of this API Resource.\n---\nThis struct is intended for direct use as an array at the field path .status.conditions. For example,\n\n\n\ttype FooStatus struct{\n\t // Represents the observations of a foo's current state.\n\t // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\"\n\t // +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t // other fields\n\t}"
+ description: Condition contains details for one aspect of the current state of this API Resource.
properties:
lastTransitionTime:
description: |-
@@ -490,12 +452,7 @@ spec:
- Unknown
type: string
type:
- description: |-
- type of condition in CamelCase or in foo.example.com/CamelCase.
- ---
- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
- useful (see .node.status.conditions), the ability to deconflict is important.
- The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
+ description: type of condition in CamelCase or in foo.example.com/CamelCase.
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
@@ -518,15 +475,12 @@ spec:
controller that wrote this status. This corresponds with the
controllerName field on GatewayClass.
-
Example: "example.net/gateway-controller".
-
The format of this field is DOMAIN "/" PATH, where DOMAIN and PATH are
valid Kubernetes names
(https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
-
Controllers MUST populate this field when writing status. Controllers should ensure that
entries to status populated with their ControllerName are cleaned up when they are no
longer necessary.
@@ -564,8 +518,8 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
- api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/2997
- gateway.networking.k8s.io/bundle-version: v1.1.0
+ api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/3328
+ gateway.networking.k8s.io/bundle-version: v1.2.1
gateway.networking.k8s.io/channel: experimental
creationTimestamp: null
labels:
@@ -615,6 +569,29 @@ spec:
spec:
description: Spec defines the desired state of BackendTLSPolicy.
properties:
+ options:
+ additionalProperties:
+ description: |-
+ AnnotationValue is the value of an annotation in Gateway API. This is used
+ for validation of maps such as TLS options. This roughly matches Kubernetes
+ annotation validation, although the length validation in that case is based
+ on the entire size of the annotations struct.
+ maxLength: 4096
+ minLength: 0
+ type: string
+ description: |-
+ Options are a list of key/value pairs to enable extended TLS
+ configuration for each implementation. For example, configuring the
+ minimum TLS version or supported cipher suites.
+
+ A set of common keys MAY be defined by the API in the future. To avoid
+ any ambiguity, implementation-specific definitions MUST use
+ domain-prefixed names, such as `example.com/my-custom-option`.
+ Un-prefixed names are reserved for key names defined by Gateway API.
+
+ Support: Implementation-specific
+ maxProperties: 16
+ type: object
targetRefs:
description: |-
TargetRefs identifies an API object to apply the policy to.
@@ -624,10 +601,8 @@ spec:
by default, but this default may change in the future to provide
a more granular application of the policy.
-
Support: Extended for Kubernetes Service
-
Support: Implementation-specific for any other resource
items:
description: |-
@@ -637,7 +612,6 @@ spec:
mode works, and a sample Policy resource, refer to the policy attachment
documentation for Gateway API.
-
Note: This should only be used for direct policy attachment when references
to SectionName are actually needed. In all other cases,
LocalPolicyTargetReference should be used.
@@ -664,12 +638,10 @@ spec:
unspecified, this targetRef targets the entire resource. In the following
resources, SectionName is interpreted as the following:
-
* Gateway: Listener name
* HTTPRoute: HTTPRouteRule name
* Service: Port name
-
If a SectionName is specified, but does not exist on the targeted object,
the Policy must fail to attach, and the policy implementation should record
a `ResolvedRefs` or similar Condition in the Policy's status.
@@ -694,26 +666,21 @@ spec:
contain a PEM-encoded TLS CA certificate bundle, which is used to
validate a TLS handshake between the Gateway and backend Pod.
-
If CACertificateRefs is empty or unspecified, then WellKnownCACertificates must be
specified. Only one of CACertificateRefs or WellKnownCACertificates may be specified,
not both. If CACertifcateRefs is empty or unspecified, the configuration for
WellKnownCACertificates MUST be honored instead if supported by the implementation.
-
References to a resource in a different namespace are invalid for the
moment, although we will revisit this in the future.
-
A single CACertificateRef to a Kubernetes ConfigMap kind has "Core" support.
Implementations MAY choose to support attaching multiple certificates to
a backend, but this behavior is implementation-specific.
-
Support: Core - An optional single reference to a Kubernetes ConfigMap,
with the CA certificate in a key named `ca.crt`.
-
Support: Implementation-specific (More than one reference, or other kinds
of resources).
items:
@@ -723,7 +690,6 @@ spec:
The API object must be valid in the cluster; the Group and Kind must
be registered in the cluster for this reference to be valid.
-
References to objects with invalid Group and Kind are not valid, and must
be rejected by the implementation, with appropriate Conditions set
on the containing object.
@@ -758,23 +724,76 @@ spec:
Hostname is used for two purposes in the connection between Gateways and
backends:
-
1. Hostname MUST be used as the SNI to connect to the backend (RFC 6066).
- 2. Hostname MUST be used for authentication and MUST match the certificate
- served by the matching backend.
-
+ 2. If SubjectAltNames is not specified, Hostname MUST be used for
+ authentication and MUST match the certificate served by the matching
+ backend.
Support: Core
maxLength: 253
minLength: 1
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
type: string
+ subjectAltNames:
+ description: |-
+ SubjectAltNames contains one or more Subject Alternative Names.
+ When specified, the certificate served from the backend MUST have at least one
+ Subject Alternate Name matching one of the specified SubjectAltNames.
+
+ Support: Core
+ items:
+ description: SubjectAltName represents Subject Alternative Name.
+ properties:
+ hostname:
+ description: |-
+ Hostname contains Subject Alternative Name specified in DNS name format.
+ Required when Type is set to Hostname, ignored otherwise.
+
+ Support: Core
+ maxLength: 253
+ minLength: 1
+ pattern: ^(\*\.)?[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
+ type: string
+ type:
+ description: |-
+ Type determines the format of the Subject Alternative Name. Always required.
+
+ Support: Core
+ enum:
+ - Hostname
+ - URI
+ type: string
+ uri:
+ description: |-
+ URI contains Subject Alternative Name specified in a full URI format.
+ It MUST include both a scheme (e.g., "http" or "ftp") and a scheme-specific-part.
+ Common values include SPIFFE IDs like "spiffe://mycluster.example.com/ns/myns/sa/svc1sa".
+ Required when Type is set to URI, ignored otherwise.
+
+ Support: Core
+ maxLength: 253
+ minLength: 1
+ pattern: ^(([^:/?#]+):)(//([^/?#]*))([^?#]*)(\?([^#]*))?(#(.*))?
+ type: string
+ required:
+ - type
+ type: object
+ x-kubernetes-validations:
+ - message: SubjectAltName element must contain Hostname, if Type is set to Hostname
+ rule: '!(self.type == "Hostname" && (!has(self.hostname) || self.hostname == ""))'
+ - message: SubjectAltName element must not contain Hostname, if Type is not set to Hostname
+ rule: '!(self.type != "Hostname" && has(self.hostname) && self.hostname != "")'
+ - message: SubjectAltName element must contain URI, if Type is set to URI
+ rule: '!(self.type == "URI" && (!has(self.uri) || self.uri == ""))'
+ - message: SubjectAltName element must not contain URI, if Type is not set to URI
+ rule: '!(self.type != "URI" && has(self.uri) && self.uri != "")'
+ maxItems: 5
+ type: array
wellKnownCACertificates:
description: |-
WellKnownCACertificates specifies whether system CA certificates may be used in
the TLS handshake between the gateway and backend pod.
-
If WellKnownCACertificates is unspecified or empty (""), then CACertificateRefs
must be specified with at least one entry for a valid configuration. Only one of
CACertificateRefs or WellKnownCACertificates may be specified, not both. If an
@@ -782,7 +801,6 @@ spec:
supplied is not supported, the Status Conditions on the Policy MUST be
updated to include an Accepted: False Condition with Reason: Invalid.
-
Support: Implementation-specific
enum:
- System
@@ -811,27 +829,22 @@ spec:
the controller first sees the policy and SHOULD update the entry as
appropriate when the relevant ancestor is modified.
-
Note that choosing the relevant ancestor is left to the Policy designers;
an important part of Policy design is designing the right object level at
which to namespace this status.
-
Note also that implementations MUST ONLY populate ancestor status for
the Ancestor resources they are responsible for. Implementations MUST
use the ControllerName field to uniquely identify the entries in this list
that they are responsible for.
-
Note that to achieve this, the list of PolicyAncestorStatus structs
MUST be treated as a map with a composite key, made up of the AncestorRef
and ControllerName fields combined.
-
A maximum of 16 ancestors will be represented in this list. An empty list
means the Policy is not relevant for any ancestors.
-
If this slice is full, implementations MUST NOT add further entries.
Instead they MUST consider the policy unimplementable and signal that
on any related resources such as the ancestor that would be referenced
@@ -843,7 +856,6 @@ spec:
PolicyAncestorStatus describes the status of a route with respect to an
associated Ancestor.
-
Ancestors refer to objects that are either the Target of a policy or above it
in terms of object hierarchy. For example, if a policy targets a Service, the
Policy's Ancestors are, in order, the Service, the HTTPRoute, the Gateway, and
@@ -852,28 +864,23 @@ spec:
SHOULD use Gateway as the PolicyAncestorStatus object unless the designers
have a _very_ good reason otherwise.
-
In the context of policy attachment, the Ancestor is used to distinguish which
resource results in a distinct application of this policy. For example, if a policy
targets a Service, it may have a distinct result per attached Gateway.
-
Policies targeting the same resource may have different effects depending on the
ancestors of those resources. For example, different Gateways targeting the same
Service may have different capabilities, especially if they have different underlying
implementations.
-
For example, in BackendTLSPolicy, the Policy attaches to a Service that is
used as a backend in a HTTPRoute that is itself attached to a Gateway.
In this case, the relevant object for status is the Gateway, and that is the
ancestor object referred to in this status.
-
Note that a parent is also an ancestor, so for objects where the parent is the
relevant object for status, this struct SHOULD still be used.
-
This struct is intended to be used in a slice that's effectively a map,
with a composite key made up of the AncestorRef and the ControllerName.
properties:
@@ -890,7 +897,6 @@ spec:
To set the core API group (such as for a "Service" kind referent),
Group must be explicitly set to "" (empty string).
-
Support: Core
maxLength: 253
pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
@@ -900,14 +906,11 @@ spec:
description: |-
Kind is kind of the referent.
-
There are two kinds of parent resources with "Core" support:
-
* Gateway (Gateway conformance profile)
* Service (Mesh conformance profile, ClusterIP Services only)
-
Support for other resources is Implementation-Specific.
maxLength: 63
minLength: 1
@@ -917,7 +920,6 @@ spec:
description: |-
Name is the name of the referent.
-
Support: Core
maxLength: 253
minLength: 1
@@ -927,7 +929,6 @@ spec:
Namespace is the namespace of the referent. When unspecified, this refers
to the local namespace of the Route.
-
Note that there are specific rules for ParentRefs which cross namespace
boundaries. Cross-namespace references are only valid if they are explicitly
allowed by something in the namespace they are referring to. For example:
@@ -935,12 +936,10 @@ spec:
generic way to enable any other kind of cross-namespace reference.
-
ParentRefs from a Route to a Service in the same namespace are "producer"
routes, which apply default routing rules to inbound connections from
any namespace to the Service.
-
ParentRefs from a Route to a Service in a different namespace are
"consumer" routes, and these routing rules are only applied to outbound
connections originating from the same namespace as the Route, for which
@@ -948,7 +947,6 @@ spec:
ParentRef of the Route.
-
Support: Core
maxLength: 63
minLength: 1
@@ -959,7 +957,6 @@ spec:
Port is the network port this Route targets. It can be interpreted
differently based on the type of parent resource.
-
When the parent resource is a Gateway, this targets all listeners
listening on the specified port that also support this kind of Route(and
select this Route). It's not recommended to set `Port` unless the
@@ -969,18 +966,15 @@ spec:
must match both specified values.
-
When the parent resource is a Service, this targets a specific port in the
Service spec. When both Port (experimental) and SectionName are specified,
the name and port of the selected port must match both specified values.
-
Implementations MAY choose to support other parent resources.
Implementations supporting other types of parent resources MUST clearly
document how/if Port is interpreted.
-
For the purpose of status, an attachment is considered successful as
long as the parent resource accepts it partially. For example, Gateway
listeners can restrict which Routes can attach to them by Route kind,
@@ -989,7 +983,6 @@ spec:
attached. If no Gateway listeners accept attachment from this Route,
the Route MUST be considered detached from the Gateway.
-
Support: Extended
format: int32
maximum: 65535
@@ -1000,7 +993,6 @@ spec:
SectionName is the name of a section within the target resource. In the
following resources, SectionName is interpreted as the following:
-
* Gateway: Listener name. When both Port (experimental) and SectionName
are specified, the name and port of the selected listener must match
both specified values.
@@ -1008,12 +1000,10 @@ spec:
are specified, the name and port of the selected listener must match
both specified values.
-
Implementations MAY choose to support attaching Routes to other resources.
If that is the case, they MUST clearly document how SectionName is
interpreted.
-
When unspecified (empty string), this will reference the entire resource.
For the purpose of status, an attachment is considered successful if at
least one section in the parent resource accepts it. For example, Gateway
@@ -1023,7 +1013,6 @@ spec:
attached. If no Gateway listeners accept attachment from this Route, the
Route MUST be considered detached from the Gateway.
-
Support: Core
maxLength: 253
minLength: 1
@@ -1035,7 +1024,7 @@ spec:
conditions:
description: Conditions describes the status of the Policy with respect to the given Ancestor.
items:
- description: "Condition contains details for one aspect of the current state of this API Resource.\n---\nThis struct is intended for direct use as an array at the field path .status.conditions. For example,\n\n\n\ttype FooStatus struct{\n\t // Represents the observations of a foo's current state.\n\t // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\"\n\t // +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t // other fields\n\t}"
+ description: Condition contains details for one aspect of the current state of this API Resource.
properties:
lastTransitionTime:
description: |-
@@ -1076,12 +1065,7 @@ spec:
- Unknown
type: string
type:
- description: |-
- type of condition in CamelCase or in foo.example.com/CamelCase.
- ---
- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
- useful (see .node.status.conditions), the ability to deconflict is important.
- The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
+ description: type of condition in CamelCase or in foo.example.com/CamelCase.
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
@@ -1104,15 +1088,12 @@ spec:
controller that wrote this status. This corresponds with the
controllerName field on GatewayClass.
-
Example: "example.net/gateway-controller".
-
The format of this field is DOMAIN "/" PATH, where DOMAIN and PATH are
valid Kubernetes names
(https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
-
Controllers MUST populate this field when writing status. Controllers should ensure that
entries to status populated with their ControllerName are cleaned up when they are no
longer necessary.
@@ -1150,8 +1131,8 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
- api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/2997
- gateway.networking.k8s.io/bundle-version: v1.1.0
+ api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/3328
+ gateway.networking.k8s.io/bundle-version: v1.2.1
gateway.networking.k8s.io/channel: experimental
creationTimestamp: null
name: gatewayclasses.gateway.networking.k8s.io
@@ -1189,7 +1170,6 @@ spec:
GatewayClass describes a class of Gateways available to the user for creating
Gateway resources.
-
It is recommended that this resource be used as a template for Gateways. This
means that a Gateway is based on the state of the GatewayClass at the time it
was created and changes to the GatewayClass or associated parameters are not
@@ -1198,13 +1178,11 @@ spec:
If implementations choose to propagate GatewayClass changes to existing
Gateways, that MUST be clearly documented by the implementation.
-
Whenever one or more Gateways are using a GatewayClass, implementations SHOULD
add the `gateway-exists-finalizer.gateway.networking.k8s.io` finalizer on the
associated GatewayClass. This ensures that a GatewayClass associated with a
Gateway is not deleted while in use.
-
GatewayClass is a Cluster level resource.
properties:
apiVersion:
@@ -1232,13 +1210,10 @@ spec:
ControllerName is the name of the controller that is managing Gateways of
this class. The value of this field MUST be a domain prefixed path.
-
Example: "example.net/gateway-controller".
-
This field is not mutable and cannot be empty.
-
Support: Core
maxLength: 253
minLength: 1
@@ -1257,21 +1232,19 @@ spec:
parameters corresponding to the GatewayClass. This is optional if the
controller does not require any additional configuration.
-
ParametersRef can reference a standard Kubernetes resource, i.e. ConfigMap,
or an implementation-specific custom resource. The resource can be
cluster-scoped or namespace-scoped.
-
- If the referent cannot be found, the GatewayClass's "InvalidParameters"
- status condition will be true.
-
+ If the referent cannot be found, refers to an unsupported kind, or when
+ the data within that resource is malformed, the GatewayClass SHOULD be
+ rejected with the "Accepted" status condition set to "False" and an
+ "InvalidParameters" reason.
A Gateway for this GatewayClass may provide its own `parametersRef`. When both are specified,
the merging behavior is implementation specific.
It is generally recommended that GatewayClass provides defaults that can be overridden by a Gateway.
-
Support: Implementation-specific
properties:
group:
@@ -1312,13 +1285,12 @@ spec:
conditions:
- lastTransitionTime: "1970-01-01T00:00:00Z"
message: Waiting for controller
- reason: Waiting
+ reason: Pending
status: Unknown
type: Accepted
description: |-
Status defines the current state of GatewayClass.
-
Implementations MUST populate status on all GatewayClass resources which
specify their controller name.
properties:
@@ -1333,11 +1305,10 @@ spec:
Conditions is the current status from the controller for
this GatewayClass.
-
Controllers should prefer to publish conditions using values
of GatewayClassConditionType for the type of each Condition.
items:
- description: "Condition contains details for one aspect of the current state of this API Resource.\n---\nThis struct is intended for direct use as an array at the field path .status.conditions. For example,\n\n\n\ttype FooStatus struct{\n\t // Represents the observations of a foo's current state.\n\t // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\"\n\t // +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t // other fields\n\t}"
+ description: Condition contains details for one aspect of the current state of this API Resource.
properties:
lastTransitionTime:
description: |-
@@ -1378,12 +1349,7 @@ spec:
- Unknown
type: string
type:
- description: |-
- type of condition in CamelCase or in foo.example.com/CamelCase.
- ---
- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
- useful (see .node.status.conditions), the ability to deconflict is important.
- The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
+ description: type of condition in CamelCase or in foo.example.com/CamelCase.
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
@@ -1402,15 +1368,22 @@ spec:
supportedFeatures:
description: |
SupportedFeatures is the set of features the GatewayClass support.
- It MUST be sorted in ascending alphabetical order.
+ It MUST be sorted in ascending alphabetical order by the Name key.
items:
- description: |-
- SupportedFeature is used to describe distinct features that are covered by
- conformance tests.
- type: string
+ properties:
+ name:
+ description: |-
+ FeatureName is used to describe distinct features that are covered by
+ conformance tests.
+ type: string
+ required:
+ - name
+ type: object
maxItems: 64
type: array
- x-kubernetes-list-type: set
+ x-kubernetes-list-map-keys:
+ - name
+ x-kubernetes-list-type: map
type: object
required:
- spec
@@ -1440,7 +1413,6 @@ spec:
GatewayClass describes a class of Gateways available to the user for creating
Gateway resources.
-
It is recommended that this resource be used as a template for Gateways. This
means that a Gateway is based on the state of the GatewayClass at the time it
was created and changes to the GatewayClass or associated parameters are not
@@ -1449,13 +1421,11 @@ spec:
If implementations choose to propagate GatewayClass changes to existing
Gateways, that MUST be clearly documented by the implementation.
-
Whenever one or more Gateways are using a GatewayClass, implementations SHOULD
add the `gateway-exists-finalizer.gateway.networking.k8s.io` finalizer on the
associated GatewayClass. This ensures that a GatewayClass associated with a
Gateway is not deleted while in use.
-
GatewayClass is a Cluster level resource.
properties:
apiVersion:
@@ -1483,13 +1453,10 @@ spec:
ControllerName is the name of the controller that is managing Gateways of
this class. The value of this field MUST be a domain prefixed path.
-
Example: "example.net/gateway-controller".
-
This field is not mutable and cannot be empty.
-
Support: Core
maxLength: 253
minLength: 1
@@ -1508,21 +1475,19 @@ spec:
parameters corresponding to the GatewayClass. This is optional if the
controller does not require any additional configuration.
-
ParametersRef can reference a standard Kubernetes resource, i.e. ConfigMap,
or an implementation-specific custom resource. The resource can be
cluster-scoped or namespace-scoped.
-
- If the referent cannot be found, the GatewayClass's "InvalidParameters"
- status condition will be true.
-
+ If the referent cannot be found, refers to an unsupported kind, or when
+ the data within that resource is malformed, the GatewayClass SHOULD be
+ rejected with the "Accepted" status condition set to "False" and an
+ "InvalidParameters" reason.
A Gateway for this GatewayClass may provide its own `parametersRef`. When both are specified,
the merging behavior is implementation specific.
It is generally recommended that GatewayClass provides defaults that can be overridden by a Gateway.
-
Support: Implementation-specific
properties:
group:
@@ -1563,13 +1528,12 @@ spec:
conditions:
- lastTransitionTime: "1970-01-01T00:00:00Z"
message: Waiting for controller
- reason: Waiting
+ reason: Pending
status: Unknown
type: Accepted
description: |-
Status defines the current state of GatewayClass.
-
Implementations MUST populate status on all GatewayClass resources which
specify their controller name.
properties:
@@ -1584,11 +1548,10 @@ spec:
Conditions is the current status from the controller for
this GatewayClass.
-
Controllers should prefer to publish conditions using values
of GatewayClassConditionType for the type of each Condition.
items:
- description: "Condition contains details for one aspect of the current state of this API Resource.\n---\nThis struct is intended for direct use as an array at the field path .status.conditions. For example,\n\n\n\ttype FooStatus struct{\n\t // Represents the observations of a foo's current state.\n\t // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\"\n\t // +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t // other fields\n\t}"
+ description: Condition contains details for one aspect of the current state of this API Resource.
properties:
lastTransitionTime:
description: |-
@@ -1629,12 +1592,7 @@ spec:
- Unknown
type: string
type:
- description: |-
- type of condition in CamelCase or in foo.example.com/CamelCase.
- ---
- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
- useful (see .node.status.conditions), the ability to deconflict is important.
- The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
+ description: type of condition in CamelCase or in foo.example.com/CamelCase.
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
@@ -1653,15 +1611,22 @@ spec:
supportedFeatures:
description: |
SupportedFeatures is the set of features the GatewayClass support.
- It MUST be sorted in ascending alphabetical order.
+ It MUST be sorted in ascending alphabetical order by the Name key.
items:
- description: |-
- SupportedFeature is used to describe distinct features that are covered by
- conformance tests.
- type: string
+ properties:
+ name:
+ description: |-
+ FeatureName is used to describe distinct features that are covered by
+ conformance tests.
+ type: string
+ required:
+ - name
+ type: object
maxItems: 64
type: array
- x-kubernetes-list-type: set
+ x-kubernetes-list-map-keys:
+ - name
+ x-kubernetes-list-type: map
type: object
required:
- spec
@@ -1684,8 +1649,8 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
- api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/2997
- gateway.networking.k8s.io/bundle-version: v1.1.0
+ api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/3328
+ gateway.networking.k8s.io/bundle-version: v1.2.1
gateway.networking.k8s.io/channel: experimental
creationTimestamp: null
name: gateways.gateway.networking.k8s.io
@@ -1749,27 +1714,22 @@ spec:
requested address is invalid or unavailable, the implementation MUST
indicate this in the associated entry in GatewayStatus.Addresses.
-
The Addresses field represents a request for the address(es) on the
"outside of the Gateway", that traffic bound for this Gateway will use.
This could be the IP address or hostname of an external load balancer or
other networking infrastructure, or some other address that traffic will
be sent to.
-
If no Addresses are specified, the implementation MAY schedule the
Gateway in an implementation-specific manner, assigning an appropriate
set of Addresses.
-
The implementation MUST bind all Listeners to every GatewayAddress that
it assigns to the Gateway and add a corresponding entry in
GatewayStatus.Addresses.
-
Support: Extended
-
items:
description: GatewayAddress describes an address that can be bound to a Gateway.
oneOf:
@@ -1799,7 +1759,6 @@ spec:
Value of the address. The validity of the values will depend
on the type and support by the controller.
-
Examples: `1.2.3.4`, `128::1`, `my-ip-address`.
maxLength: 253
minLength: 1
@@ -1817,6 +1776,72 @@ spec:
rule: 'self.all(a1, a1.type == ''IPAddress'' ? self.exists_one(a2, a2.type == a1.type && a2.value == a1.value) : true )'
- message: Hostname values must be unique
rule: 'self.all(a1, a1.type == ''Hostname'' ? self.exists_one(a2, a2.type == a1.type && a2.value == a1.value) : true )'
+ backendTLS:
+ description: |+
+ BackendTLS configures TLS settings for when this Gateway is connecting to
+ backends with TLS.
+
+ Support: Core
+
+ properties:
+ clientCertificateRef:
+ description: |+
+ ClientCertificateRef is a reference to an object that contains a Client
+ Certificate and the associated private key.
+
+ References to a resource in different namespace are invalid UNLESS there
+ is a ReferenceGrant in the target namespace that allows the certificate
+ to be attached. If a ReferenceGrant does not allow this reference, the
+ "ResolvedRefs" condition MUST be set to False for this listener with the
+ "RefNotPermitted" reason.
+
+ ClientCertificateRef can reference to standard Kubernetes resources, i.e.
+ Secret, or implementation-specific custom resources.
+
+ This setting can be overridden on the service level by use of BackendTLSPolicy.
+
+ Support: Core
+
+ properties:
+ group:
+ default: ""
+ description: |-
+ Group is the group of the referent. For example, "gateway.networking.k8s.io".
+ When unspecified or empty string, core API group is inferred.
+ maxLength: 253
+ pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
+ type: string
+ kind:
+ default: Secret
+ description: Kind is kind of the referent. For example "Secret".
+ maxLength: 63
+ minLength: 1
+ pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$
+ type: string
+ name:
+ description: Name is the name of the referent.
+ maxLength: 253
+ minLength: 1
+ type: string
+ namespace:
+ description: |-
+ Namespace is the namespace of the referenced object. When unspecified, the local
+ namespace is inferred.
+
+ Note that when a namespace different than the local namespace is specified,
+ a ReferenceGrant object is required in the referent namespace to allow that
+ namespace's owner to accept the reference. See the ReferenceGrant
+ documentation for details.
+
+ Support: Core
+ maxLength: 63
+ minLength: 1
+ pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
+ type: string
+ required:
+ - name
+ type: object
+ type: object
gatewayClassName:
description: |-
GatewayClassName used for this Gateway. This is the name of a
@@ -1825,13 +1850,10 @@ spec:
minLength: 1
type: string
infrastructure:
- description: |+
+ description: |-
Infrastructure defines infrastructure level attributes about this Gateway instance.
-
- Support: Core
-
-
+ Support: Extended
properties:
annotations:
additionalProperties:
@@ -1846,56 +1868,69 @@ spec:
description: |-
Annotations that SHOULD be applied to any resources created in response to this Gateway.
-
For implementations creating other Kubernetes objects, this should be the `metadata.annotations` field on resources.
For other implementations, this refers to any relevant (implementation specific) "annotations" concepts.
-
An implementation may chose to add additional implementation-specific annotations as they see fit.
-
Support: Extended
maxProperties: 8
type: object
+ x-kubernetes-validations:
+ - message: Annotation keys must be in the form of an optional DNS subdomain prefix followed by a required name segment of up to 63 characters.
+ rule: self.all(key, key.matches(r"""^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?([A-Za-z0-9][-A-Za-z0-9_.]{0,61})?[A-Za-z0-9]$"""))
+ - message: If specified, the annotation key's prefix must be a DNS subdomain not longer than 253 characters in total.
+ rule: self.all(key, key.split("/")[0].size() < 253)
labels:
additionalProperties:
description: |-
- AnnotationValue is the value of an annotation in Gateway API. This is used
- for validation of maps such as TLS options. This roughly matches Kubernetes
- annotation validation, although the length validation in that case is based
- on the entire size of the annotations struct.
- maxLength: 4096
+ LabelValue is the value of a label in the Gateway API. This is used for validation
+ of maps such as Gateway infrastructure labels. This matches the Kubernetes
+ label validation rules:
+ * must be 63 characters or less (can be empty),
+ * unless empty, must begin and end with an alphanumeric character ([a-z0-9A-Z]),
+ * could contain dashes (-), underscores (_), dots (.), and alphanumerics between.
+
+ Valid values include:
+
+ * MyValue
+ * my.name
+ * 123-my-value
+ maxLength: 63
minLength: 0
+ pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$
type: string
description: |-
Labels that SHOULD be applied to any resources created in response to this Gateway.
-
For implementations creating other Kubernetes objects, this should be the `metadata.labels` field on resources.
For other implementations, this refers to any relevant (implementation specific) "labels" concepts.
-
An implementation may chose to add additional implementation-specific labels as they see fit.
+ If an implementation maps these labels to Pods, or any other resource that would need to be recreated when labels
+ change, it SHOULD clearly warn about this behavior in documentation.
Support: Extended
maxProperties: 8
type: object
+ x-kubernetes-validations:
+ - message: Label keys must be in the form of an optional DNS subdomain prefix followed by a required name segment of up to 63 characters.
+ rule: self.all(key, key.matches(r"""^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?([A-Za-z0-9][-A-Za-z0-9_.]{0,61})?[A-Za-z0-9]$"""))
+ - message: If specified, the label key's prefix must be a DNS subdomain not longer than 253 characters in total.
+ rule: self.all(key, key.split("/")[0].size() < 253)
parametersRef:
description: |-
ParametersRef is a reference to a resource that contains the configuration
parameters corresponding to the Gateway. This is optional if the
controller does not require any additional configuration.
-
This follows the same semantics as GatewayClass's `parametersRef`, but on a per-Gateway basis
-
The Gateway's GatewayClass may provide its own `parametersRef`. When both are specified,
the merging behavior is implementation specific.
It is generally recommended that GatewayClass provides defaults that can be overridden by a Gateway.
-
Support: Implementation-specific
properties:
group:
@@ -1926,7 +1961,6 @@ spec:
logical endpoints that are bound on this Gateway's addresses.
At least one Listener MUST be specified.
-
Each Listener in a set of Listeners (for example, in a single Gateway)
MUST be _distinct_, in that a traffic flow MUST be able to be assigned to
exactly one listener. (This section uses "set of Listeners" rather than
@@ -1934,42 +1968,32 @@ spec:
from multiple Gateways onto a single data plane, and these rules _also_
apply in that case).
-
Practically, this means that each listener in a set MUST have a unique
combination of Port, Protocol, and, if supported by the protocol, Hostname.
-
Some combinations of port, protocol, and TLS settings are considered
Core support and MUST be supported by implementations based on their
targeted conformance profile:
-
HTTP Profile
-
1. HTTPRoute, Port: 80, Protocol: HTTP
2. HTTPRoute, Port: 443, Protocol: HTTPS, TLS Mode: Terminate, TLS keypair provided
-
TLS Profile
-
1. TLSRoute, Port: 443, Protocol: TLS, TLS Mode: Passthrough
-
"Distinct" Listeners have the following property:
-
The implementation can match inbound requests to a single distinct
Listener. When multiple Listeners share values for fields (for
example, two Listeners with the same Port value), the implementation
can match requests to only one of the Listeners using other
Listener fields.
-
For example, the following Listener scenarios are distinct:
-
1. Multiple Listeners with the same Port that all use the "HTTP"
Protocol that all have unique Hostname values.
2. Multiple Listeners with the same Port that use either the "HTTPS" or
@@ -1977,45 +2001,37 @@ spec:
3. A mixture of "TCP" and "UDP" Protocol Listeners, where no Listener
with the same Protocol has the same Port value.
-
Some fields in the Listener struct have possible values that affect
whether the Listener is distinct. Hostname is particularly relevant
for HTTP or HTTPS protocols.
-
When using the Hostname value to select between same-Port, same-Protocol
Listeners, the Hostname value must be different on each Listener for the
Listener to be distinct.
-
When the Listeners are distinct based on Hostname, inbound request
hostnames MUST match from the most specific to least specific Hostname
values to choose the correct Listener and its associated set of Routes.
-
Exact matches must be processed before wildcard matches, and wildcard
matches must be processed before fallback (empty Hostname value)
matches. For example, `"foo.example.com"` takes precedence over
`"*.example.com"`, and `"*.example.com"` takes precedence over `""`.
-
Additionally, if there are multiple wildcard entries, more specific
wildcard entries must be processed before less specific wildcard entries.
For example, `"*.foo.example.com"` takes precedence over `"*.example.com"`.
The precise definition here is that the higher the number of dots in the
hostname to the right of the wildcard character, the higher the precedence.
-
The wildcard character will match any number of characters _and dots_ to
the left, however, so `"*.example.com"` will match both
`"foo.bar.example.com"` _and_ `"bar.example.com"`.
-
If a set of Listeners contains Listeners that are not distinct, then those
Listeners are Conflicted, and the implementation MUST set the "Conflicted"
condition in the Listener Status to "True".
-
Implementations MAY choose to accept a Gateway with some Conflicted
Listeners only if they only accept the partial Listener set that contains
no Conflicted Listeners. To put this another way, implementations may
@@ -2025,7 +2041,6 @@ spec:
Listener in this case, otherwise it violates the requirement that at
least one Listener must be present.
-
The implementation MUST set a "ListenersNotValid" condition on the
Gateway Status when the Gateway contains Conflicted Listeners whether or
not they accept the Gateway. That Condition SHOULD clearly
@@ -2033,26 +2048,21 @@ spec:
Accepted. Additionally, the Listener status for those listeners SHOULD
indicate which Listeners are conflicted and not Accepted.
-
A Gateway's Listeners are considered "compatible" if:
-
1. They are distinct.
2. The implementation can serve them in compliance with the Addresses
requirement that all Listeners are available on all assigned
addresses.
-
Compatible combinations in Extended support are expected to vary across
implementations. A combination that is compatible for one implementation
may not be compatible for another.
-
For example, an implementation that cannot serve both TCP and UDP listeners
on the same address, or cannot mix HTTPS and generic TLS listens on the same port
would not consider those cases compatible, even though they are distinct.
-
Note that requests SHOULD match at most one Listener. For example, if
Listeners are defined for "foo.example.com" and "*.example.com", a
request to "foo.example.com" SHOULD only be routed using routes attached
@@ -2060,11 +2070,9 @@ spec:
This concept is known as "Listener Isolation". Implementations that do
not support Listener Isolation MUST clearly document this.
-
Implementations MAY merge separate Gateways onto a single set of
Addresses if all Listeners across all Gateways are compatible.
-
Support: Core
items:
description: |-
@@ -2080,12 +2088,10 @@ spec:
Listener and the trusted namespaces where those Route resources MAY be
present.
-
Although a client request may match multiple route rules, only one rule
may ultimately receive the request. Matching precedence MUST be
determined in order of the following criteria:
-
* The most specific match as defined by the Route type.
* The oldest Route based on creation timestamp. For example, a Route with
a creation timestamp of "2020-09-08 01:02:03" is given precedence over
@@ -2094,7 +2100,6 @@ spec:
alphabetical order (namespace/name) should be given precedence. For
example, foo/bar is given precedence over foo/baz.
-
All valid rules within a Route attached to this Listener should be
implemented. Invalid Route rules can be ignored (sometimes that will mean
the full Route). If a Route rule transitions from valid to invalid,
@@ -2102,7 +2107,6 @@ spec:
example, even if a filter specified by a Route rule is invalid, the rest
of the rules within that Route should still be supported.
-
Support: Core
properties:
kinds:
@@ -2111,14 +2115,12 @@ spec:
to this Gateway Listener. When unspecified or empty, the kinds of Routes
selected are determined using the Listener protocol.
-
A RouteGroupKind MUST correspond to kinds of Routes that are compatible
with the application protocol specified in the Listener's Protocol field.
If an implementation does not support or recognize this resource type, it
MUST set the "ResolvedRefs" condition to False for this Listener with the
"InvalidRouteKinds" reason.
-
Support: Core
items:
description: RouteGroupKind indicates the group and kind of a Route resource.
@@ -2147,7 +2149,6 @@ spec:
Namespaces indicates namespaces from which Routes may be attached to this
Listener. This is restricted to the namespace of this Gateway by default.
-
Support: Core
properties:
from:
@@ -2156,13 +2157,11 @@ spec:
From indicates where Routes will be selected for this Gateway. Possible
values are:
-
* All: Routes in all namespaces may be used by this Gateway.
* Selector: Routes in namespaces selected by the selector may be used by
this Gateway.
* Same: Only Routes in the same namespace may be used by this Gateway.
-
Support: Core
enum:
- All
@@ -2175,7 +2174,6 @@ spec:
only Routes in Namespaces matching this Selector will be selected by this
Gateway. This field is ignored for other values of "From".
-
Support: Core
properties:
matchExpressions:
@@ -2228,11 +2226,9 @@ spec:
field is ignored for protocols that don't require hostname based
matching.
-
Implementations MUST apply Hostname matching appropriately for each of
the following protocols:
-
* TLS: The Listener Hostname MUST match the SNI.
* HTTP: The Listener Hostname MUST match the Host header of the request.
* HTTPS: The Listener Hostname SHOULD match at both the TLS and HTTP
@@ -2240,19 +2236,16 @@ spec:
ensure that both the SNI and Host header match the Listener hostname,
it MUST clearly document that.
-
For HTTPRoute and TLSRoute resources, there is an interaction with the
`spec.hostnames` array. When both listener and route specify hostnames,
there MUST be an intersection between the values for a Route to be
accepted. For more information, refer to the Route specific Hostnames
documentation.
-
Hostnames that are prefixed with a wildcard label (`*.`) are interpreted
as a suffix match. That means that a match for `*.example.com` would match
both `test.example.com`, and `foo.test.example.com`, but not `example.com`.
-
Support: Core
maxLength: 253
minLength: 1
@@ -2263,7 +2256,6 @@ spec:
Name is the name of the Listener. This name MUST be unique within a
Gateway.
-
Support: Core
maxLength: 253
minLength: 1
@@ -2274,7 +2266,6 @@ spec:
Port is the network port. Multiple listeners may use the
same port, subject to the Listener compatibility rules.
-
Support: Core
format: int32
maximum: 65535
@@ -2284,11 +2275,10 @@ spec:
description: |-
Protocol specifies the network protocol this listener expects to receive.
-
Support: Core
maxLength: 255
minLength: 1
- pattern: ^[a-zA-Z0-9]([-a-zSA-Z0-9]*[a-zA-Z0-9])?$|[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/[A-Za-z0-9]+$
+ pattern: ^[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?$|[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/[A-Za-z0-9]+$
type: string
tls:
description: |-
@@ -2296,15 +2286,12 @@ spec:
the Protocol field is "HTTPS" or "TLS". It is invalid to set this field
if the Protocol field is "HTTP", "TCP", or "UDP".
-
The association of SNIs to Certificate defined in GatewayTLSConfig is
defined based on the Hostname field for this listener.
-
The GatewayClass MUST use the longest matching SNI out of all
available certificates for any TLS handshake.
-
Support: Core
properties:
certificateRefs:
@@ -2314,41 +2301,33 @@ spec:
establish a TLS handshake for requests that match the hostname of the
associated listener.
-
A single CertificateRef to a Kubernetes Secret has "Core" support.
Implementations MAY choose to support attaching multiple certificates to
a Listener, but this behavior is implementation-specific.
-
References to a resource in different namespace are invalid UNLESS there
is a ReferenceGrant in the target namespace that allows the certificate
to be attached. If a ReferenceGrant does not allow this reference, the
"ResolvedRefs" condition MUST be set to False for this listener with the
"RefNotPermitted" reason.
-
This field is required to have at least one element when the mode is set
to "Terminate" (default) and is optional otherwise.
-
CertificateRefs can reference to standard Kubernetes resources, i.e.
Secret, or implementation-specific custom resources.
-
Support: Core - A single reference to a Kubernetes Secret of type kubernetes.io/tls
-
Support: Implementation-specific (More than one reference or other resource types)
items:
description: |-
SecretObjectReference identifies an API object including its namespace,
defaulting to Secret.
-
The API object must be valid in the cluster; the Group and Kind must
be registered in the cluster for this reference to be valid.
-
References to objects with invalid Group and Kind are not valid, and must
be rejected by the implementation, with appropriate Conditions set
on the containing object.
@@ -2378,13 +2357,11 @@ spec:
Namespace is the namespace of the referenced object. When unspecified, the local
namespace is inferred.
-
Note that when a namespace different than the local namespace is specified,
a ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details.
-
Support: Core
maxLength: 63
minLength: 1
@@ -2403,10 +2380,8 @@ spec:
that requests a user to specify the client certificate.
The maximum depth of a certificate chain accepted in verification is Implementation specific.
-
Support: Extended
-
properties:
caCertificateRefs:
description: |-
@@ -2415,21 +2390,17 @@ spec:
the Certificate Authorities that can be used
as a trust anchor to validate the certificates presented by the client.
-
A single CA certificate reference to a Kubernetes ConfigMap
has "Core" support.
Implementations MAY choose to support attaching multiple CA certificates to
a Listener, but this behavior is implementation-specific.
-
Support: Core - A single reference to a Kubernetes ConfigMap
with the CA certificate in a key named `ca.crt`.
-
Support: Implementation-specific (More than one reference, or other kinds
of resources).
-
References to a resource in a different namespace are invalid UNLESS there
is a ReferenceGrant in the target namespace that allows the certificate
to be attached. If a ReferenceGrant does not allow this reference, the
@@ -2439,11 +2410,9 @@ spec:
description: |-
ObjectReference identifies an API object including its namespace.
-
The API object must be valid in the cluster; the Group and Kind must
be registered in the cluster for this reference to be valid.
-
References to objects with invalid Group and Kind are not valid, and must
be rejected by the implementation, with appropriate Conditions set
on the containing object.
@@ -2471,13 +2440,11 @@ spec:
Namespace is the namespace of the referenced object. When unspecified, the local
namespace is inferred.
-
Note that when a namespace different than the local namespace is specified,
a ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details.
-
Support: Core
maxLength: 63
minLength: 1
@@ -2498,7 +2465,6 @@ spec:
Mode defines the TLS behavior for the TLS session initiated by the client.
There are two possible modes:
-
- Terminate: The TLS session between the downstream client and the
Gateway is terminated at the Gateway. This mode requires certificates
to be specified in some way, such as populating the certificateRefs
@@ -2508,7 +2474,6 @@ spec:
the ClientHello message of the TLS protocol. The certificateRefs field
is ignored in this mode.
-
Support: Core
enum:
- Terminate
@@ -2529,13 +2494,11 @@ spec:
configuration for each implementation. For example, configuring the
minimum TLS version or supported cipher suites.
-
A set of common keys MAY be defined by the API in the future. To avoid
any ambiguity, implementation-specific definitions MUST use
domain-prefixed names, such as `example.com/my-custom-option`.
Un-prefixed names are reserved for key names defined by Gateway API.
-
Support: Implementation-specific
maxProperties: 16
type: object
@@ -2589,16 +2552,13 @@ spec:
Addresses lists the network addresses that have been bound to the
Gateway.
-
This list may differ from the addresses provided in the spec under some
conditions:
-
* no addresses are specified, all addresses are dynamically assigned
* a combination of specified and dynamic addresses are assigned
* a specified address was unusable (e.g. already in use)
-
items:
description: GatewayStatusAddress describes a network address that is bound to a Gateway.
oneOf:
@@ -2628,7 +2588,6 @@ spec:
Value of the address. The validity of the values will depend
on the type and support by the controller.
-
Examples: `1.2.3.4`, `128::1`, `my-ip-address`.
maxLength: 253
minLength: 1
@@ -2656,21 +2615,18 @@ spec:
description: |-
Conditions describe the current conditions of the Gateway.
-
Implementations should prefer to express Gateway conditions
using the `GatewayConditionType` and `GatewayConditionReason`
constants so that operators and tools can converge on a common
vocabulary to describe Gateway state.
-
Known condition types are:
-
* "Accepted"
* "Programmed"
* "Ready"
items:
- description: "Condition contains details for one aspect of the current state of this API Resource.\n---\nThis struct is intended for direct use as an array at the field path .status.conditions. For example,\n\n\n\ttype FooStatus struct{\n\t // Represents the observations of a foo's current state.\n\t // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\"\n\t // +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t // other fields\n\t}"
+ description: Condition contains details for one aspect of the current state of this API Resource.
properties:
lastTransitionTime:
description: |-
@@ -2711,12 +2667,7 @@ spec:
- Unknown
type: string
type:
- description: |-
- type of condition in CamelCase or in foo.example.com/CamelCase.
- ---
- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
- useful (see .node.status.conditions), the ability to deconflict is important.
- The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
+ description: type of condition in CamelCase or in foo.example.com/CamelCase.
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
@@ -2742,7 +2693,6 @@ spec:
AttachedRoutes represents the total number of Routes that have been
successfully attached to this Listener.
-
Successful attachment of a Route to a Listener is based solely on the
combination of the AllowedRoutes field on the corresponding Listener
and the Route's ParentRefs field. A Route is successfully attached to
@@ -2755,7 +2705,6 @@ spec:
for Listeners with condition Accepted: false and MUST count successfully
attached Routes that may themselves have Accepted: false conditions.
-
Uses for this field include troubleshooting Route attachment and
measuring blast radius/impact of changes to a Listener.
format: int32
@@ -2763,7 +2712,7 @@ spec:
conditions:
description: Conditions describe the current condition of this listener.
items:
- description: "Condition contains details for one aspect of the current state of this API Resource.\n---\nThis struct is intended for direct use as an array at the field path .status.conditions. For example,\n\n\n\ttype FooStatus struct{\n\t // Represents the observations of a foo's current state.\n\t // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\"\n\t // +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t // other fields\n\t}"
+ description: Condition contains details for one aspect of the current state of this API Resource.
properties:
lastTransitionTime:
description: |-
@@ -2804,12 +2753,7 @@ spec:
- Unknown
type: string
type:
- description: |-
- type of condition in CamelCase or in foo.example.com/CamelCase.
- ---
- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
- useful (see .node.status.conditions), the ability to deconflict is important.
- The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
+ description: type of condition in CamelCase or in foo.example.com/CamelCase.
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
@@ -2837,7 +2781,6 @@ spec:
listener. This MUST represent the kinds an implementation supports for
that Listener configuration.
-
If kinds are specified in Spec that are not supported, they MUST NOT
appear in this list and an implementation MUST set the "ResolvedRefs"
condition to "False" with the "InvalidRouteKinds" reason. If both valid
@@ -2929,27 +2872,22 @@ spec:
requested address is invalid or unavailable, the implementation MUST
indicate this in the associated entry in GatewayStatus.Addresses.
-
The Addresses field represents a request for the address(es) on the
"outside of the Gateway", that traffic bound for this Gateway will use.
This could be the IP address or hostname of an external load balancer or
other networking infrastructure, or some other address that traffic will
be sent to.
-
If no Addresses are specified, the implementation MAY schedule the
Gateway in an implementation-specific manner, assigning an appropriate
set of Addresses.
-
The implementation MUST bind all Listeners to every GatewayAddress that
it assigns to the Gateway and add a corresponding entry in
GatewayStatus.Addresses.
-
Support: Extended
-
items:
description: GatewayAddress describes an address that can be bound to a Gateway.
oneOf:
@@ -2979,7 +2917,6 @@ spec:
Value of the address. The validity of the values will depend
on the type and support by the controller.
-
Examples: `1.2.3.4`, `128::1`, `my-ip-address`.
maxLength: 253
minLength: 1
@@ -2997,6 +2934,72 @@ spec:
rule: 'self.all(a1, a1.type == ''IPAddress'' ? self.exists_one(a2, a2.type == a1.type && a2.value == a1.value) : true )'
- message: Hostname values must be unique
rule: 'self.all(a1, a1.type == ''Hostname'' ? self.exists_one(a2, a2.type == a1.type && a2.value == a1.value) : true )'
+ backendTLS:
+ description: |+
+ BackendTLS configures TLS settings for when this Gateway is connecting to
+ backends with TLS.
+
+ Support: Core
+
+ properties:
+ clientCertificateRef:
+ description: |+
+ ClientCertificateRef is a reference to an object that contains a Client
+ Certificate and the associated private key.
+
+ References to a resource in different namespace are invalid UNLESS there
+ is a ReferenceGrant in the target namespace that allows the certificate
+ to be attached. If a ReferenceGrant does not allow this reference, the
+ "ResolvedRefs" condition MUST be set to False for this listener with the
+ "RefNotPermitted" reason.
+
+ ClientCertificateRef can reference to standard Kubernetes resources, i.e.
+ Secret, or implementation-specific custom resources.
+
+ This setting can be overridden on the service level by use of BackendTLSPolicy.
+
+ Support: Core
+
+ properties:
+ group:
+ default: ""
+ description: |-
+ Group is the group of the referent. For example, "gateway.networking.k8s.io".
+ When unspecified or empty string, core API group is inferred.
+ maxLength: 253
+ pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
+ type: string
+ kind:
+ default: Secret
+ description: Kind is kind of the referent. For example "Secret".
+ maxLength: 63
+ minLength: 1
+ pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$
+ type: string
+ name:
+ description: Name is the name of the referent.
+ maxLength: 253
+ minLength: 1
+ type: string
+ namespace:
+ description: |-
+ Namespace is the namespace of the referenced object. When unspecified, the local
+ namespace is inferred.
+
+ Note that when a namespace different than the local namespace is specified,
+ a ReferenceGrant object is required in the referent namespace to allow that
+ namespace's owner to accept the reference. See the ReferenceGrant
+ documentation for details.
+
+ Support: Core
+ maxLength: 63
+ minLength: 1
+ pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
+ type: string
+ required:
+ - name
+ type: object
+ type: object
gatewayClassName:
description: |-
GatewayClassName used for this Gateway. This is the name of a
@@ -3005,13 +3008,10 @@ spec:
minLength: 1
type: string
infrastructure:
- description: |+
+ description: |-
Infrastructure defines infrastructure level attributes about this Gateway instance.
-
- Support: Core
-
-
+ Support: Extended
properties:
annotations:
additionalProperties:
@@ -3026,56 +3026,69 @@ spec:
description: |-
Annotations that SHOULD be applied to any resources created in response to this Gateway.
-
For implementations creating other Kubernetes objects, this should be the `metadata.annotations` field on resources.
For other implementations, this refers to any relevant (implementation specific) "annotations" concepts.
-
An implementation may chose to add additional implementation-specific annotations as they see fit.
-
Support: Extended
maxProperties: 8
type: object
+ x-kubernetes-validations:
+ - message: Annotation keys must be in the form of an optional DNS subdomain prefix followed by a required name segment of up to 63 characters.
+ rule: self.all(key, key.matches(r"""^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?([A-Za-z0-9][-A-Za-z0-9_.]{0,61})?[A-Za-z0-9]$"""))
+ - message: If specified, the annotation key's prefix must be a DNS subdomain not longer than 253 characters in total.
+ rule: self.all(key, key.split("/")[0].size() < 253)
labels:
additionalProperties:
description: |-
- AnnotationValue is the value of an annotation in Gateway API. This is used
- for validation of maps such as TLS options. This roughly matches Kubernetes
- annotation validation, although the length validation in that case is based
- on the entire size of the annotations struct.
- maxLength: 4096
+ LabelValue is the value of a label in the Gateway API. This is used for validation
+ of maps such as Gateway infrastructure labels. This matches the Kubernetes
+ label validation rules:
+ * must be 63 characters or less (can be empty),
+ * unless empty, must begin and end with an alphanumeric character ([a-z0-9A-Z]),
+ * could contain dashes (-), underscores (_), dots (.), and alphanumerics between.
+
+ Valid values include:
+
+ * MyValue
+ * my.name
+ * 123-my-value
+ maxLength: 63
minLength: 0
+ pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$
type: string
description: |-
Labels that SHOULD be applied to any resources created in response to this Gateway.
-
For implementations creating other Kubernetes objects, this should be the `metadata.labels` field on resources.
For other implementations, this refers to any relevant (implementation specific) "labels" concepts.
-
An implementation may chose to add additional implementation-specific labels as they see fit.
+ If an implementation maps these labels to Pods, or any other resource that would need to be recreated when labels
+ change, it SHOULD clearly warn about this behavior in documentation.
Support: Extended
maxProperties: 8
type: object
+ x-kubernetes-validations:
+ - message: Label keys must be in the form of an optional DNS subdomain prefix followed by a required name segment of up to 63 characters.
+ rule: self.all(key, key.matches(r"""^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?([A-Za-z0-9][-A-Za-z0-9_.]{0,61})?[A-Za-z0-9]$"""))
+ - message: If specified, the label key's prefix must be a DNS subdomain not longer than 253 characters in total.
+ rule: self.all(key, key.split("/")[0].size() < 253)
parametersRef:
description: |-
ParametersRef is a reference to a resource that contains the configuration
parameters corresponding to the Gateway. This is optional if the
controller does not require any additional configuration.
-
This follows the same semantics as GatewayClass's `parametersRef`, but on a per-Gateway basis
-
The Gateway's GatewayClass may provide its own `parametersRef`. When both are specified,
the merging behavior is implementation specific.
It is generally recommended that GatewayClass provides defaults that can be overridden by a Gateway.
-
Support: Implementation-specific
properties:
group:
@@ -3106,7 +3119,6 @@ spec:
logical endpoints that are bound on this Gateway's addresses.
At least one Listener MUST be specified.
-
Each Listener in a set of Listeners (for example, in a single Gateway)
MUST be _distinct_, in that a traffic flow MUST be able to be assigned to
exactly one listener. (This section uses "set of Listeners" rather than
@@ -3114,42 +3126,32 @@ spec:
from multiple Gateways onto a single data plane, and these rules _also_
apply in that case).
-
Practically, this means that each listener in a set MUST have a unique
combination of Port, Protocol, and, if supported by the protocol, Hostname.
-
Some combinations of port, protocol, and TLS settings are considered
Core support and MUST be supported by implementations based on their
targeted conformance profile:
-
HTTP Profile
-
1. HTTPRoute, Port: 80, Protocol: HTTP
2. HTTPRoute, Port: 443, Protocol: HTTPS, TLS Mode: Terminate, TLS keypair provided
-
TLS Profile
-
1. TLSRoute, Port: 443, Protocol: TLS, TLS Mode: Passthrough
-
"Distinct" Listeners have the following property:
-
The implementation can match inbound requests to a single distinct
Listener. When multiple Listeners share values for fields (for
example, two Listeners with the same Port value), the implementation
can match requests to only one of the Listeners using other
Listener fields.
-
For example, the following Listener scenarios are distinct:
-
1. Multiple Listeners with the same Port that all use the "HTTP"
Protocol that all have unique Hostname values.
2. Multiple Listeners with the same Port that use either the "HTTPS" or
@@ -3157,45 +3159,37 @@ spec:
3. A mixture of "TCP" and "UDP" Protocol Listeners, where no Listener
with the same Protocol has the same Port value.
-
Some fields in the Listener struct have possible values that affect
whether the Listener is distinct. Hostname is particularly relevant
for HTTP or HTTPS protocols.
-
When using the Hostname value to select between same-Port, same-Protocol
Listeners, the Hostname value must be different on each Listener for the
Listener to be distinct.
-
When the Listeners are distinct based on Hostname, inbound request
hostnames MUST match from the most specific to least specific Hostname
values to choose the correct Listener and its associated set of Routes.
-
Exact matches must be processed before wildcard matches, and wildcard
matches must be processed before fallback (empty Hostname value)
matches. For example, `"foo.example.com"` takes precedence over
`"*.example.com"`, and `"*.example.com"` takes precedence over `""`.
-
Additionally, if there are multiple wildcard entries, more specific
wildcard entries must be processed before less specific wildcard entries.
For example, `"*.foo.example.com"` takes precedence over `"*.example.com"`.
The precise definition here is that the higher the number of dots in the
hostname to the right of the wildcard character, the higher the precedence.
-
The wildcard character will match any number of characters _and dots_ to
the left, however, so `"*.example.com"` will match both
`"foo.bar.example.com"` _and_ `"bar.example.com"`.
-
If a set of Listeners contains Listeners that are not distinct, then those
Listeners are Conflicted, and the implementation MUST set the "Conflicted"
condition in the Listener Status to "True".
-
Implementations MAY choose to accept a Gateway with some Conflicted
Listeners only if they only accept the partial Listener set that contains
no Conflicted Listeners. To put this another way, implementations may
@@ -3205,7 +3199,6 @@ spec:
Listener in this case, otherwise it violates the requirement that at
least one Listener must be present.
-
The implementation MUST set a "ListenersNotValid" condition on the
Gateway Status when the Gateway contains Conflicted Listeners whether or
not they accept the Gateway. That Condition SHOULD clearly
@@ -3213,26 +3206,21 @@ spec:
Accepted. Additionally, the Listener status for those listeners SHOULD
indicate which Listeners are conflicted and not Accepted.
-
A Gateway's Listeners are considered "compatible" if:
-
1. They are distinct.
2. The implementation can serve them in compliance with the Addresses
requirement that all Listeners are available on all assigned
addresses.
-
Compatible combinations in Extended support are expected to vary across
implementations. A combination that is compatible for one implementation
may not be compatible for another.
-
For example, an implementation that cannot serve both TCP and UDP listeners
on the same address, or cannot mix HTTPS and generic TLS listens on the same port
would not consider those cases compatible, even though they are distinct.
-
Note that requests SHOULD match at most one Listener. For example, if
Listeners are defined for "foo.example.com" and "*.example.com", a
request to "foo.example.com" SHOULD only be routed using routes attached
@@ -3240,11 +3228,9 @@ spec:
This concept is known as "Listener Isolation". Implementations that do
not support Listener Isolation MUST clearly document this.
-
Implementations MAY merge separate Gateways onto a single set of
Addresses if all Listeners across all Gateways are compatible.
-
Support: Core
items:
description: |-
@@ -3260,12 +3246,10 @@ spec:
Listener and the trusted namespaces where those Route resources MAY be
present.
-
Although a client request may match multiple route rules, only one rule
may ultimately receive the request. Matching precedence MUST be
determined in order of the following criteria:
-
* The most specific match as defined by the Route type.
* The oldest Route based on creation timestamp. For example, a Route with
a creation timestamp of "2020-09-08 01:02:03" is given precedence over
@@ -3274,7 +3258,6 @@ spec:
alphabetical order (namespace/name) should be given precedence. For
example, foo/bar is given precedence over foo/baz.
-
All valid rules within a Route attached to this Listener should be
implemented. Invalid Route rules can be ignored (sometimes that will mean
the full Route). If a Route rule transitions from valid to invalid,
@@ -3282,7 +3265,6 @@ spec:
example, even if a filter specified by a Route rule is invalid, the rest
of the rules within that Route should still be supported.
-
Support: Core
properties:
kinds:
@@ -3291,14 +3273,12 @@ spec:
to this Gateway Listener. When unspecified or empty, the kinds of Routes
selected are determined using the Listener protocol.
-
A RouteGroupKind MUST correspond to kinds of Routes that are compatible
with the application protocol specified in the Listener's Protocol field.
If an implementation does not support or recognize this resource type, it
MUST set the "ResolvedRefs" condition to False for this Listener with the
"InvalidRouteKinds" reason.
-
Support: Core
items:
description: RouteGroupKind indicates the group and kind of a Route resource.
@@ -3327,7 +3307,6 @@ spec:
Namespaces indicates namespaces from which Routes may be attached to this
Listener. This is restricted to the namespace of this Gateway by default.
-
Support: Core
properties:
from:
@@ -3336,13 +3315,11 @@ spec:
From indicates where Routes will be selected for this Gateway. Possible
values are:
-
* All: Routes in all namespaces may be used by this Gateway.
* Selector: Routes in namespaces selected by the selector may be used by
this Gateway.
* Same: Only Routes in the same namespace may be used by this Gateway.
-
Support: Core
enum:
- All
@@ -3355,7 +3332,6 @@ spec:
only Routes in Namespaces matching this Selector will be selected by this
Gateway. This field is ignored for other values of "From".
-
Support: Core
properties:
matchExpressions:
@@ -3408,11 +3384,9 @@ spec:
field is ignored for protocols that don't require hostname based
matching.
-
Implementations MUST apply Hostname matching appropriately for each of
the following protocols:
-
* TLS: The Listener Hostname MUST match the SNI.
* HTTP: The Listener Hostname MUST match the Host header of the request.
* HTTPS: The Listener Hostname SHOULD match at both the TLS and HTTP
@@ -3420,19 +3394,16 @@ spec:
ensure that both the SNI and Host header match the Listener hostname,
it MUST clearly document that.
-
For HTTPRoute and TLSRoute resources, there is an interaction with the
`spec.hostnames` array. When both listener and route specify hostnames,
there MUST be an intersection between the values for a Route to be
accepted. For more information, refer to the Route specific Hostnames
documentation.
-
Hostnames that are prefixed with a wildcard label (`*.`) are interpreted
as a suffix match. That means that a match for `*.example.com` would match
both `test.example.com`, and `foo.test.example.com`, but not `example.com`.
-
Support: Core
maxLength: 253
minLength: 1
@@ -3443,7 +3414,6 @@ spec:
Name is the name of the Listener. This name MUST be unique within a
Gateway.
-
Support: Core
maxLength: 253
minLength: 1
@@ -3454,7 +3424,6 @@ spec:
Port is the network port. Multiple listeners may use the
same port, subject to the Listener compatibility rules.
-
Support: Core
format: int32
maximum: 65535
@@ -3464,11 +3433,10 @@ spec:
description: |-
Protocol specifies the network protocol this listener expects to receive.
-
Support: Core
maxLength: 255
minLength: 1
- pattern: ^[a-zA-Z0-9]([-a-zSA-Z0-9]*[a-zA-Z0-9])?$|[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/[A-Za-z0-9]+$
+ pattern: ^[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?$|[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/[A-Za-z0-9]+$
type: string
tls:
description: |-
@@ -3476,15 +3444,12 @@ spec:
the Protocol field is "HTTPS" or "TLS". It is invalid to set this field
if the Protocol field is "HTTP", "TCP", or "UDP".
-
The association of SNIs to Certificate defined in GatewayTLSConfig is
defined based on the Hostname field for this listener.
-
The GatewayClass MUST use the longest matching SNI out of all
available certificates for any TLS handshake.
-
Support: Core
properties:
certificateRefs:
@@ -3494,41 +3459,33 @@ spec:
establish a TLS handshake for requests that match the hostname of the
associated listener.
-
A single CertificateRef to a Kubernetes Secret has "Core" support.
Implementations MAY choose to support attaching multiple certificates to
a Listener, but this behavior is implementation-specific.
-
References to a resource in different namespace are invalid UNLESS there
is a ReferenceGrant in the target namespace that allows the certificate
to be attached. If a ReferenceGrant does not allow this reference, the
"ResolvedRefs" condition MUST be set to False for this listener with the
"RefNotPermitted" reason.
-
This field is required to have at least one element when the mode is set
to "Terminate" (default) and is optional otherwise.
-
CertificateRefs can reference to standard Kubernetes resources, i.e.
Secret, or implementation-specific custom resources.
-
Support: Core - A single reference to a Kubernetes Secret of type kubernetes.io/tls
-
Support: Implementation-specific (More than one reference or other resource types)
items:
description: |-
SecretObjectReference identifies an API object including its namespace,
defaulting to Secret.
-
The API object must be valid in the cluster; the Group and Kind must
be registered in the cluster for this reference to be valid.
-
References to objects with invalid Group and Kind are not valid, and must
be rejected by the implementation, with appropriate Conditions set
on the containing object.
@@ -3558,13 +3515,11 @@ spec:
Namespace is the namespace of the referenced object. When unspecified, the local
namespace is inferred.
-
Note that when a namespace different than the local namespace is specified,
a ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details.
-
Support: Core
maxLength: 63
minLength: 1
@@ -3583,10 +3538,8 @@ spec:
that requests a user to specify the client certificate.
The maximum depth of a certificate chain accepted in verification is Implementation specific.
-
Support: Extended
-
properties:
caCertificateRefs:
description: |-
@@ -3595,21 +3548,17 @@ spec:
the Certificate Authorities that can be used
as a trust anchor to validate the certificates presented by the client.
-
A single CA certificate reference to a Kubernetes ConfigMap
has "Core" support.
Implementations MAY choose to support attaching multiple CA certificates to
a Listener, but this behavior is implementation-specific.
-
Support: Core - A single reference to a Kubernetes ConfigMap
with the CA certificate in a key named `ca.crt`.
-
Support: Implementation-specific (More than one reference, or other kinds
of resources).
-
References to a resource in a different namespace are invalid UNLESS there
is a ReferenceGrant in the target namespace that allows the certificate
to be attached. If a ReferenceGrant does not allow this reference, the
@@ -3619,11 +3568,9 @@ spec:
description: |-
ObjectReference identifies an API object including its namespace.
-
The API object must be valid in the cluster; the Group and Kind must
be registered in the cluster for this reference to be valid.
-
References to objects with invalid Group and Kind are not valid, and must
be rejected by the implementation, with appropriate Conditions set
on the containing object.
@@ -3651,13 +3598,11 @@ spec:
Namespace is the namespace of the referenced object. When unspecified, the local
namespace is inferred.
-
Note that when a namespace different than the local namespace is specified,
a ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details.
-
Support: Core
maxLength: 63
minLength: 1
@@ -3678,7 +3623,6 @@ spec:
Mode defines the TLS behavior for the TLS session initiated by the client.
There are two possible modes:
-
- Terminate: The TLS session between the downstream client and the
Gateway is terminated at the Gateway. This mode requires certificates
to be specified in some way, such as populating the certificateRefs
@@ -3688,7 +3632,6 @@ spec:
the ClientHello message of the TLS protocol. The certificateRefs field
is ignored in this mode.
-
Support: Core
enum:
- Terminate
@@ -3709,13 +3652,11 @@ spec:
configuration for each implementation. For example, configuring the
minimum TLS version or supported cipher suites.
-
A set of common keys MAY be defined by the API in the future. To avoid
any ambiguity, implementation-specific definitions MUST use
domain-prefixed names, such as `example.com/my-custom-option`.
Un-prefixed names are reserved for key names defined by Gateway API.
-
Support: Implementation-specific
maxProperties: 16
type: object
@@ -3769,16 +3710,13 @@ spec:
Addresses lists the network addresses that have been bound to the
Gateway.
-
This list may differ from the addresses provided in the spec under some
conditions:
-
* no addresses are specified, all addresses are dynamically assigned
* a combination of specified and dynamic addresses are assigned
* a specified address was unusable (e.g. already in use)
-
items:
description: GatewayStatusAddress describes a network address that is bound to a Gateway.
oneOf:
@@ -3808,7 +3746,6 @@ spec:
Value of the address. The validity of the values will depend
on the type and support by the controller.
-
Examples: `1.2.3.4`, `128::1`, `my-ip-address`.
maxLength: 253
minLength: 1
@@ -3836,21 +3773,18 @@ spec:
description: |-
Conditions describe the current conditions of the Gateway.
-
Implementations should prefer to express Gateway conditions
using the `GatewayConditionType` and `GatewayConditionReason`
constants so that operators and tools can converge on a common
vocabulary to describe Gateway state.
-
Known condition types are:
-
* "Accepted"
* "Programmed"
* "Ready"
items:
- description: "Condition contains details for one aspect of the current state of this API Resource.\n---\nThis struct is intended for direct use as an array at the field path .status.conditions. For example,\n\n\n\ttype FooStatus struct{\n\t // Represents the observations of a foo's current state.\n\t // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\"\n\t // +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t // other fields\n\t}"
+ description: Condition contains details for one aspect of the current state of this API Resource.
properties:
lastTransitionTime:
description: |-
@@ -3891,12 +3825,7 @@ spec:
- Unknown
type: string
type:
- description: |-
- type of condition in CamelCase or in foo.example.com/CamelCase.
- ---
- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
- useful (see .node.status.conditions), the ability to deconflict is important.
- The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
+ description: type of condition in CamelCase or in foo.example.com/CamelCase.
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
@@ -3922,7 +3851,6 @@ spec:
AttachedRoutes represents the total number of Routes that have been
successfully attached to this Listener.
-
Successful attachment of a Route to a Listener is based solely on the
combination of the AllowedRoutes field on the corresponding Listener
and the Route's ParentRefs field. A Route is successfully attached to
@@ -3935,7 +3863,6 @@ spec:
for Listeners with condition Accepted: false and MUST count successfully
attached Routes that may themselves have Accepted: false conditions.
-
Uses for this field include troubleshooting Route attachment and
measuring blast radius/impact of changes to a Listener.
format: int32
@@ -3943,7 +3870,7 @@ spec:
conditions:
description: Conditions describe the current condition of this listener.
items:
- description: "Condition contains details for one aspect of the current state of this API Resource.\n---\nThis struct is intended for direct use as an array at the field path .status.conditions. For example,\n\n\n\ttype FooStatus struct{\n\t // Represents the observations of a foo's current state.\n\t // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\"\n\t // +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t // other fields\n\t}"
+ description: Condition contains details for one aspect of the current state of this API Resource.
properties:
lastTransitionTime:
description: |-
@@ -3984,12 +3911,7 @@ spec:
- Unknown
type: string
type:
- description: |-
- type of condition in CamelCase or in foo.example.com/CamelCase.
- ---
- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
- useful (see .node.status.conditions), the ability to deconflict is important.
- The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
+ description: type of condition in CamelCase or in foo.example.com/CamelCase.
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
@@ -4017,7 +3939,6 @@ spec:
listener. This MUST represent the kinds an implementation supports for
that Listener configuration.
-
If kinds are specified in Spec that are not supported, they MUST NOT
appear in this list and an implementation MUST set the "ResolvedRefs"
condition to "False" with the "InvalidRouteKinds" reason. If both valid
@@ -4076,8 +3997,8 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
- api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/2997
- gateway.networking.k8s.io/bundle-version: v1.1.0
+ api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/3328
+ gateway.networking.k8s.io/bundle-version: v1.2.1
gateway.networking.k8s.io/channel: experimental
creationTimestamp: null
name: grpcroutes.gateway.networking.k8s.io
@@ -4108,14 +4029,12 @@ spec:
Filters can be used to specify additional processing steps. Backends specify
where matching requests will be routed.
-
GRPCRoute falls under extended support within the Gateway API. Within the
following specification, the word "MUST" indicates that an implementation
supporting GRPCRoute must conform to the indicated requirement, but an
implementation not supporting this route type need not follow the requirement
unless explicitly indicated.
-
Implementations supporting `GRPCRoute` with the `HTTPS` `ProtocolType` MUST
accept HTTP/2 connections without an initial upgrade from HTTP/1.1, i.e. via
ALPN. If the implementation does not support this, then it MUST set the
@@ -4123,7 +4042,6 @@ spec:
"UnsupportedProtocol". Implementations MAY also accept HTTP/2 connections
with an upgrade from HTTP/1.
-
Implementations supporting `GRPCRoute` with the `HTTP` `ProtocolType` MUST
support HTTP/2 over cleartext TCP (h2c,
https://www.rfc-editor.org/rfc/rfc7540#section-3.1) without an initial
@@ -4160,17 +4078,14 @@ spec:
Host header to select a GRPCRoute to process the request. This matches
the RFC 1123 definition of a hostname with 2 notable exceptions:
-
1. IPs are not allowed.
2. A hostname may be prefixed with a wildcard label (`*.`). The wildcard
label MUST appear by itself as the first label.
-
If a hostname is specified by both the Listener and GRPCRoute, there
MUST be at least one intersecting hostname for the GRPCRoute to be
attached to the Listener. For example:
-
* A Listener with `test.example.com` as the hostname matches GRPCRoutes
that have either not specified any hostnames, or have specified at
least one of `test.example.com` or `*.example.com`.
@@ -4180,58 +4095,48 @@ spec:
`test.example.com` and `*.example.com` would both match. On the other
hand, `example.com` and `test.example.net` would not match.
-
Hostnames that are prefixed with a wildcard label (`*.`) are interpreted
as a suffix match. That means that a match for `*.example.com` would match
both `test.example.com`, and `foo.test.example.com`, but not `example.com`.
-
If both the Listener and GRPCRoute have specified hostnames, any
GRPCRoute hostnames that do not match the Listener hostname MUST be
ignored. For example, if a Listener specified `*.example.com`, and the
GRPCRoute specified `test.example.com` and `test.example.net`,
`test.example.net` MUST NOT be considered for a match.
-
If both the Listener and GRPCRoute have specified hostnames, and none
match with the criteria above, then the GRPCRoute MUST NOT be accepted by
the implementation. The implementation MUST raise an 'Accepted' Condition
with a status of `False` in the corresponding RouteParentStatus.
-
If a Route (A) of type HTTPRoute or GRPCRoute is attached to a
Listener and that listener already has another Route (B) of the other
type attached and the intersection of the hostnames of A and B is
non-empty, then the implementation MUST accept exactly one of these two
routes, determined by the following criteria, in order:
-
* The oldest Route based on creation timestamp.
* The Route appearing first in alphabetical order by
"{namespace}/{name}".
-
The rejected Route MUST raise an 'Accepted' condition with a status of
'False' in the corresponding RouteParentStatus.
-
Support: Core
items:
description: |-
Hostname is the fully qualified domain name of a network host. This matches
the RFC 1123 definition of a hostname with 2 notable exceptions:
-
1. IPs are not allowed.
2. A hostname may be prefixed with a wildcard label (`*.`). The wildcard
label must appear by itself as the first label.
-
Hostname can be "precise" which is a domain name without the terminating
dot of a network host (e.g. "foo.example.com") or "wildcard", which is a
domain name prefixed with a single wildcard label (e.g. `*.example.com`).
-
Note that as per RFC1035 and RFC1123, a *label* must consist of lower case
alphanumeric characters or '-', and must start and end with an alphanumeric
character. No other punctuation is allowed.
@@ -4254,21 +4159,16 @@ spec:
create a "producer" route for a Service in a different namespace from the
Route.
-
There are two kinds of parent resources with "Core" support:
-
* Gateway (Gateway conformance profile)
* Service (Mesh conformance profile, ClusterIP Services only)
-
This API may be extended in the future to support additional kinds of parent
resources.
-
ParentRefs must be _distinct_. This means either that:
-
* They select different objects. If this is the case, then parentRef
entries are distinct. In terms of fields, this means that the
multi-part key defined by `group`, `kind`, `namespace`, and `name` must
@@ -4278,10 +4178,8 @@ spec:
optional fields to different values. If one ParentRef sets a
combination of optional fields, all must set the same combination.
-
Some examples:
-
* If one ParentRef sets `sectionName`, all ParentRefs referencing the
same object must also set `sectionName`.
* If one ParentRef sets `port`, all ParentRefs referencing the same
@@ -4289,14 +4187,12 @@ spec:
* If one ParentRef sets `sectionName` and `port`, all ParentRefs
referencing the same object must also set `sectionName` and `port`.
-
It is possible to separately reference multiple distinct objects that may
be collapsed by an implementation. For example, some implementations may
choose to merge compatible Gateway Listeners together. If that is the
case, the list of routes attached to those resources should also be
merged.
-
Note that for ParentRefs that cross namespace boundaries, there are specific
rules. Cross-namespace references are only valid if they are explicitly
allowed by something in the namespace they are referring to. For example,
@@ -4304,12 +4200,10 @@ spec:
generic way to enable other kinds of cross-namespace reference.
-
ParentRefs from a Route to a Service in the same namespace are "producer"
routes, which apply default routing rules to inbound connections from
any namespace to the Service.
-
ParentRefs from a Route to a Service in a different namespace are
"consumer" routes, and these routing rules are only applied to outbound
connections originating from the same namespace as the Route, for which
@@ -4320,22 +4214,18 @@ spec:
-
items:
description: |-
ParentReference identifies an API object (usually a Gateway) that can be considered
a parent of this resource (usually a route). There are two kinds of parent resources
with "Core" support:
-
* Gateway (Gateway conformance profile)
* Service (Mesh conformance profile, ClusterIP Services only)
-
This API may be extended in the future to support additional kinds of parent
resources.
-
The API object must be valid in the cluster; the Group and Kind must
be registered in the cluster for this reference to be valid.
properties:
@@ -4347,7 +4237,6 @@ spec:
To set the core API group (such as for a "Service" kind referent),
Group must be explicitly set to "" (empty string).
-
Support: Core
maxLength: 253
pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
@@ -4357,14 +4246,11 @@ spec:
description: |-
Kind is kind of the referent.
-
There are two kinds of parent resources with "Core" support:
-
* Gateway (Gateway conformance profile)
* Service (Mesh conformance profile, ClusterIP Services only)
-
Support for other resources is Implementation-Specific.
maxLength: 63
minLength: 1
@@ -4374,7 +4260,6 @@ spec:
description: |-
Name is the name of the referent.
-
Support: Core
maxLength: 253
minLength: 1
@@ -4384,7 +4269,6 @@ spec:
Namespace is the namespace of the referent. When unspecified, this refers
to the local namespace of the Route.
-
Note that there are specific rules for ParentRefs which cross namespace
boundaries. Cross-namespace references are only valid if they are explicitly
allowed by something in the namespace they are referring to. For example:
@@ -4392,12 +4276,10 @@ spec:
generic way to enable any other kind of cross-namespace reference.
-
ParentRefs from a Route to a Service in the same namespace are "producer"
routes, which apply default routing rules to inbound connections from
any namespace to the Service.
-
ParentRefs from a Route to a Service in a different namespace are
"consumer" routes, and these routing rules are only applied to outbound
connections originating from the same namespace as the Route, for which
@@ -4405,7 +4287,6 @@ spec:
ParentRef of the Route.
-
Support: Core
maxLength: 63
minLength: 1
@@ -4416,7 +4297,6 @@ spec:
Port is the network port this Route targets. It can be interpreted
differently based on the type of parent resource.
-
When the parent resource is a Gateway, this targets all listeners
listening on the specified port that also support this kind of Route(and
select this Route). It's not recommended to set `Port` unless the
@@ -4426,18 +4306,15 @@ spec:
must match both specified values.
-
When the parent resource is a Service, this targets a specific port in the
Service spec. When both Port (experimental) and SectionName are specified,
the name and port of the selected port must match both specified values.
-
Implementations MAY choose to support other parent resources.
Implementations supporting other types of parent resources MUST clearly
document how/if Port is interpreted.
-
For the purpose of status, an attachment is considered successful as
long as the parent resource accepts it partially. For example, Gateway
listeners can restrict which Routes can attach to them by Route kind,
@@ -4446,7 +4323,6 @@ spec:
attached. If no Gateway listeners accept attachment from this Route,
the Route MUST be considered detached from the Gateway.
-
Support: Extended
format: int32
maximum: 65535
@@ -4457,7 +4333,6 @@ spec:
SectionName is the name of a section within the target resource. In the
following resources, SectionName is interpreted as the following:
-
* Gateway: Listener name. When both Port (experimental) and SectionName
are specified, the name and port of the selected listener must match
both specified values.
@@ -4465,12 +4340,10 @@ spec:
are specified, the name and port of the selected listener must match
both specified values.
-
Implementations MAY choose to support attaching Routes to other resources.
If that is the case, they MUST clearly document how SectionName is
interpreted.
-
When unspecified (empty string), this will reference the entire resource.
For the purpose of status, an attachment is considered successful if at
least one section in the parent resource accepts it. For example, Gateway
@@ -4480,7 +4353,6 @@ spec:
attached. If no Gateway listeners accept attachment from this Route, the
Route MUST be considered detached from the Gateway.
-
Support: Core
maxLength: 253
minLength: 1
@@ -4497,7 +4369,9 @@ spec:
- message: sectionName or port must be unique when parentRefs includes 2 or more references to the same parent
rule: self.all(p1, self.exists_one(p2, p1.group == p2.group && p1.kind == p2.kind && p1.name == p2.name && (((!has(p1.__namespace__) || p1.__namespace__ == '') && (!has(p2.__namespace__) || p2.__namespace__ == '')) || (has(p1.__namespace__) && has(p2.__namespace__) && p1.__namespace__ == p2.__namespace__ )) && (((!has(p1.sectionName) || p1.sectionName == '') && (!has(p2.sectionName) || p2.sectionName == '')) || ( has(p1.sectionName) && has(p2.sectionName) && p1.sectionName == p2.sectionName)) && (((!has(p1.port) || p1.port == 0) && (!has(p2.port) || p2.port == 0)) || (has(p1.port) && has(p2.port) && p1.port == p2.port))))
rules:
- description: Rules are a list of GRPC matchers, filters and actions.
+ description: |+
+ Rules are a list of GRPC matchers, filters and actions.
+
items:
description: |-
GRPCRouteRule defines the semantics for matching a gRPC request based on
@@ -4509,71 +4383,56 @@ spec:
BackendRefs defines the backend(s) where matching requests should be
sent.
-
Failure behavior here depends on how many BackendRefs are specified and
how many are invalid.
-
If *all* entries in BackendRefs are invalid, and there are also no filters
specified in this route rule, *all* traffic which matches this rule MUST
receive an `UNAVAILABLE` status.
-
See the GRPCBackendRef definition for the rules about what makes a single
GRPCBackendRef invalid.
-
When a GRPCBackendRef is invalid, `UNAVAILABLE` statuses MUST be returned for
requests that would have otherwise been routed to an invalid backend. If
multiple backends are specified, and some are invalid, the proportion of
requests that would otherwise have been routed to an invalid backend
MUST receive an `UNAVAILABLE` status.
-
For example, if two backends are specified with equal weights, and one is
invalid, 50 percent of traffic MUST receive an `UNAVAILABLE` status.
Implementations may choose how that 50 percent is determined.
-
Support: Core for Kubernetes Service
-
Support: Implementation-specific for any other resource
-
Support for weight: Core
items:
description: |-
GRPCBackendRef defines how a GRPCRoute forwards a gRPC request.
-
Note that when a namespace different than the local namespace is specified, a
ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details.
-
-
When the BackendRef points to a Kubernetes Service, implementations SHOULD
honor the appProtocol field if it is set for the target Service Port.
-
Implementations supporting appProtocol SHOULD recognize the Kubernetes
Standard Application Protocols defined in KEP-3726.
-
If a Service appProtocol isn't specified, an implementation MAY infer the
backend protocol through its own means. Implementations MAY infer the
protocol from the Route type referring to the backend Service.
-
If a Route is not able to send traffic to the backend using the specified
protocol then the backend is considered invalid. Implementations MUST set the
"ResolvedRefs" condition to "False" with the "UnsupportedProtocol" reason.
-
properties:
filters:
@@ -4581,7 +4440,6 @@ spec:
Filters defined at this level MUST be executed if and only if the
request is being forwarded to the backend defined here.
-
Support: Implementation-specific (For broader support of filters, use the
Filters field in GRPCRouteRule.)
items:
@@ -4600,10 +4458,8 @@ spec:
"networking.example.net"). ExtensionRef MUST NOT be used for core and
extended filters.
-
Support: Implementation-specific
-
This filter can be used multiple times within the same rule.
properties:
group:
@@ -4634,7 +4490,6 @@ spec:
RequestHeaderModifier defines a schema for a filter that modifies request
headers.
-
Support: Core
properties:
add:
@@ -4643,18 +4498,15 @@ spec:
before the action. It appends to any existing values associated
with the header name.
-
Input:
GET /foo HTTP/1.1
my-header: foo
-
Config:
add:
- name: "my-header"
value: "bar,baz"
-
Output:
GET /foo HTTP/1.1
my-header: foo,bar,baz
@@ -4666,7 +4518,6 @@ spec:
Name is the name of the HTTP Header to be matched. Name matching MUST be
case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
-
If multiple entries specify equivalent header names, the first entry with
an equivalent name MUST be considered for a match. Subsequent entries
with an equivalent header name MUST be ignored. Due to the
@@ -4697,18 +4548,15 @@ spec:
names are case-insensitive (see
https://datatracker.ietf.org/doc/html/rfc2616#section-4.2).
-
Input:
GET /foo HTTP/1.1
my-header1: foo
my-header2: bar
my-header3: baz
-
Config:
remove: ["my-header1", "my-header3"]
-
Output:
GET /foo HTTP/1.1
my-header2: bar
@@ -4722,18 +4570,15 @@ spec:
Set overwrites the request with the given header (name, value)
before the action.
-
Input:
GET /foo HTTP/1.1
my-header: foo
-
Config:
set:
- name: "my-header"
value: "bar"
-
Output:
GET /foo HTTP/1.1
my-header: bar
@@ -4745,7 +4590,6 @@ spec:
Name is the name of the HTTP Header to be matched. Name matching MUST be
case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
-
If multiple entries specify equivalent header names, the first entry with
an equivalent name MUST be considered for a match. Subsequent entries
with an equivalent header name MUST be ignored. Due to the
@@ -4771,49 +4615,42 @@ spec:
x-kubernetes-list-type: map
type: object
requestMirror:
- description: |-
+ description: |+
RequestMirror defines a schema for a filter that mirrors requests.
Requests are sent to the specified destination, but responses from
that destination are ignored.
-
This filter can be used multiple times within the same rule. Note that
not all implementations will be able to support mirroring to multiple
backends.
-
Support: Extended
+
properties:
backendRef:
description: |-
BackendRef references a resource where mirrored requests are sent.
-
Mirrored requests must be sent only to a single destination endpoint
within this BackendRef, irrespective of how many endpoints are present
within this BackendRef.
-
If the referent cannot be found, this BackendRef is invalid and must be
dropped from the Gateway. The controller must ensure the "ResolvedRefs"
condition on the Route status is set to `status: False` and not configure
this backend in the underlying implementation.
-
If there is a cross-namespace reference to an *existing* object
that is not allowed by a ReferenceGrant, the controller must ensure the
"ResolvedRefs" condition on the Route is set to `status: False`,
with the "RefNotPermitted" reason and not configure this backend in the
underlying implementation.
-
In either error case, the Message of the `ResolvedRefs` Condition
should be used to provide more detail about the problem.
-
Support: Extended for Kubernetes Service
-
Support: Implementation-specific for any other resource
properties:
group:
@@ -4830,20 +4667,16 @@ spec:
Kind is the Kubernetes resource kind of the referent. For example
"Service".
-
Defaults to "Service" when not specified.
-
ExternalName services can refer to CNAME DNS records that may live
outside of the cluster and as such are difficult to reason about in
terms of conformance. They also may not be safe to forward to (see
CVE-2021-25740 for more information). Implementations SHOULD NOT
support ExternalName Services.
-
Support: Core (Services with a type other than ExternalName)
-
Support: Implementation-specific (Services with type ExternalName)
maxLength: 63
minLength: 1
@@ -4859,13 +4692,11 @@ spec:
Namespace is the namespace of the backend. When unspecified, the local
namespace is inferred.
-
Note that when a namespace different than the local namespace is specified,
a ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details.
-
Support: Core
maxLength: 63
minLength: 1
@@ -4888,15 +4719,54 @@ spec:
x-kubernetes-validations:
- message: Must have port for Service reference
rule: '(size(self.group) == 0 && self.kind == ''Service'') ? has(self.port) : true'
+ fraction:
+ description: |+
+ Fraction represents the fraction of requests that should be
+ mirrored to BackendRef.
+
+ Only one of Fraction or Percent may be specified. If neither field
+ is specified, 100% of requests will be mirrored.
+
+ properties:
+ denominator:
+ default: 100
+ format: int32
+ minimum: 1
+ type: integer
+ numerator:
+ format: int32
+ minimum: 0
+ type: integer
+ required:
+ - numerator
+ type: object
+ x-kubernetes-validations:
+ - message: numerator must be less than or equal to denominator
+ rule: self.numerator <= self.denominator
+ percent:
+ description: |+
+ Percent represents the percentage of requests that should be
+ mirrored to BackendRef. Its minimum value is 0 (indicating 0% of
+ requests) and its maximum value is 100 (indicating 100% of requests).
+
+ Only one of Fraction or Percent may be specified. If neither field
+ is specified, 100% of requests will be mirrored.
+
+ format: int32
+ maximum: 100
+ minimum: 0
+ type: integer
required:
- backendRef
type: object
+ x-kubernetes-validations:
+ - message: Only one of percent or fraction may be specified in HTTPRequestMirrorFilter
+ rule: '!(has(self.percent) && has(self.fraction))'
responseHeaderModifier:
description: |-
ResponseHeaderModifier defines a schema for a filter that modifies response
headers.
-
Support: Extended
properties:
add:
@@ -4905,18 +4775,15 @@ spec:
before the action. It appends to any existing values associated
with the header name.
-
Input:
GET /foo HTTP/1.1
my-header: foo
-
Config:
add:
- name: "my-header"
value: "bar,baz"
-
Output:
GET /foo HTTP/1.1
my-header: foo,bar,baz
@@ -4928,7 +4795,6 @@ spec:
Name is the name of the HTTP Header to be matched. Name matching MUST be
case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
-
If multiple entries specify equivalent header names, the first entry with
an equivalent name MUST be considered for a match. Subsequent entries
with an equivalent header name MUST be ignored. Due to the
@@ -4959,18 +4825,15 @@ spec:
names are case-insensitive (see
https://datatracker.ietf.org/doc/html/rfc2616#section-4.2).
-
Input:
GET /foo HTTP/1.1
my-header1: foo
my-header2: bar
my-header3: baz
-
Config:
remove: ["my-header1", "my-header3"]
-
Output:
GET /foo HTTP/1.1
my-header2: bar
@@ -4984,18 +4847,15 @@ spec:
Set overwrites the request with the given header (name, value)
before the action.
-
Input:
GET /foo HTTP/1.1
my-header: foo
-
Config:
set:
- name: "my-header"
value: "bar"
-
Output:
GET /foo HTTP/1.1
my-header: bar
@@ -5007,7 +4867,6 @@ spec:
Name is the name of the HTTP Header to be matched. Name matching MUST be
case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
-
If multiple entries specify equivalent header names, the first entry with
an equivalent name MUST be considered for a match. Subsequent entries
with an equivalent header name MUST be ignored. Due to the
@@ -5037,17 +4896,14 @@ spec:
Type identifies the type of filter to apply. As with other API fields,
types are classified into three conformance levels:
-
- Core: Filter types and their corresponding configuration defined by
"Support: Core" in this package, e.g. "RequestHeaderModifier". All
implementations supporting GRPCRoute MUST support core filters.
-
- Extended: Filter types and their corresponding configuration defined by
"Support: Extended" in this package, e.g. "RequestMirror". Implementers
are encouraged to support extended filters.
-
- Implementation-specific: Filters that are defined and supported by specific vendors.
In the future, filters showing convergence in behavior across multiple
implementations will be considered for inclusion in extended or core
@@ -5055,16 +4911,13 @@ spec:
is specified using the ExtensionRef field. `Type` MUST be set to
"ExtensionRef" for custom filters.
-
Implementers are encouraged to define custom implementation types to
extend the core API with implementation-specific behavior.
-
If a reference to a custom filter type cannot be resolved, the filter
MUST NOT be skipped. Instead, requests that would have been processed by
that filter MUST receive a HTTP error response.
-
enum:
- ResponseHeaderModifier
- RequestHeaderModifier
@@ -5112,20 +4965,16 @@ spec:
Kind is the Kubernetes resource kind of the referent. For example
"Service".
-
Defaults to "Service" when not specified.
-
ExternalName services can refer to CNAME DNS records that may live
outside of the cluster and as such are difficult to reason about in
terms of conformance. They also may not be safe to forward to (see
CVE-2021-25740 for more information). Implementations SHOULD NOT
support ExternalName Services.
-
Support: Core (Services with a type other than ExternalName)
-
Support: Implementation-specific (Services with type ExternalName)
maxLength: 63
minLength: 1
@@ -5141,13 +4990,11 @@ spec:
Namespace is the namespace of the backend. When unspecified, the local
namespace is inferred.
-
Note that when a namespace different than the local namespace is specified,
a ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details.
-
Support: Core
maxLength: 63
minLength: 1
@@ -5174,13 +5021,11 @@ spec:
implementation supports. Weight is not a percentage and the sum of
weights does not need to equal 100.
-
If only one backend is specified and it has a weight greater than 0, 100%
of the traffic is forwarded to that backend. If weight is set to 0, no
traffic should be forwarded for this entry. If unspecified, weight
defaults to 1.
-
Support for this field varies based on the context where used.
format: int32
maximum: 1000000
@@ -5199,32 +5044,26 @@ spec:
Filters define the filters that are applied to requests that match
this rule.
-
The effects of ordering of multiple behaviors are currently unspecified.
This can change in the future based on feedback during the alpha stage.
-
Conformance-levels at this level are defined based on the type of filter:
-
- ALL core filters MUST be supported by all implementations that support
GRPCRoute.
- Implementers are encouraged to support extended filters.
- Implementation-specific custom filters have no API guarantees across
implementations.
-
Specifying the same filter multiple times is not supported unless explicitly
indicated in the filter.
-
If an implementation can not support a combination of filters, it must clearly
document that limitation. In cases where incompatible or unsupported
filters are specified and cause the `Accepted` condition to be set to status
`False`, implementations may use the `IncompatibleFilters` reason to specify
this configuration error.
-
Support: Core
items:
description: |-
@@ -5242,10 +5081,8 @@ spec:
"networking.example.net"). ExtensionRef MUST NOT be used for core and
extended filters.
-
Support: Implementation-specific
-
This filter can be used multiple times within the same rule.
properties:
group:
@@ -5276,7 +5113,6 @@ spec:
RequestHeaderModifier defines a schema for a filter that modifies request
headers.
-
Support: Core
properties:
add:
@@ -5285,18 +5121,15 @@ spec:
before the action. It appends to any existing values associated
with the header name.
-
Input:
GET /foo HTTP/1.1
my-header: foo
-
Config:
add:
- name: "my-header"
value: "bar,baz"
-
Output:
GET /foo HTTP/1.1
my-header: foo,bar,baz
@@ -5308,7 +5141,6 @@ spec:
Name is the name of the HTTP Header to be matched. Name matching MUST be
case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
-
If multiple entries specify equivalent header names, the first entry with
an equivalent name MUST be considered for a match. Subsequent entries
with an equivalent header name MUST be ignored. Due to the
@@ -5339,18 +5171,15 @@ spec:
names are case-insensitive (see
https://datatracker.ietf.org/doc/html/rfc2616#section-4.2).
-
Input:
GET /foo HTTP/1.1
my-header1: foo
my-header2: bar
my-header3: baz
-
Config:
remove: ["my-header1", "my-header3"]
-
Output:
GET /foo HTTP/1.1
my-header2: bar
@@ -5364,18 +5193,15 @@ spec:
Set overwrites the request with the given header (name, value)
before the action.
-
Input:
GET /foo HTTP/1.1
my-header: foo
-
Config:
set:
- name: "my-header"
value: "bar"
-
Output:
GET /foo HTTP/1.1
my-header: bar
@@ -5387,7 +5213,6 @@ spec:
Name is the name of the HTTP Header to be matched. Name matching MUST be
case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
-
If multiple entries specify equivalent header names, the first entry with
an equivalent name MUST be considered for a match. Subsequent entries
with an equivalent header name MUST be ignored. Due to the
@@ -5413,49 +5238,42 @@ spec:
x-kubernetes-list-type: map
type: object
requestMirror:
- description: |-
+ description: |+
RequestMirror defines a schema for a filter that mirrors requests.
Requests are sent to the specified destination, but responses from
that destination are ignored.
-
This filter can be used multiple times within the same rule. Note that
not all implementations will be able to support mirroring to multiple
backends.
-
Support: Extended
+
properties:
backendRef:
description: |-
BackendRef references a resource where mirrored requests are sent.
-
Mirrored requests must be sent only to a single destination endpoint
within this BackendRef, irrespective of how many endpoints are present
within this BackendRef.
-
If the referent cannot be found, this BackendRef is invalid and must be
dropped from the Gateway. The controller must ensure the "ResolvedRefs"
condition on the Route status is set to `status: False` and not configure
this backend in the underlying implementation.
-
If there is a cross-namespace reference to an *existing* object
that is not allowed by a ReferenceGrant, the controller must ensure the
"ResolvedRefs" condition on the Route is set to `status: False`,
with the "RefNotPermitted" reason and not configure this backend in the
underlying implementation.
-
In either error case, the Message of the `ResolvedRefs` Condition
should be used to provide more detail about the problem.
-
Support: Extended for Kubernetes Service
-
Support: Implementation-specific for any other resource
properties:
group:
@@ -5472,20 +5290,16 @@ spec:
Kind is the Kubernetes resource kind of the referent. For example
"Service".
-
Defaults to "Service" when not specified.
-
ExternalName services can refer to CNAME DNS records that may live
outside of the cluster and as such are difficult to reason about in
terms of conformance. They also may not be safe to forward to (see
CVE-2021-25740 for more information). Implementations SHOULD NOT
support ExternalName Services.
-
Support: Core (Services with a type other than ExternalName)
-
Support: Implementation-specific (Services with type ExternalName)
maxLength: 63
minLength: 1
@@ -5501,13 +5315,11 @@ spec:
Namespace is the namespace of the backend. When unspecified, the local
namespace is inferred.
-
Note that when a namespace different than the local namespace is specified,
a ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details.
-
Support: Core
maxLength: 63
minLength: 1
@@ -5530,15 +5342,54 @@ spec:
x-kubernetes-validations:
- message: Must have port for Service reference
rule: '(size(self.group) == 0 && self.kind == ''Service'') ? has(self.port) : true'
+ fraction:
+ description: |+
+ Fraction represents the fraction of requests that should be
+ mirrored to BackendRef.
+
+ Only one of Fraction or Percent may be specified. If neither field
+ is specified, 100% of requests will be mirrored.
+
+ properties:
+ denominator:
+ default: 100
+ format: int32
+ minimum: 1
+ type: integer
+ numerator:
+ format: int32
+ minimum: 0
+ type: integer
+ required:
+ - numerator
+ type: object
+ x-kubernetes-validations:
+ - message: numerator must be less than or equal to denominator
+ rule: self.numerator <= self.denominator
+ percent:
+ description: |+
+ Percent represents the percentage of requests that should be
+ mirrored to BackendRef. Its minimum value is 0 (indicating 0% of
+ requests) and its maximum value is 100 (indicating 100% of requests).
+
+ Only one of Fraction or Percent may be specified. If neither field
+ is specified, 100% of requests will be mirrored.
+
+ format: int32
+ maximum: 100
+ minimum: 0
+ type: integer
required:
- backendRef
type: object
+ x-kubernetes-validations:
+ - message: Only one of percent or fraction may be specified in HTTPRequestMirrorFilter
+ rule: '!(has(self.percent) && has(self.fraction))'
responseHeaderModifier:
description: |-
ResponseHeaderModifier defines a schema for a filter that modifies response
headers.
-
Support: Extended
properties:
add:
@@ -5547,18 +5398,15 @@ spec:
before the action. It appends to any existing values associated
with the header name.
-
Input:
GET /foo HTTP/1.1
my-header: foo
-
Config:
add:
- name: "my-header"
value: "bar,baz"
-
Output:
GET /foo HTTP/1.1
my-header: foo,bar,baz
@@ -5570,7 +5418,6 @@ spec:
Name is the name of the HTTP Header to be matched. Name matching MUST be
case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
-
If multiple entries specify equivalent header names, the first entry with
an equivalent name MUST be considered for a match. Subsequent entries
with an equivalent header name MUST be ignored. Due to the
@@ -5601,18 +5448,15 @@ spec:
names are case-insensitive (see
https://datatracker.ietf.org/doc/html/rfc2616#section-4.2).
-
Input:
GET /foo HTTP/1.1
my-header1: foo
my-header2: bar
my-header3: baz
-
Config:
remove: ["my-header1", "my-header3"]
-
Output:
GET /foo HTTP/1.1
my-header2: bar
@@ -5626,18 +5470,15 @@ spec:
Set overwrites the request with the given header (name, value)
before the action.
-
Input:
GET /foo HTTP/1.1
my-header: foo
-
Config:
set:
- name: "my-header"
value: "bar"
-
Output:
GET /foo HTTP/1.1
my-header: bar
@@ -5649,7 +5490,6 @@ spec:
Name is the name of the HTTP Header to be matched. Name matching MUST be
case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
-
If multiple entries specify equivalent header names, the first entry with
an equivalent name MUST be considered for a match. Subsequent entries
with an equivalent header name MUST be ignored. Due to the
@@ -5679,17 +5519,14 @@ spec:
Type identifies the type of filter to apply. As with other API fields,
types are classified into three conformance levels:
-
- Core: Filter types and their corresponding configuration defined by
"Support: Core" in this package, e.g. "RequestHeaderModifier". All
implementations supporting GRPCRoute MUST support core filters.
-
- Extended: Filter types and their corresponding configuration defined by
"Support: Extended" in this package, e.g. "RequestMirror". Implementers
are encouraged to support extended filters.
-
- Implementation-specific: Filters that are defined and supported by specific vendors.
In the future, filters showing convergence in behavior across multiple
implementations will be considered for inclusion in extended or core
@@ -5697,16 +5534,13 @@ spec:
is specified using the ExtensionRef field. `Type` MUST be set to
"ExtensionRef" for custom filters.
-
Implementers are encouraged to define custom implementation types to
extend the core API with implementation-specific behavior.
-
If a reference to a custom filter type cannot be resolved, the filter
MUST NOT be skipped. Instead, requests that would have been processed by
that filter MUST receive a HTTP error response.
-
enum:
- ResponseHeaderModifier
- RequestHeaderModifier
@@ -5746,10 +5580,8 @@ spec:
gRPC requests. Each match is independent, i.e. this rule will be matched
if **any** one of the matches is satisfied.
-
For example, take the following matches configuration:
-
```
matches:
- method:
@@ -5761,44 +5593,35 @@ spec:
service: foo.bar.v2
```
-
For a request to match against this rule, it MUST satisfy
EITHER of the two conditions:
-
- service of foo.bar AND contains the header `version: 2`
- service of foo.bar.v2
-
See the documentation for GRPCRouteMatch on how to specify multiple
match conditions to be ANDed together.
-
If no matches are specified, the implementation MUST match every gRPC request.
-
Proxy or Load Balancer routing configuration generated from GRPCRoutes
MUST prioritize rules based on the following criteria, continuing on
ties. Merging MUST not be done between GRPCRoutes and HTTPRoutes.
Precedence MUST be given to the rule with the largest number of:
-
* Characters in a matching non-wildcard hostname.
* Characters in a matching hostname.
* Characters in a matching service.
* Characters in a matching method.
* Header matches.
-
If ties still exist across multiple Routes, matching precedence MUST be
determined in order of the following criteria, continuing on ties:
-
* The oldest Route based on creation timestamp.
* The Route appearing first in alphabetical order by
"{namespace}/{name}".
-
If ties still exist within the Route that has been given precedence,
matching precedence MUST be granted to the first matching rule meeting
the above criteria.
@@ -5808,11 +5631,9 @@ spec:
action. Multiple match types are ANDed together, i.e. the match will
evaluate to true only if all conditions are satisfied.
-
For example, the match below will match a gRPC request only if its service
is `foo` AND it contains the `version: v1` header:
-
```
matches:
- method:
@@ -5822,7 +5643,6 @@ spec:
- name: "version"
value "v1"
-
```
properties:
headers:
@@ -5839,7 +5659,6 @@ spec:
description: |-
Name is the name of the gRPC Header to be matched.
-
If multiple entries specify equivalent header names, only the first
entry with an equivalent name MUST be considered for a match. Subsequent
entries with an equivalent header name MUST be ignored. Due to the
@@ -5880,7 +5699,6 @@ spec:
Value of the method to match against. If left empty or omitted, will
match all services.
-
At least one of Service and Method MUST be a non-empty string.
maxLength: 1024
type: string
@@ -5889,7 +5707,6 @@ spec:
Value of the service to match against. If left empty or omitted, will
match any service.
-
At least one of Service and Method MUST be a non-empty string.
maxLength: 1024
type: string
@@ -5899,10 +5716,8 @@ spec:
Type specifies how to match against the service and/or method.
Support: Core (Exact with service and method specified)
-
Support: Implementation-specific (Exact with method specified but no service specified)
-
Support: Implementation-specific (RegularExpression)
enum:
- Exact
@@ -5919,15 +5734,22 @@ spec:
type: object
maxItems: 8
type: array
+ name:
+ description: |
+ Name is the name of the route rule. This name MUST be unique within a Route if it is set.
+
+ Support: Extended
+ maxLength: 253
+ minLength: 1
+ pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
+ type: string
sessionPersistence:
description: |+
SessionPersistence defines and configures session persistence
for the route rule.
-
Support: Extended
-
properties:
absoluteTimeout:
description: |-
@@ -5935,7 +5757,6 @@ spec:
session. Once the AbsoluteTimeout duration has elapsed, the
session becomes invalid.
-
Support: Extended
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
@@ -5944,7 +5765,6 @@ spec:
CookieConfig provides configuration settings that are specific
to cookie-based session persistence.
-
Support: Core
properties:
lifetimeType:
@@ -5956,20 +5776,16 @@ spec:
attributes, while a session cookie is deleted when the current
session ends.
-
When set to "Permanent", AbsoluteTimeout indicates the
cookie's lifetime via the Expires or Max-Age cookie attributes
and is required.
-
When set to "Session", AbsoluteTimeout indicates the
absolute lifetime of the cookie tracked by the gateway and
is optional.
-
Support: Core for "Session" type
-
Support: Extended for "Permanent" type
enum:
- Permanent
@@ -5982,7 +5798,6 @@ spec:
Once the session has been idle for more than the specified
IdleTimeout duration, the session becomes invalid.
-
Support: Extended
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
@@ -5993,7 +5808,6 @@ spec:
should avoid reusing session names to prevent unintended
consequences, such as rejection or unpredictable behavior.
-
Support: Implementation-specific
maxLength: 128
type: string
@@ -6004,10 +5818,8 @@ spec:
the use a header or cookie. Defaults to cookie based session
persistence.
-
Support: Core for "Cookie" type
-
Support: Extended for "Header" type
enum:
- Cookie
@@ -6016,10 +5828,15 @@ spec:
type: object
x-kubernetes-validations:
- message: AbsoluteTimeout must be specified when cookie lifetimeType is Permanent
- rule: '!has(self.cookieConfig.lifetimeType) || self.cookieConfig.lifetimeType != ''Permanent'' || has(self.absoluteTimeout)'
+ rule: '!has(self.cookieConfig) || !has(self.cookieConfig.lifetimeType) || self.cookieConfig.lifetimeType != ''Permanent'' || has(self.absoluteTimeout)'
type: object
maxItems: 16
type: array
+ x-kubernetes-validations:
+ - message: While 16 rules and 64 matches per rule are allowed, the total number of matches across all rules in a route must be less than 128
+ rule: '(self.size() > 0 ? (has(self[0].matches) ? self[0].matches.size() : 0) : 0) + (self.size() > 1 ? (has(self[1].matches) ? self[1].matches.size() : 0) : 0) + (self.size() > 2 ? (has(self[2].matches) ? self[2].matches.size() : 0) : 0) + (self.size() > 3 ? (has(self[3].matches) ? self[3].matches.size() : 0) : 0) + (self.size() > 4 ? (has(self[4].matches) ? self[4].matches.size() : 0) : 0) + (self.size() > 5 ? (has(self[5].matches) ? self[5].matches.size() : 0) : 0) + (self.size() > 6 ? (has(self[6].matches) ? self[6].matches.size() : 0) : 0) + (self.size() > 7 ? (has(self[7].matches) ? self[7].matches.size() : 0) : 0) + (self.size() > 8 ? (has(self[8].matches) ? self[8].matches.size() : 0) : 0) + (self.size() > 9 ? (has(self[9].matches) ? self[9].matches.size() : 0) : 0) + (self.size() > 10 ? (has(self[10].matches) ? self[10].matches.size() : 0) : 0) + (self.size() > 11 ? (has(self[11].matches) ? self[11].matches.size() : 0) : 0) + (self.size() > 12 ? (has(self[12].matches) ? self[12].matches.size() : 0) : 0) + (self.size() > 13 ? (has(self[13].matches) ? self[13].matches.size() : 0) : 0) + (self.size() > 14 ? (has(self[14].matches) ? self[14].matches.size() : 0) : 0) + (self.size() > 15 ? (has(self[15].matches) ? self[15].matches.size() : 0) : 0) <= 128'
+ - message: Rule name must be unique within the route
+ rule: self.all(l1, !has(l1.name) || self.exists_one(l2, has(l2.name) && l1.name == l2.name))
type: object
status:
description: Status defines the current state of GRPCRoute.
@@ -6033,13 +5850,11 @@ spec:
first sees the route and should update the entry as appropriate when the
route or gateway is modified.
-
Note that parent references that cannot be resolved by an implementation
of this API will not be added to this list. Implementations of this API
can only populate Route status for the Gateways/parent resources they are
responsible for.
-
A maximum of 32 Gateways will be represented in this list. An empty list
means the route has not been attached to any Gateway.
items:
@@ -6053,27 +5868,23 @@ spec:
Note that the route's availability is also subject to the Gateway's own
status conditions and listener status.
-
If the Route's ParentRef specifies an existing Gateway that supports
Routes of this kind AND that Gateway's controller has sufficient access,
then that Gateway's controller MUST set the "Accepted" condition on the
Route, to indicate whether the route has been accepted or rejected by the
Gateway, and why.
-
A Route MUST be considered "Accepted" if at least one of the Route's
rules is implemented by the Gateway.
-
There are a number of cases where the "Accepted" condition may not be set
due to lack of controller visibility, that includes when:
-
* The Route refers to a non-existent parent.
* The Route is of a type that the controller does not support.
* The Route is in a namespace the controller does not have access to.
items:
- description: "Condition contains details for one aspect of the current state of this API Resource.\n---\nThis struct is intended for direct use as an array at the field path .status.conditions. For example,\n\n\n\ttype FooStatus struct{\n\t // Represents the observations of a foo's current state.\n\t // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\"\n\t // +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t // other fields\n\t}"
+ description: Condition contains details for one aspect of the current state of this API Resource.
properties:
lastTransitionTime:
description: |-
@@ -6114,12 +5925,7 @@ spec:
- Unknown
type: string
type:
- description: |-
- type of condition in CamelCase or in foo.example.com/CamelCase.
- ---
- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
- useful (see .node.status.conditions), the ability to deconflict is important.
- The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
+ description: type of condition in CamelCase or in foo.example.com/CamelCase.
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
@@ -6142,15 +5948,12 @@ spec:
controller that wrote this status. This corresponds with the
controllerName field on GatewayClass.
-
Example: "example.net/gateway-controller".
-
The format of this field is DOMAIN "/" PATH, where DOMAIN and PATH are
valid Kubernetes names
(https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
-
Controllers MUST populate this field when writing status. Controllers should ensure that
entries to status populated with their ControllerName are cleaned up when they are no
longer necessary.
@@ -6171,7 +5974,6 @@ spec:
To set the core API group (such as for a "Service" kind referent),
Group must be explicitly set to "" (empty string).
-
Support: Core
maxLength: 253
pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
@@ -6181,14 +5983,11 @@ spec:
description: |-
Kind is kind of the referent.
-
There are two kinds of parent resources with "Core" support:
-
* Gateway (Gateway conformance profile)
* Service (Mesh conformance profile, ClusterIP Services only)
-
Support for other resources is Implementation-Specific.
maxLength: 63
minLength: 1
@@ -6198,7 +5997,6 @@ spec:
description: |-
Name is the name of the referent.
-
Support: Core
maxLength: 253
minLength: 1
@@ -6208,7 +6006,6 @@ spec:
Namespace is the namespace of the referent. When unspecified, this refers
to the local namespace of the Route.
-
Note that there are specific rules for ParentRefs which cross namespace
boundaries. Cross-namespace references are only valid if they are explicitly
allowed by something in the namespace they are referring to. For example:
@@ -6216,12 +6013,10 @@ spec:
generic way to enable any other kind of cross-namespace reference.
-
ParentRefs from a Route to a Service in the same namespace are "producer"
routes, which apply default routing rules to inbound connections from
any namespace to the Service.
-
ParentRefs from a Route to a Service in a different namespace are
"consumer" routes, and these routing rules are only applied to outbound
connections originating from the same namespace as the Route, for which
@@ -6229,7 +6024,6 @@ spec:
ParentRef of the Route.
-
Support: Core
maxLength: 63
minLength: 1
@@ -6240,7 +6034,6 @@ spec:
Port is the network port this Route targets. It can be interpreted
differently based on the type of parent resource.
-
When the parent resource is a Gateway, this targets all listeners
listening on the specified port that also support this kind of Route(and
select this Route). It's not recommended to set `Port` unless the
@@ -6250,18 +6043,15 @@ spec:
must match both specified values.
-
When the parent resource is a Service, this targets a specific port in the
Service spec. When both Port (experimental) and SectionName are specified,
the name and port of the selected port must match both specified values.
-
Implementations MAY choose to support other parent resources.
Implementations supporting other types of parent resources MUST clearly
document how/if Port is interpreted.
-
For the purpose of status, an attachment is considered successful as
long as the parent resource accepts it partially. For example, Gateway
listeners can restrict which Routes can attach to them by Route kind,
@@ -6270,7 +6060,6 @@ spec:
attached. If no Gateway listeners accept attachment from this Route,
the Route MUST be considered detached from the Gateway.
-
Support: Extended
format: int32
maximum: 65535
@@ -6281,7 +6070,6 @@ spec:
SectionName is the name of a section within the target resource. In the
following resources, SectionName is interpreted as the following:
-
* Gateway: Listener name. When both Port (experimental) and SectionName
are specified, the name and port of the selected listener must match
both specified values.
@@ -6289,12 +6077,10 @@ spec:
are specified, the name and port of the selected listener must match
both specified values.
-
Implementations MAY choose to support attaching Routes to other resources.
If that is the case, they MUST clearly document how SectionName is
interpreted.
-
When unspecified (empty string), this will reference the entire resource.
For the purpose of status, an attachment is considered successful if at
least one section in the parent resource accepts it. For example, Gateway
@@ -6304,7 +6090,6 @@ spec:
attached. If no Gateway listeners accept attachment from this Route, the
Route MUST be considered detached from the Gateway.
-
Support: Core
maxLength: 253
minLength: 1
@@ -6327,2234 +6112,6 @@ spec:
storage: true
subresources:
status: {}
- - deprecated: true
- deprecationWarning: The v1alpha2 version of GRPCRoute has been deprecated and will be removed in a future release of the API. Please upgrade to v1.
- name: v1alpha2
- schema:
- openAPIV3Schema:
- description: |-
- GRPCRoute provides a way to route gRPC requests. This includes the capability
- to match requests by hostname, gRPC service, gRPC method, or HTTP/2 header.
- Filters can be used to specify additional processing steps. Backends specify
- where matching requests will be routed.
-
-
- GRPCRoute falls under extended support within the Gateway API. Within the
- following specification, the word "MUST" indicates that an implementation
- supporting GRPCRoute must conform to the indicated requirement, but an
- implementation not supporting this route type need not follow the requirement
- unless explicitly indicated.
-
-
- Implementations supporting `GRPCRoute` with the `HTTPS` `ProtocolType` MUST
- accept HTTP/2 connections without an initial upgrade from HTTP/1.1, i.e. via
- ALPN. If the implementation does not support this, then it MUST set the
- "Accepted" condition to "False" for the affected listener with a reason of
- "UnsupportedProtocol". Implementations MAY also accept HTTP/2 connections
- with an upgrade from HTTP/1.
-
-
- Implementations supporting `GRPCRoute` with the `HTTP` `ProtocolType` MUST
- support HTTP/2 over cleartext TCP (h2c,
- https://www.rfc-editor.org/rfc/rfc7540#section-3.1) without an initial
- upgrade from HTTP/1.1, i.e. with prior knowledge
- (https://www.rfc-editor.org/rfc/rfc7540#section-3.4). If the implementation
- does not support this, then it MUST set the "Accepted" condition to "False"
- for the affected listener with a reason of "UnsupportedProtocol".
- Implementations MAY also accept HTTP/2 connections with an upgrade from
- HTTP/1, i.e. without prior knowledge.
- properties:
- apiVersion:
- description: |-
- APIVersion defines the versioned schema of this representation of an object.
- Servers should convert recognized schemas to the latest internal value, and
- may reject unrecognized values.
- More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- type: string
- kind:
- description: |-
- Kind is a string value representing the REST resource this object represents.
- Servers may infer this from the endpoint the client submits requests to.
- Cannot be updated.
- In CamelCase.
- More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- type: string
- metadata:
- type: object
- spec:
- description: Spec defines the desired state of GRPCRoute.
- properties:
- hostnames:
- description: |-
- Hostnames defines a set of hostnames to match against the GRPC
- Host header to select a GRPCRoute to process the request. This matches
- the RFC 1123 definition of a hostname with 2 notable exceptions:
-
-
- 1. IPs are not allowed.
- 2. A hostname may be prefixed with a wildcard label (`*.`). The wildcard
- label MUST appear by itself as the first label.
-
-
- If a hostname is specified by both the Listener and GRPCRoute, there
- MUST be at least one intersecting hostname for the GRPCRoute to be
- attached to the Listener. For example:
-
-
- * A Listener with `test.example.com` as the hostname matches GRPCRoutes
- that have either not specified any hostnames, or have specified at
- least one of `test.example.com` or `*.example.com`.
- * A Listener with `*.example.com` as the hostname matches GRPCRoutes
- that have either not specified any hostnames or have specified at least
- one hostname that matches the Listener hostname. For example,
- `test.example.com` and `*.example.com` would both match. On the other
- hand, `example.com` and `test.example.net` would not match.
-
-
- Hostnames that are prefixed with a wildcard label (`*.`) are interpreted
- as a suffix match. That means that a match for `*.example.com` would match
- both `test.example.com`, and `foo.test.example.com`, but not `example.com`.
-
-
- If both the Listener and GRPCRoute have specified hostnames, any
- GRPCRoute hostnames that do not match the Listener hostname MUST be
- ignored. For example, if a Listener specified `*.example.com`, and the
- GRPCRoute specified `test.example.com` and `test.example.net`,
- `test.example.net` MUST NOT be considered for a match.
-
-
- If both the Listener and GRPCRoute have specified hostnames, and none
- match with the criteria above, then the GRPCRoute MUST NOT be accepted by
- the implementation. The implementation MUST raise an 'Accepted' Condition
- with a status of `False` in the corresponding RouteParentStatus.
-
-
- If a Route (A) of type HTTPRoute or GRPCRoute is attached to a
- Listener and that listener already has another Route (B) of the other
- type attached and the intersection of the hostnames of A and B is
- non-empty, then the implementation MUST accept exactly one of these two
- routes, determined by the following criteria, in order:
-
-
- * The oldest Route based on creation timestamp.
- * The Route appearing first in alphabetical order by
- "{namespace}/{name}".
-
-
- The rejected Route MUST raise an 'Accepted' condition with a status of
- 'False' in the corresponding RouteParentStatus.
-
-
- Support: Core
- items:
- description: |-
- Hostname is the fully qualified domain name of a network host. This matches
- the RFC 1123 definition of a hostname with 2 notable exceptions:
-
-
- 1. IPs are not allowed.
- 2. A hostname may be prefixed with a wildcard label (`*.`). The wildcard
- label must appear by itself as the first label.
-
-
- Hostname can be "precise" which is a domain name without the terminating
- dot of a network host (e.g. "foo.example.com") or "wildcard", which is a
- domain name prefixed with a single wildcard label (e.g. `*.example.com`).
-
-
- Note that as per RFC1035 and RFC1123, a *label* must consist of lower case
- alphanumeric characters or '-', and must start and end with an alphanumeric
- character. No other punctuation is allowed.
- maxLength: 253
- minLength: 1
- pattern: ^(\*\.)?[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
- type: string
- maxItems: 16
- type: array
- parentRefs:
- description: |+
- ParentRefs references the resources (usually Gateways) that a Route wants
- to be attached to. Note that the referenced parent resource needs to
- allow this for the attachment to be complete. For Gateways, that means
- the Gateway needs to allow attachment from Routes of this kind and
- namespace. For Services, that means the Service must either be in the same
- namespace for a "producer" route, or the mesh implementation must support
- and allow "consumer" routes for the referenced Service. ReferenceGrant is
- not applicable for governing ParentRefs to Services - it is not possible to
- create a "producer" route for a Service in a different namespace from the
- Route.
-
-
- There are two kinds of parent resources with "Core" support:
-
-
- * Gateway (Gateway conformance profile)
- * Service (Mesh conformance profile, ClusterIP Services only)
-
-
- This API may be extended in the future to support additional kinds of parent
- resources.
-
-
- ParentRefs must be _distinct_. This means either that:
-
-
- * They select different objects. If this is the case, then parentRef
- entries are distinct. In terms of fields, this means that the
- multi-part key defined by `group`, `kind`, `namespace`, and `name` must
- be unique across all parentRef entries in the Route.
- * They do not select different objects, but for each optional field used,
- each ParentRef that selects the same object must set the same set of
- optional fields to different values. If one ParentRef sets a
- combination of optional fields, all must set the same combination.
-
-
- Some examples:
-
-
- * If one ParentRef sets `sectionName`, all ParentRefs referencing the
- same object must also set `sectionName`.
- * If one ParentRef sets `port`, all ParentRefs referencing the same
- object must also set `port`.
- * If one ParentRef sets `sectionName` and `port`, all ParentRefs
- referencing the same object must also set `sectionName` and `port`.
-
-
- It is possible to separately reference multiple distinct objects that may
- be collapsed by an implementation. For example, some implementations may
- choose to merge compatible Gateway Listeners together. If that is the
- case, the list of routes attached to those resources should also be
- merged.
-
-
- Note that for ParentRefs that cross namespace boundaries, there are specific
- rules. Cross-namespace references are only valid if they are explicitly
- allowed by something in the namespace they are referring to. For example,
- Gateway has the AllowedRoutes field, and ReferenceGrant provides a
- generic way to enable other kinds of cross-namespace reference.
-
-
-
- ParentRefs from a Route to a Service in the same namespace are "producer"
- routes, which apply default routing rules to inbound connections from
- any namespace to the Service.
-
-
- ParentRefs from a Route to a Service in a different namespace are
- "consumer" routes, and these routing rules are only applied to outbound
- connections originating from the same namespace as the Route, for which
- the intended destination of the connections are a Service targeted as a
- ParentRef of the Route.
-
-
-
-
-
-
- items:
- description: |-
- ParentReference identifies an API object (usually a Gateway) that can be considered
- a parent of this resource (usually a route). There are two kinds of parent resources
- with "Core" support:
-
-
- * Gateway (Gateway conformance profile)
- * Service (Mesh conformance profile, ClusterIP Services only)
-
-
- This API may be extended in the future to support additional kinds of parent
- resources.
-
-
- The API object must be valid in the cluster; the Group and Kind must
- be registered in the cluster for this reference to be valid.
- properties:
- group:
- default: gateway.networking.k8s.io
- description: |-
- Group is the group of the referent.
- When unspecified, "gateway.networking.k8s.io" is inferred.
- To set the core API group (such as for a "Service" kind referent),
- Group must be explicitly set to "" (empty string).
-
-
- Support: Core
- maxLength: 253
- pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
- type: string
- kind:
- default: Gateway
- description: |-
- Kind is kind of the referent.
-
-
- There are two kinds of parent resources with "Core" support:
-
-
- * Gateway (Gateway conformance profile)
- * Service (Mesh conformance profile, ClusterIP Services only)
-
-
- Support for other resources is Implementation-Specific.
- maxLength: 63
- minLength: 1
- pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$
- type: string
- name:
- description: |-
- Name is the name of the referent.
-
-
- Support: Core
- maxLength: 253
- minLength: 1
- type: string
- namespace:
- description: |-
- Namespace is the namespace of the referent. When unspecified, this refers
- to the local namespace of the Route.
-
-
- Note that there are specific rules for ParentRefs which cross namespace
- boundaries. Cross-namespace references are only valid if they are explicitly
- allowed by something in the namespace they are referring to. For example:
- Gateway has the AllowedRoutes field, and ReferenceGrant provides a
- generic way to enable any other kind of cross-namespace reference.
-
-
-
- ParentRefs from a Route to a Service in the same namespace are "producer"
- routes, which apply default routing rules to inbound connections from
- any namespace to the Service.
-
-
- ParentRefs from a Route to a Service in a different namespace are
- "consumer" routes, and these routing rules are only applied to outbound
- connections originating from the same namespace as the Route, for which
- the intended destination of the connections are a Service targeted as a
- ParentRef of the Route.
-
-
-
- Support: Core
- maxLength: 63
- minLength: 1
- pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
- type: string
- port:
- description: |-
- Port is the network port this Route targets. It can be interpreted
- differently based on the type of parent resource.
-
-
- When the parent resource is a Gateway, this targets all listeners
- listening on the specified port that also support this kind of Route(and
- select this Route). It's not recommended to set `Port` unless the
- networking behaviors specified in a Route must apply to a specific port
- as opposed to a listener(s) whose port(s) may be changed. When both Port
- and SectionName are specified, the name and port of the selected listener
- must match both specified values.
-
-
-
- When the parent resource is a Service, this targets a specific port in the
- Service spec. When both Port (experimental) and SectionName are specified,
- the name and port of the selected port must match both specified values.
-
-
-
- Implementations MAY choose to support other parent resources.
- Implementations supporting other types of parent resources MUST clearly
- document how/if Port is interpreted.
-
-
- For the purpose of status, an attachment is considered successful as
- long as the parent resource accepts it partially. For example, Gateway
- listeners can restrict which Routes can attach to them by Route kind,
- namespace, or hostname. If 1 of 2 Gateway listeners accept attachment
- from the referencing Route, the Route MUST be considered successfully
- attached. If no Gateway listeners accept attachment from this Route,
- the Route MUST be considered detached from the Gateway.
-
-
- Support: Extended
- format: int32
- maximum: 65535
- minimum: 1
- type: integer
- sectionName:
- description: |-
- SectionName is the name of a section within the target resource. In the
- following resources, SectionName is interpreted as the following:
-
-
- * Gateway: Listener name. When both Port (experimental) and SectionName
- are specified, the name and port of the selected listener must match
- both specified values.
- * Service: Port name. When both Port (experimental) and SectionName
- are specified, the name and port of the selected listener must match
- both specified values.
-
-
- Implementations MAY choose to support attaching Routes to other resources.
- If that is the case, they MUST clearly document how SectionName is
- interpreted.
-
-
- When unspecified (empty string), this will reference the entire resource.
- For the purpose of status, an attachment is considered successful if at
- least one section in the parent resource accepts it. For example, Gateway
- listeners can restrict which Routes can attach to them by Route kind,
- namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from
- the referencing Route, the Route MUST be considered successfully
- attached. If no Gateway listeners accept attachment from this Route, the
- Route MUST be considered detached from the Gateway.
-
-
- Support: Core
- maxLength: 253
- minLength: 1
- pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
- type: string
- required:
- - name
- type: object
- maxItems: 32
- type: array
- x-kubernetes-validations:
- - message: sectionName or port must be specified when parentRefs includes 2 or more references to the same parent
- rule: 'self.all(p1, self.all(p2, p1.group == p2.group && p1.kind == p2.kind && p1.name == p2.name && (((!has(p1.__namespace__) || p1.__namespace__ == '''') && (!has(p2.__namespace__) || p2.__namespace__ == '''')) || (has(p1.__namespace__) && has(p2.__namespace__) && p1.__namespace__ == p2.__namespace__)) ? ((!has(p1.sectionName) || p1.sectionName == '''') == (!has(p2.sectionName) || p2.sectionName == '''') && (!has(p1.port) || p1.port == 0) == (!has(p2.port) || p2.port == 0)): true))'
- - message: sectionName or port must be unique when parentRefs includes 2 or more references to the same parent
- rule: self.all(p1, self.exists_one(p2, p1.group == p2.group && p1.kind == p2.kind && p1.name == p2.name && (((!has(p1.__namespace__) || p1.__namespace__ == '') && (!has(p2.__namespace__) || p2.__namespace__ == '')) || (has(p1.__namespace__) && has(p2.__namespace__) && p1.__namespace__ == p2.__namespace__ )) && (((!has(p1.sectionName) || p1.sectionName == '') && (!has(p2.sectionName) || p2.sectionName == '')) || ( has(p1.sectionName) && has(p2.sectionName) && p1.sectionName == p2.sectionName)) && (((!has(p1.port) || p1.port == 0) && (!has(p2.port) || p2.port == 0)) || (has(p1.port) && has(p2.port) && p1.port == p2.port))))
- rules:
- description: Rules are a list of GRPC matchers, filters and actions.
- items:
- description: |-
- GRPCRouteRule defines the semantics for matching a gRPC request based on
- conditions (matches), processing it (filters), and forwarding the request to
- an API object (backendRefs).
- properties:
- backendRefs:
- description: |-
- BackendRefs defines the backend(s) where matching requests should be
- sent.
-
-
- Failure behavior here depends on how many BackendRefs are specified and
- how many are invalid.
-
-
- If *all* entries in BackendRefs are invalid, and there are also no filters
- specified in this route rule, *all* traffic which matches this rule MUST
- receive an `UNAVAILABLE` status.
-
-
- See the GRPCBackendRef definition for the rules about what makes a single
- GRPCBackendRef invalid.
-
-
- When a GRPCBackendRef is invalid, `UNAVAILABLE` statuses MUST be returned for
- requests that would have otherwise been routed to an invalid backend. If
- multiple backends are specified, and some are invalid, the proportion of
- requests that would otherwise have been routed to an invalid backend
- MUST receive an `UNAVAILABLE` status.
-
-
- For example, if two backends are specified with equal weights, and one is
- invalid, 50 percent of traffic MUST receive an `UNAVAILABLE` status.
- Implementations may choose how that 50 percent is determined.
-
-
- Support: Core for Kubernetes Service
-
-
- Support: Implementation-specific for any other resource
-
-
- Support for weight: Core
- items:
- description: |-
- GRPCBackendRef defines how a GRPCRoute forwards a gRPC request.
-
-
- Note that when a namespace different than the local namespace is specified, a
- ReferenceGrant object is required in the referent namespace to allow that
- namespace's owner to accept the reference. See the ReferenceGrant
- documentation for details.
-
-
-
-
-
- When the BackendRef points to a Kubernetes Service, implementations SHOULD
- honor the appProtocol field if it is set for the target Service Port.
-
-
- Implementations supporting appProtocol SHOULD recognize the Kubernetes
- Standard Application Protocols defined in KEP-3726.
-
-
- If a Service appProtocol isn't specified, an implementation MAY infer the
- backend protocol through its own means. Implementations MAY infer the
- protocol from the Route type referring to the backend Service.
-
-
- If a Route is not able to send traffic to the backend using the specified
- protocol then the backend is considered invalid. Implementations MUST set the
- "ResolvedRefs" condition to "False" with the "UnsupportedProtocol" reason.
-
-
-
- properties:
- filters:
- description: |-
- Filters defined at this level MUST be executed if and only if the
- request is being forwarded to the backend defined here.
-
-
- Support: Implementation-specific (For broader support of filters, use the
- Filters field in GRPCRouteRule.)
- items:
- description: |-
- GRPCRouteFilter defines processing steps that must be completed during the
- request or response lifecycle. GRPCRouteFilters are meant as an extension
- point to express processing that may be done in Gateway implementations. Some
- examples include request or response modification, implementing
- authentication strategies, rate-limiting, and traffic shaping. API
- guarantee/conformance is defined based on the type of the filter.
- properties:
- extensionRef:
- description: |-
- ExtensionRef is an optional, implementation-specific extension to the
- "filter" behavior. For example, resource "myroutefilter" in group
- "networking.example.net"). ExtensionRef MUST NOT be used for core and
- extended filters.
-
-
- Support: Implementation-specific
-
-
- This filter can be used multiple times within the same rule.
- properties:
- group:
- description: |-
- Group is the group of the referent. For example, "gateway.networking.k8s.io".
- When unspecified or empty string, core API group is inferred.
- maxLength: 253
- pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
- type: string
- kind:
- description: Kind is kind of the referent. For example "HTTPRoute" or "Service".
- maxLength: 63
- minLength: 1
- pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$
- type: string
- name:
- description: Name is the name of the referent.
- maxLength: 253
- minLength: 1
- type: string
- required:
- - group
- - kind
- - name
- type: object
- requestHeaderModifier:
- description: |-
- RequestHeaderModifier defines a schema for a filter that modifies request
- headers.
-
-
- Support: Core
- properties:
- add:
- description: |-
- Add adds the given header(s) (name, value) to the request
- before the action. It appends to any existing values associated
- with the header name.
-
-
- Input:
- GET /foo HTTP/1.1
- my-header: foo
-
-
- Config:
- add:
- - name: "my-header"
- value: "bar,baz"
-
-
- Output:
- GET /foo HTTP/1.1
- my-header: foo,bar,baz
- items:
- description: HTTPHeader represents an HTTP Header name and value as defined by RFC 7230.
- properties:
- name:
- description: |-
- Name is the name of the HTTP Header to be matched. Name matching MUST be
- case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
-
-
- If multiple entries specify equivalent header names, the first entry with
- an equivalent name MUST be considered for a match. Subsequent entries
- with an equivalent header name MUST be ignored. Due to the
- case-insensitivity of header names, "foo" and "Foo" are considered
- equivalent.
- maxLength: 256
- minLength: 1
- pattern: ^[A-Za-z0-9!#$%&'*+\-.^_\x60|~]+$
- type: string
- value:
- description: Value is the value of HTTP Header to be matched.
- maxLength: 4096
- minLength: 1
- type: string
- required:
- - name
- - value
- type: object
- maxItems: 16
- type: array
- x-kubernetes-list-map-keys:
- - name
- x-kubernetes-list-type: map
- remove:
- description: |-
- Remove the given header(s) from the HTTP request before the action. The
- value of Remove is a list of HTTP header names. Note that the header
- names are case-insensitive (see
- https://datatracker.ietf.org/doc/html/rfc2616#section-4.2).
-
-
- Input:
- GET /foo HTTP/1.1
- my-header1: foo
- my-header2: bar
- my-header3: baz
-
-
- Config:
- remove: ["my-header1", "my-header3"]
-
-
- Output:
- GET /foo HTTP/1.1
- my-header2: bar
- items:
- type: string
- maxItems: 16
- type: array
- x-kubernetes-list-type: set
- set:
- description: |-
- Set overwrites the request with the given header (name, value)
- before the action.
-
-
- Input:
- GET /foo HTTP/1.1
- my-header: foo
-
-
- Config:
- set:
- - name: "my-header"
- value: "bar"
-
-
- Output:
- GET /foo HTTP/1.1
- my-header: bar
- items:
- description: HTTPHeader represents an HTTP Header name and value as defined by RFC 7230.
- properties:
- name:
- description: |-
- Name is the name of the HTTP Header to be matched. Name matching MUST be
- case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
-
-
- If multiple entries specify equivalent header names, the first entry with
- an equivalent name MUST be considered for a match. Subsequent entries
- with an equivalent header name MUST be ignored. Due to the
- case-insensitivity of header names, "foo" and "Foo" are considered
- equivalent.
- maxLength: 256
- minLength: 1
- pattern: ^[A-Za-z0-9!#$%&'*+\-.^_\x60|~]+$
- type: string
- value:
- description: Value is the value of HTTP Header to be matched.
- maxLength: 4096
- minLength: 1
- type: string
- required:
- - name
- - value
- type: object
- maxItems: 16
- type: array
- x-kubernetes-list-map-keys:
- - name
- x-kubernetes-list-type: map
- type: object
- requestMirror:
- description: |-
- RequestMirror defines a schema for a filter that mirrors requests.
- Requests are sent to the specified destination, but responses from
- that destination are ignored.
-
-
- This filter can be used multiple times within the same rule. Note that
- not all implementations will be able to support mirroring to multiple
- backends.
-
-
- Support: Extended
- properties:
- backendRef:
- description: |-
- BackendRef references a resource where mirrored requests are sent.
-
-
- Mirrored requests must be sent only to a single destination endpoint
- within this BackendRef, irrespective of how many endpoints are present
- within this BackendRef.
-
-
- If the referent cannot be found, this BackendRef is invalid and must be
- dropped from the Gateway. The controller must ensure the "ResolvedRefs"
- condition on the Route status is set to `status: False` and not configure
- this backend in the underlying implementation.
-
-
- If there is a cross-namespace reference to an *existing* object
- that is not allowed by a ReferenceGrant, the controller must ensure the
- "ResolvedRefs" condition on the Route is set to `status: False`,
- with the "RefNotPermitted" reason and not configure this backend in the
- underlying implementation.
-
-
- In either error case, the Message of the `ResolvedRefs` Condition
- should be used to provide more detail about the problem.
-
-
- Support: Extended for Kubernetes Service
-
-
- Support: Implementation-specific for any other resource
- properties:
- group:
- default: ""
- description: |-
- Group is the group of the referent. For example, "gateway.networking.k8s.io".
- When unspecified or empty string, core API group is inferred.
- maxLength: 253
- pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
- type: string
- kind:
- default: Service
- description: |-
- Kind is the Kubernetes resource kind of the referent. For example
- "Service".
-
-
- Defaults to "Service" when not specified.
-
-
- ExternalName services can refer to CNAME DNS records that may live
- outside of the cluster and as such are difficult to reason about in
- terms of conformance. They also may not be safe to forward to (see
- CVE-2021-25740 for more information). Implementations SHOULD NOT
- support ExternalName Services.
-
-
- Support: Core (Services with a type other than ExternalName)
-
-
- Support: Implementation-specific (Services with type ExternalName)
- maxLength: 63
- minLength: 1
- pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$
- type: string
- name:
- description: Name is the name of the referent.
- maxLength: 253
- minLength: 1
- type: string
- namespace:
- description: |-
- Namespace is the namespace of the backend. When unspecified, the local
- namespace is inferred.
-
-
- Note that when a namespace different than the local namespace is specified,
- a ReferenceGrant object is required in the referent namespace to allow that
- namespace's owner to accept the reference. See the ReferenceGrant
- documentation for details.
-
-
- Support: Core
- maxLength: 63
- minLength: 1
- pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
- type: string
- port:
- description: |-
- Port specifies the destination port number to use for this resource.
- Port is required when the referent is a Kubernetes Service. In this
- case, the port number is the service port number, not the target port.
- For other resources, destination port might be derived from the referent
- resource or this field.
- format: int32
- maximum: 65535
- minimum: 1
- type: integer
- required:
- - name
- type: object
- x-kubernetes-validations:
- - message: Must have port for Service reference
- rule: '(size(self.group) == 0 && self.kind == ''Service'') ? has(self.port) : true'
- required:
- - backendRef
- type: object
- responseHeaderModifier:
- description: |-
- ResponseHeaderModifier defines a schema for a filter that modifies response
- headers.
-
-
- Support: Extended
- properties:
- add:
- description: |-
- Add adds the given header(s) (name, value) to the request
- before the action. It appends to any existing values associated
- with the header name.
-
-
- Input:
- GET /foo HTTP/1.1
- my-header: foo
-
-
- Config:
- add:
- - name: "my-header"
- value: "bar,baz"
-
-
- Output:
- GET /foo HTTP/1.1
- my-header: foo,bar,baz
- items:
- description: HTTPHeader represents an HTTP Header name and value as defined by RFC 7230.
- properties:
- name:
- description: |-
- Name is the name of the HTTP Header to be matched. Name matching MUST be
- case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
-
-
- If multiple entries specify equivalent header names, the first entry with
- an equivalent name MUST be considered for a match. Subsequent entries
- with an equivalent header name MUST be ignored. Due to the
- case-insensitivity of header names, "foo" and "Foo" are considered
- equivalent.
- maxLength: 256
- minLength: 1
- pattern: ^[A-Za-z0-9!#$%&'*+\-.^_\x60|~]+$
- type: string
- value:
- description: Value is the value of HTTP Header to be matched.
- maxLength: 4096
- minLength: 1
- type: string
- required:
- - name
- - value
- type: object
- maxItems: 16
- type: array
- x-kubernetes-list-map-keys:
- - name
- x-kubernetes-list-type: map
- remove:
- description: |-
- Remove the given header(s) from the HTTP request before the action. The
- value of Remove is a list of HTTP header names. Note that the header
- names are case-insensitive (see
- https://datatracker.ietf.org/doc/html/rfc2616#section-4.2).
-
-
- Input:
- GET /foo HTTP/1.1
- my-header1: foo
- my-header2: bar
- my-header3: baz
-
-
- Config:
- remove: ["my-header1", "my-header3"]
-
-
- Output:
- GET /foo HTTP/1.1
- my-header2: bar
- items:
- type: string
- maxItems: 16
- type: array
- x-kubernetes-list-type: set
- set:
- description: |-
- Set overwrites the request with the given header (name, value)
- before the action.
-
-
- Input:
- GET /foo HTTP/1.1
- my-header: foo
-
-
- Config:
- set:
- - name: "my-header"
- value: "bar"
-
-
- Output:
- GET /foo HTTP/1.1
- my-header: bar
- items:
- description: HTTPHeader represents an HTTP Header name and value as defined by RFC 7230.
- properties:
- name:
- description: |-
- Name is the name of the HTTP Header to be matched. Name matching MUST be
- case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
-
-
- If multiple entries specify equivalent header names, the first entry with
- an equivalent name MUST be considered for a match. Subsequent entries
- with an equivalent header name MUST be ignored. Due to the
- case-insensitivity of header names, "foo" and "Foo" are considered
- equivalent.
- maxLength: 256
- minLength: 1
- pattern: ^[A-Za-z0-9!#$%&'*+\-.^_\x60|~]+$
- type: string
- value:
- description: Value is the value of HTTP Header to be matched.
- maxLength: 4096
- minLength: 1
- type: string
- required:
- - name
- - value
- type: object
- maxItems: 16
- type: array
- x-kubernetes-list-map-keys:
- - name
- x-kubernetes-list-type: map
- type: object
- type:
- description: |+
- Type identifies the type of filter to apply. As with other API fields,
- types are classified into three conformance levels:
-
-
- - Core: Filter types and their corresponding configuration defined by
- "Support: Core" in this package, e.g. "RequestHeaderModifier". All
- implementations supporting GRPCRoute MUST support core filters.
-
-
- - Extended: Filter types and their corresponding configuration defined by
- "Support: Extended" in this package, e.g. "RequestMirror". Implementers
- are encouraged to support extended filters.
-
-
- - Implementation-specific: Filters that are defined and supported by specific vendors.
- In the future, filters showing convergence in behavior across multiple
- implementations will be considered for inclusion in extended or core
- conformance levels. Filter-specific configuration for such filters
- is specified using the ExtensionRef field. `Type` MUST be set to
- "ExtensionRef" for custom filters.
-
-
- Implementers are encouraged to define custom implementation types to
- extend the core API with implementation-specific behavior.
-
-
- If a reference to a custom filter type cannot be resolved, the filter
- MUST NOT be skipped. Instead, requests that would have been processed by
- that filter MUST receive a HTTP error response.
-
-
- enum:
- - ResponseHeaderModifier
- - RequestHeaderModifier
- - RequestMirror
- - ExtensionRef
- type: string
- required:
- - type
- type: object
- x-kubernetes-validations:
- - message: filter.requestHeaderModifier must be nil if the filter.type is not RequestHeaderModifier
- rule: '!(has(self.requestHeaderModifier) && self.type != ''RequestHeaderModifier'')'
- - message: filter.requestHeaderModifier must be specified for RequestHeaderModifier filter.type
- rule: '!(!has(self.requestHeaderModifier) && self.type == ''RequestHeaderModifier'')'
- - message: filter.responseHeaderModifier must be nil if the filter.type is not ResponseHeaderModifier
- rule: '!(has(self.responseHeaderModifier) && self.type != ''ResponseHeaderModifier'')'
- - message: filter.responseHeaderModifier must be specified for ResponseHeaderModifier filter.type
- rule: '!(!has(self.responseHeaderModifier) && self.type == ''ResponseHeaderModifier'')'
- - message: filter.requestMirror must be nil if the filter.type is not RequestMirror
- rule: '!(has(self.requestMirror) && self.type != ''RequestMirror'')'
- - message: filter.requestMirror must be specified for RequestMirror filter.type
- rule: '!(!has(self.requestMirror) && self.type == ''RequestMirror'')'
- - message: filter.extensionRef must be nil if the filter.type is not ExtensionRef
- rule: '!(has(self.extensionRef) && self.type != ''ExtensionRef'')'
- - message: filter.extensionRef must be specified for ExtensionRef filter.type
- rule: '!(!has(self.extensionRef) && self.type == ''ExtensionRef'')'
- maxItems: 16
- type: array
- x-kubernetes-validations:
- - message: RequestHeaderModifier filter cannot be repeated
- rule: self.filter(f, f.type == 'RequestHeaderModifier').size() <= 1
- - message: ResponseHeaderModifier filter cannot be repeated
- rule: self.filter(f, f.type == 'ResponseHeaderModifier').size() <= 1
- group:
- default: ""
- description: |-
- Group is the group of the referent. For example, "gateway.networking.k8s.io".
- When unspecified or empty string, core API group is inferred.
- maxLength: 253
- pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
- type: string
- kind:
- default: Service
- description: |-
- Kind is the Kubernetes resource kind of the referent. For example
- "Service".
-
-
- Defaults to "Service" when not specified.
-
-
- ExternalName services can refer to CNAME DNS records that may live
- outside of the cluster and as such are difficult to reason about in
- terms of conformance. They also may not be safe to forward to (see
- CVE-2021-25740 for more information). Implementations SHOULD NOT
- support ExternalName Services.
-
-
- Support: Core (Services with a type other than ExternalName)
-
-
- Support: Implementation-specific (Services with type ExternalName)
- maxLength: 63
- minLength: 1
- pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$
- type: string
- name:
- description: Name is the name of the referent.
- maxLength: 253
- minLength: 1
- type: string
- namespace:
- description: |-
- Namespace is the namespace of the backend. When unspecified, the local
- namespace is inferred.
-
-
- Note that when a namespace different than the local namespace is specified,
- a ReferenceGrant object is required in the referent namespace to allow that
- namespace's owner to accept the reference. See the ReferenceGrant
- documentation for details.
-
-
- Support: Core
- maxLength: 63
- minLength: 1
- pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
- type: string
- port:
- description: |-
- Port specifies the destination port number to use for this resource.
- Port is required when the referent is a Kubernetes Service. In this
- case, the port number is the service port number, not the target port.
- For other resources, destination port might be derived from the referent
- resource or this field.
- format: int32
- maximum: 65535
- minimum: 1
- type: integer
- weight:
- default: 1
- description: |-
- Weight specifies the proportion of requests forwarded to the referenced
- backend. This is computed as weight/(sum of all weights in this
- BackendRefs list). For non-zero values, there may be some epsilon from
- the exact proportion defined here depending on the precision an
- implementation supports. Weight is not a percentage and the sum of
- weights does not need to equal 100.
-
-
- If only one backend is specified and it has a weight greater than 0, 100%
- of the traffic is forwarded to that backend. If weight is set to 0, no
- traffic should be forwarded for this entry. If unspecified, weight
- defaults to 1.
-
-
- Support for this field varies based on the context where used.
- format: int32
- maximum: 1000000
- minimum: 0
- type: integer
- required:
- - name
- type: object
- x-kubernetes-validations:
- - message: Must have port for Service reference
- rule: '(size(self.group) == 0 && self.kind == ''Service'') ? has(self.port) : true'
- maxItems: 16
- type: array
- filters:
- description: |-
- Filters define the filters that are applied to requests that match
- this rule.
-
-
- The effects of ordering of multiple behaviors are currently unspecified.
- This can change in the future based on feedback during the alpha stage.
-
-
- Conformance-levels at this level are defined based on the type of filter:
-
-
- - ALL core filters MUST be supported by all implementations that support
- GRPCRoute.
- - Implementers are encouraged to support extended filters.
- - Implementation-specific custom filters have no API guarantees across
- implementations.
-
-
- Specifying the same filter multiple times is not supported unless explicitly
- indicated in the filter.
-
-
- If an implementation can not support a combination of filters, it must clearly
- document that limitation. In cases where incompatible or unsupported
- filters are specified and cause the `Accepted` condition to be set to status
- `False`, implementations may use the `IncompatibleFilters` reason to specify
- this configuration error.
-
-
- Support: Core
- items:
- description: |-
- GRPCRouteFilter defines processing steps that must be completed during the
- request or response lifecycle. GRPCRouteFilters are meant as an extension
- point to express processing that may be done in Gateway implementations. Some
- examples include request or response modification, implementing
- authentication strategies, rate-limiting, and traffic shaping. API
- guarantee/conformance is defined based on the type of the filter.
- properties:
- extensionRef:
- description: |-
- ExtensionRef is an optional, implementation-specific extension to the
- "filter" behavior. For example, resource "myroutefilter" in group
- "networking.example.net"). ExtensionRef MUST NOT be used for core and
- extended filters.
-
-
- Support: Implementation-specific
-
-
- This filter can be used multiple times within the same rule.
- properties:
- group:
- description: |-
- Group is the group of the referent. For example, "gateway.networking.k8s.io".
- When unspecified or empty string, core API group is inferred.
- maxLength: 253
- pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
- type: string
- kind:
- description: Kind is kind of the referent. For example "HTTPRoute" or "Service".
- maxLength: 63
- minLength: 1
- pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$
- type: string
- name:
- description: Name is the name of the referent.
- maxLength: 253
- minLength: 1
- type: string
- required:
- - group
- - kind
- - name
- type: object
- requestHeaderModifier:
- description: |-
- RequestHeaderModifier defines a schema for a filter that modifies request
- headers.
-
-
- Support: Core
- properties:
- add:
- description: |-
- Add adds the given header(s) (name, value) to the request
- before the action. It appends to any existing values associated
- with the header name.
-
-
- Input:
- GET /foo HTTP/1.1
- my-header: foo
-
-
- Config:
- add:
- - name: "my-header"
- value: "bar,baz"
-
-
- Output:
- GET /foo HTTP/1.1
- my-header: foo,bar,baz
- items:
- description: HTTPHeader represents an HTTP Header name and value as defined by RFC 7230.
- properties:
- name:
- description: |-
- Name is the name of the HTTP Header to be matched. Name matching MUST be
- case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
-
-
- If multiple entries specify equivalent header names, the first entry with
- an equivalent name MUST be considered for a match. Subsequent entries
- with an equivalent header name MUST be ignored. Due to the
- case-insensitivity of header names, "foo" and "Foo" are considered
- equivalent.
- maxLength: 256
- minLength: 1
- pattern: ^[A-Za-z0-9!#$%&'*+\-.^_\x60|~]+$
- type: string
- value:
- description: Value is the value of HTTP Header to be matched.
- maxLength: 4096
- minLength: 1
- type: string
- required:
- - name
- - value
- type: object
- maxItems: 16
- type: array
- x-kubernetes-list-map-keys:
- - name
- x-kubernetes-list-type: map
- remove:
- description: |-
- Remove the given header(s) from the HTTP request before the action. The
- value of Remove is a list of HTTP header names. Note that the header
- names are case-insensitive (see
- https://datatracker.ietf.org/doc/html/rfc2616#section-4.2).
-
-
- Input:
- GET /foo HTTP/1.1
- my-header1: foo
- my-header2: bar
- my-header3: baz
-
-
- Config:
- remove: ["my-header1", "my-header3"]
-
-
- Output:
- GET /foo HTTP/1.1
- my-header2: bar
- items:
- type: string
- maxItems: 16
- type: array
- x-kubernetes-list-type: set
- set:
- description: |-
- Set overwrites the request with the given header (name, value)
- before the action.
-
-
- Input:
- GET /foo HTTP/1.1
- my-header: foo
-
-
- Config:
- set:
- - name: "my-header"
- value: "bar"
-
-
- Output:
- GET /foo HTTP/1.1
- my-header: bar
- items:
- description: HTTPHeader represents an HTTP Header name and value as defined by RFC 7230.
- properties:
- name:
- description: |-
- Name is the name of the HTTP Header to be matched. Name matching MUST be
- case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
-
-
- If multiple entries specify equivalent header names, the first entry with
- an equivalent name MUST be considered for a match. Subsequent entries
- with an equivalent header name MUST be ignored. Due to the
- case-insensitivity of header names, "foo" and "Foo" are considered
- equivalent.
- maxLength: 256
- minLength: 1
- pattern: ^[A-Za-z0-9!#$%&'*+\-.^_\x60|~]+$
- type: string
- value:
- description: Value is the value of HTTP Header to be matched.
- maxLength: 4096
- minLength: 1
- type: string
- required:
- - name
- - value
- type: object
- maxItems: 16
- type: array
- x-kubernetes-list-map-keys:
- - name
- x-kubernetes-list-type: map
- type: object
- requestMirror:
- description: |-
- RequestMirror defines a schema for a filter that mirrors requests.
- Requests are sent to the specified destination, but responses from
- that destination are ignored.
-
-
- This filter can be used multiple times within the same rule. Note that
- not all implementations will be able to support mirroring to multiple
- backends.
-
-
- Support: Extended
- properties:
- backendRef:
- description: |-
- BackendRef references a resource where mirrored requests are sent.
-
-
- Mirrored requests must be sent only to a single destination endpoint
- within this BackendRef, irrespective of how many endpoints are present
- within this BackendRef.
-
-
- If the referent cannot be found, this BackendRef is invalid and must be
- dropped from the Gateway. The controller must ensure the "ResolvedRefs"
- condition on the Route status is set to `status: False` and not configure
- this backend in the underlying implementation.
-
-
- If there is a cross-namespace reference to an *existing* object
- that is not allowed by a ReferenceGrant, the controller must ensure the
- "ResolvedRefs" condition on the Route is set to `status: False`,
- with the "RefNotPermitted" reason and not configure this backend in the
- underlying implementation.
-
-
- In either error case, the Message of the `ResolvedRefs` Condition
- should be used to provide more detail about the problem.
-
-
- Support: Extended for Kubernetes Service
-
-
- Support: Implementation-specific for any other resource
- properties:
- group:
- default: ""
- description: |-
- Group is the group of the referent. For example, "gateway.networking.k8s.io".
- When unspecified or empty string, core API group is inferred.
- maxLength: 253
- pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
- type: string
- kind:
- default: Service
- description: |-
- Kind is the Kubernetes resource kind of the referent. For example
- "Service".
-
-
- Defaults to "Service" when not specified.
-
-
- ExternalName services can refer to CNAME DNS records that may live
- outside of the cluster and as such are difficult to reason about in
- terms of conformance. They also may not be safe to forward to (see
- CVE-2021-25740 for more information). Implementations SHOULD NOT
- support ExternalName Services.
-
-
- Support: Core (Services with a type other than ExternalName)
-
-
- Support: Implementation-specific (Services with type ExternalName)
- maxLength: 63
- minLength: 1
- pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$
- type: string
- name:
- description: Name is the name of the referent.
- maxLength: 253
- minLength: 1
- type: string
- namespace:
- description: |-
- Namespace is the namespace of the backend. When unspecified, the local
- namespace is inferred.
-
-
- Note that when a namespace different than the local namespace is specified,
- a ReferenceGrant object is required in the referent namespace to allow that
- namespace's owner to accept the reference. See the ReferenceGrant
- documentation for details.
-
-
- Support: Core
- maxLength: 63
- minLength: 1
- pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
- type: string
- port:
- description: |-
- Port specifies the destination port number to use for this resource.
- Port is required when the referent is a Kubernetes Service. In this
- case, the port number is the service port number, not the target port.
- For other resources, destination port might be derived from the referent
- resource or this field.
- format: int32
- maximum: 65535
- minimum: 1
- type: integer
- required:
- - name
- type: object
- x-kubernetes-validations:
- - message: Must have port for Service reference
- rule: '(size(self.group) == 0 && self.kind == ''Service'') ? has(self.port) : true'
- required:
- - backendRef
- type: object
- responseHeaderModifier:
- description: |-
- ResponseHeaderModifier defines a schema for a filter that modifies response
- headers.
-
-
- Support: Extended
- properties:
- add:
- description: |-
- Add adds the given header(s) (name, value) to the request
- before the action. It appends to any existing values associated
- with the header name.
-
-
- Input:
- GET /foo HTTP/1.1
- my-header: foo
-
-
- Config:
- add:
- - name: "my-header"
- value: "bar,baz"
-
-
- Output:
- GET /foo HTTP/1.1
- my-header: foo,bar,baz
- items:
- description: HTTPHeader represents an HTTP Header name and value as defined by RFC 7230.
- properties:
- name:
- description: |-
- Name is the name of the HTTP Header to be matched. Name matching MUST be
- case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
-
-
- If multiple entries specify equivalent header names, the first entry with
- an equivalent name MUST be considered for a match. Subsequent entries
- with an equivalent header name MUST be ignored. Due to the
- case-insensitivity of header names, "foo" and "Foo" are considered
- equivalent.
- maxLength: 256
- minLength: 1
- pattern: ^[A-Za-z0-9!#$%&'*+\-.^_\x60|~]+$
- type: string
- value:
- description: Value is the value of HTTP Header to be matched.
- maxLength: 4096
- minLength: 1
- type: string
- required:
- - name
- - value
- type: object
- maxItems: 16
- type: array
- x-kubernetes-list-map-keys:
- - name
- x-kubernetes-list-type: map
- remove:
- description: |-
- Remove the given header(s) from the HTTP request before the action. The
- value of Remove is a list of HTTP header names. Note that the header
- names are case-insensitive (see
- https://datatracker.ietf.org/doc/html/rfc2616#section-4.2).
-
-
- Input:
- GET /foo HTTP/1.1
- my-header1: foo
- my-header2: bar
- my-header3: baz
-
-
- Config:
- remove: ["my-header1", "my-header3"]
-
-
- Output:
- GET /foo HTTP/1.1
- my-header2: bar
- items:
- type: string
- maxItems: 16
- type: array
- x-kubernetes-list-type: set
- set:
- description: |-
- Set overwrites the request with the given header (name, value)
- before the action.
-
-
- Input:
- GET /foo HTTP/1.1
- my-header: foo
-
-
- Config:
- set:
- - name: "my-header"
- value: "bar"
-
-
- Output:
- GET /foo HTTP/1.1
- my-header: bar
- items:
- description: HTTPHeader represents an HTTP Header name and value as defined by RFC 7230.
- properties:
- name:
- description: |-
- Name is the name of the HTTP Header to be matched. Name matching MUST be
- case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
-
-
- If multiple entries specify equivalent header names, the first entry with
- an equivalent name MUST be considered for a match. Subsequent entries
- with an equivalent header name MUST be ignored. Due to the
- case-insensitivity of header names, "foo" and "Foo" are considered
- equivalent.
- maxLength: 256
- minLength: 1
- pattern: ^[A-Za-z0-9!#$%&'*+\-.^_\x60|~]+$
- type: string
- value:
- description: Value is the value of HTTP Header to be matched.
- maxLength: 4096
- minLength: 1
- type: string
- required:
- - name
- - value
- type: object
- maxItems: 16
- type: array
- x-kubernetes-list-map-keys:
- - name
- x-kubernetes-list-type: map
- type: object
- type:
- description: |+
- Type identifies the type of filter to apply. As with other API fields,
- types are classified into three conformance levels:
-
-
- - Core: Filter types and their corresponding configuration defined by
- "Support: Core" in this package, e.g. "RequestHeaderModifier". All
- implementations supporting GRPCRoute MUST support core filters.
-
-
- - Extended: Filter types and their corresponding configuration defined by
- "Support: Extended" in this package, e.g. "RequestMirror". Implementers
- are encouraged to support extended filters.
-
-
- - Implementation-specific: Filters that are defined and supported by specific vendors.
- In the future, filters showing convergence in behavior across multiple
- implementations will be considered for inclusion in extended or core
- conformance levels. Filter-specific configuration for such filters
- is specified using the ExtensionRef field. `Type` MUST be set to
- "ExtensionRef" for custom filters.
-
-
- Implementers are encouraged to define custom implementation types to
- extend the core API with implementation-specific behavior.
-
-
- If a reference to a custom filter type cannot be resolved, the filter
- MUST NOT be skipped. Instead, requests that would have been processed by
- that filter MUST receive a HTTP error response.
-
-
- enum:
- - ResponseHeaderModifier
- - RequestHeaderModifier
- - RequestMirror
- - ExtensionRef
- type: string
- required:
- - type
- type: object
- x-kubernetes-validations:
- - message: filter.requestHeaderModifier must be nil if the filter.type is not RequestHeaderModifier
- rule: '!(has(self.requestHeaderModifier) && self.type != ''RequestHeaderModifier'')'
- - message: filter.requestHeaderModifier must be specified for RequestHeaderModifier filter.type
- rule: '!(!has(self.requestHeaderModifier) && self.type == ''RequestHeaderModifier'')'
- - message: filter.responseHeaderModifier must be nil if the filter.type is not ResponseHeaderModifier
- rule: '!(has(self.responseHeaderModifier) && self.type != ''ResponseHeaderModifier'')'
- - message: filter.responseHeaderModifier must be specified for ResponseHeaderModifier filter.type
- rule: '!(!has(self.responseHeaderModifier) && self.type == ''ResponseHeaderModifier'')'
- - message: filter.requestMirror must be nil if the filter.type is not RequestMirror
- rule: '!(has(self.requestMirror) && self.type != ''RequestMirror'')'
- - message: filter.requestMirror must be specified for RequestMirror filter.type
- rule: '!(!has(self.requestMirror) && self.type == ''RequestMirror'')'
- - message: filter.extensionRef must be nil if the filter.type is not ExtensionRef
- rule: '!(has(self.extensionRef) && self.type != ''ExtensionRef'')'
- - message: filter.extensionRef must be specified for ExtensionRef filter.type
- rule: '!(!has(self.extensionRef) && self.type == ''ExtensionRef'')'
- maxItems: 16
- type: array
- x-kubernetes-validations:
- - message: RequestHeaderModifier filter cannot be repeated
- rule: self.filter(f, f.type == 'RequestHeaderModifier').size() <= 1
- - message: ResponseHeaderModifier filter cannot be repeated
- rule: self.filter(f, f.type == 'ResponseHeaderModifier').size() <= 1
- matches:
- description: |-
- Matches define conditions used for matching the rule against incoming
- gRPC requests. Each match is independent, i.e. this rule will be matched
- if **any** one of the matches is satisfied.
-
-
- For example, take the following matches configuration:
-
-
- ```
- matches:
- - method:
- service: foo.bar
- headers:
- values:
- version: 2
- - method:
- service: foo.bar.v2
- ```
-
-
- For a request to match against this rule, it MUST satisfy
- EITHER of the two conditions:
-
-
- - service of foo.bar AND contains the header `version: 2`
- - service of foo.bar.v2
-
-
- See the documentation for GRPCRouteMatch on how to specify multiple
- match conditions to be ANDed together.
-
-
- If no matches are specified, the implementation MUST match every gRPC request.
-
-
- Proxy or Load Balancer routing configuration generated from GRPCRoutes
- MUST prioritize rules based on the following criteria, continuing on
- ties. Merging MUST not be done between GRPCRoutes and HTTPRoutes.
- Precedence MUST be given to the rule with the largest number of:
-
-
- * Characters in a matching non-wildcard hostname.
- * Characters in a matching hostname.
- * Characters in a matching service.
- * Characters in a matching method.
- * Header matches.
-
-
- If ties still exist across multiple Routes, matching precedence MUST be
- determined in order of the following criteria, continuing on ties:
-
-
- * The oldest Route based on creation timestamp.
- * The Route appearing first in alphabetical order by
- "{namespace}/{name}".
-
-
- If ties still exist within the Route that has been given precedence,
- matching precedence MUST be granted to the first matching rule meeting
- the above criteria.
- items:
- description: |-
- GRPCRouteMatch defines the predicate used to match requests to a given
- action. Multiple match types are ANDed together, i.e. the match will
- evaluate to true only if all conditions are satisfied.
-
-
- For example, the match below will match a gRPC request only if its service
- is `foo` AND it contains the `version: v1` header:
-
-
- ```
- matches:
- - method:
- type: Exact
- service: "foo"
- headers:
- - name: "version"
- value "v1"
-
-
- ```
- properties:
- headers:
- description: |-
- Headers specifies gRPC request header matchers. Multiple match values are
- ANDed together, meaning, a request MUST match all the specified headers
- to select the route.
- items:
- description: |-
- GRPCHeaderMatch describes how to select a gRPC route by matching gRPC request
- headers.
- properties:
- name:
- description: |-
- Name is the name of the gRPC Header to be matched.
-
-
- If multiple entries specify equivalent header names, only the first
- entry with an equivalent name MUST be considered for a match. Subsequent
- entries with an equivalent header name MUST be ignored. Due to the
- case-insensitivity of header names, "foo" and "Foo" are considered
- equivalent.
- maxLength: 256
- minLength: 1
- pattern: ^[A-Za-z0-9!#$%&'*+\-.^_\x60|~]+$
- type: string
- type:
- default: Exact
- description: Type specifies how to match against the value of the header.
- enum:
- - Exact
- - RegularExpression
- type: string
- value:
- description: Value is the value of the gRPC Header to be matched.
- maxLength: 4096
- minLength: 1
- type: string
- required:
- - name
- - value
- type: object
- maxItems: 16
- type: array
- x-kubernetes-list-map-keys:
- - name
- x-kubernetes-list-type: map
- method:
- description: |-
- Method specifies a gRPC request service/method matcher. If this field is
- not specified, all services and methods will match.
- properties:
- method:
- description: |-
- Value of the method to match against. If left empty or omitted, will
- match all services.
-
-
- At least one of Service and Method MUST be a non-empty string.
- maxLength: 1024
- type: string
- service:
- description: |-
- Value of the service to match against. If left empty or omitted, will
- match any service.
-
-
- At least one of Service and Method MUST be a non-empty string.
- maxLength: 1024
- type: string
- type:
- default: Exact
- description: |-
- Type specifies how to match against the service and/or method.
- Support: Core (Exact with service and method specified)
-
-
- Support: Implementation-specific (Exact with method specified but no service specified)
-
-
- Support: Implementation-specific (RegularExpression)
- enum:
- - Exact
- - RegularExpression
- type: string
- type: object
- x-kubernetes-validations:
- - message: One or both of 'service' or 'method' must be specified
- rule: 'has(self.type) ? has(self.service) || has(self.method) : true'
- - message: service must only contain valid characters (matching ^(?i)\.?[a-z_][a-z_0-9]*(\.[a-z_][a-z_0-9]*)*$)
- rule: '(!has(self.type) || self.type == ''Exact'') && has(self.service) ? self.service.matches(r"""^(?i)\.?[a-z_][a-z_0-9]*(\.[a-z_][a-z_0-9]*)*$"""): true'
- - message: method must only contain valid characters (matching ^[A-Za-z_][A-Za-z_0-9]*$)
- rule: '(!has(self.type) || self.type == ''Exact'') && has(self.method) ? self.method.matches(r"""^[A-Za-z_][A-Za-z_0-9]*$"""): true'
- type: object
- maxItems: 8
- type: array
- sessionPersistence:
- description: |+
- SessionPersistence defines and configures session persistence
- for the route rule.
-
-
- Support: Extended
-
-
- properties:
- absoluteTimeout:
- description: |-
- AbsoluteTimeout defines the absolute timeout of the persistent
- session. Once the AbsoluteTimeout duration has elapsed, the
- session becomes invalid.
-
-
- Support: Extended
- pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
- type: string
- cookieConfig:
- description: |-
- CookieConfig provides configuration settings that are specific
- to cookie-based session persistence.
-
-
- Support: Core
- properties:
- lifetimeType:
- default: Session
- description: |-
- LifetimeType specifies whether the cookie has a permanent or
- session-based lifetime. A permanent cookie persists until its
- specified expiry time, defined by the Expires or Max-Age cookie
- attributes, while a session cookie is deleted when the current
- session ends.
-
-
- When set to "Permanent", AbsoluteTimeout indicates the
- cookie's lifetime via the Expires or Max-Age cookie attributes
- and is required.
-
-
- When set to "Session", AbsoluteTimeout indicates the
- absolute lifetime of the cookie tracked by the gateway and
- is optional.
-
-
- Support: Core for "Session" type
-
-
- Support: Extended for "Permanent" type
- enum:
- - Permanent
- - Session
- type: string
- type: object
- idleTimeout:
- description: |-
- IdleTimeout defines the idle timeout of the persistent session.
- Once the session has been idle for more than the specified
- IdleTimeout duration, the session becomes invalid.
-
-
- Support: Extended
- pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
- type: string
- sessionName:
- description: |-
- SessionName defines the name of the persistent session token
- which may be reflected in the cookie or the header. Users
- should avoid reusing session names to prevent unintended
- consequences, such as rejection or unpredictable behavior.
-
-
- Support: Implementation-specific
- maxLength: 128
- type: string
- type:
- default: Cookie
- description: |-
- Type defines the type of session persistence such as through
- the use a header or cookie. Defaults to cookie based session
- persistence.
-
-
- Support: Core for "Cookie" type
-
-
- Support: Extended for "Header" type
- enum:
- - Cookie
- - Header
- type: string
- type: object
- x-kubernetes-validations:
- - message: AbsoluteTimeout must be specified when cookie lifetimeType is Permanent
- rule: '!has(self.cookieConfig.lifetimeType) || self.cookieConfig.lifetimeType != ''Permanent'' || has(self.absoluteTimeout)'
- type: object
- maxItems: 16
- type: array
- type: object
- status:
- description: Status defines the current state of GRPCRoute.
- properties:
- parents:
- description: |-
- Parents is a list of parent resources (usually Gateways) that are
- associated with the route, and the status of the route with respect to
- each parent. When this route attaches to a parent, the controller that
- manages the parent must add an entry to this list when the controller
- first sees the route and should update the entry as appropriate when the
- route or gateway is modified.
-
-
- Note that parent references that cannot be resolved by an implementation
- of this API will not be added to this list. Implementations of this API
- can only populate Route status for the Gateways/parent resources they are
- responsible for.
-
-
- A maximum of 32 Gateways will be represented in this list. An empty list
- means the route has not been attached to any Gateway.
- items:
- description: |-
- RouteParentStatus describes the status of a route with respect to an
- associated Parent.
- properties:
- conditions:
- description: |-
- Conditions describes the status of the route with respect to the Gateway.
- Note that the route's availability is also subject to the Gateway's own
- status conditions and listener status.
-
-
- If the Route's ParentRef specifies an existing Gateway that supports
- Routes of this kind AND that Gateway's controller has sufficient access,
- then that Gateway's controller MUST set the "Accepted" condition on the
- Route, to indicate whether the route has been accepted or rejected by the
- Gateway, and why.
-
-
- A Route MUST be considered "Accepted" if at least one of the Route's
- rules is implemented by the Gateway.
-
-
- There are a number of cases where the "Accepted" condition may not be set
- due to lack of controller visibility, that includes when:
-
-
- * The Route refers to a non-existent parent.
- * The Route is of a type that the controller does not support.
- * The Route is in a namespace the controller does not have access to.
- items:
- description: "Condition contains details for one aspect of the current state of this API Resource.\n---\nThis struct is intended for direct use as an array at the field path .status.conditions. For example,\n\n\n\ttype FooStatus struct{\n\t // Represents the observations of a foo's current state.\n\t // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\"\n\t // +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t // other fields\n\t}"
- properties:
- lastTransitionTime:
- description: |-
- lastTransitionTime is the last time the condition transitioned from one status to another.
- This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
- format: date-time
- type: string
- message:
- description: |-
- message is a human readable message indicating details about the transition.
- This may be an empty string.
- maxLength: 32768
- type: string
- observedGeneration:
- description: |-
- observedGeneration represents the .metadata.generation that the condition was set based upon.
- For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
- with respect to the current state of the instance.
- format: int64
- minimum: 0
- type: integer
- reason:
- description: |-
- reason contains a programmatic identifier indicating the reason for the condition's last transition.
- Producers of specific condition types may define expected values and meanings for this field,
- and whether the values are considered a guaranteed API.
- The value should be a CamelCase string.
- This field may not be empty.
- maxLength: 1024
- minLength: 1
- pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
- type: string
- status:
- description: status of the condition, one of True, False, Unknown.
- enum:
- - "True"
- - "False"
- - Unknown
- type: string
- type:
- description: |-
- type of condition in CamelCase or in foo.example.com/CamelCase.
- ---
- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
- useful (see .node.status.conditions), the ability to deconflict is important.
- The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
- maxLength: 316
- pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
- type: string
- required:
- - lastTransitionTime
- - message
- - reason
- - status
- - type
- type: object
- maxItems: 8
- minItems: 1
- type: array
- x-kubernetes-list-map-keys:
- - type
- x-kubernetes-list-type: map
- controllerName:
- description: |-
- ControllerName is a domain/path string that indicates the name of the
- controller that wrote this status. This corresponds with the
- controllerName field on GatewayClass.
-
-
- Example: "example.net/gateway-controller".
-
-
- The format of this field is DOMAIN "/" PATH, where DOMAIN and PATH are
- valid Kubernetes names
- (https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
-
-
- Controllers MUST populate this field when writing status. Controllers should ensure that
- entries to status populated with their ControllerName are cleaned up when they are no
- longer necessary.
- maxLength: 253
- minLength: 1
- pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\/[A-Za-z0-9\/\-._~%!$&'()*+,;=:]+$
- type: string
- parentRef:
- description: |-
- ParentRef corresponds with a ParentRef in the spec that this
- RouteParentStatus struct describes the status of.
- properties:
- group:
- default: gateway.networking.k8s.io
- description: |-
- Group is the group of the referent.
- When unspecified, "gateway.networking.k8s.io" is inferred.
- To set the core API group (such as for a "Service" kind referent),
- Group must be explicitly set to "" (empty string).
-
-
- Support: Core
- maxLength: 253
- pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
- type: string
- kind:
- default: Gateway
- description: |-
- Kind is kind of the referent.
-
-
- There are two kinds of parent resources with "Core" support:
-
-
- * Gateway (Gateway conformance profile)
- * Service (Mesh conformance profile, ClusterIP Services only)
-
-
- Support for other resources is Implementation-Specific.
- maxLength: 63
- minLength: 1
- pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$
- type: string
- name:
- description: |-
- Name is the name of the referent.
-
-
- Support: Core
- maxLength: 253
- minLength: 1
- type: string
- namespace:
- description: |-
- Namespace is the namespace of the referent. When unspecified, this refers
- to the local namespace of the Route.
-
-
- Note that there are specific rules for ParentRefs which cross namespace
- boundaries. Cross-namespace references are only valid if they are explicitly
- allowed by something in the namespace they are referring to. For example:
- Gateway has the AllowedRoutes field, and ReferenceGrant provides a
- generic way to enable any other kind of cross-namespace reference.
-
-
-
- ParentRefs from a Route to a Service in the same namespace are "producer"
- routes, which apply default routing rules to inbound connections from
- any namespace to the Service.
-
-
- ParentRefs from a Route to a Service in a different namespace are
- "consumer" routes, and these routing rules are only applied to outbound
- connections originating from the same namespace as the Route, for which
- the intended destination of the connections are a Service targeted as a
- ParentRef of the Route.
-
-
-
- Support: Core
- maxLength: 63
- minLength: 1
- pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
- type: string
- port:
- description: |-
- Port is the network port this Route targets. It can be interpreted
- differently based on the type of parent resource.
-
-
- When the parent resource is a Gateway, this targets all listeners
- listening on the specified port that also support this kind of Route(and
- select this Route). It's not recommended to set `Port` unless the
- networking behaviors specified in a Route must apply to a specific port
- as opposed to a listener(s) whose port(s) may be changed. When both Port
- and SectionName are specified, the name and port of the selected listener
- must match both specified values.
-
-
-
- When the parent resource is a Service, this targets a specific port in the
- Service spec. When both Port (experimental) and SectionName are specified,
- the name and port of the selected port must match both specified values.
-
-
-
- Implementations MAY choose to support other parent resources.
- Implementations supporting other types of parent resources MUST clearly
- document how/if Port is interpreted.
-
-
- For the purpose of status, an attachment is considered successful as
- long as the parent resource accepts it partially. For example, Gateway
- listeners can restrict which Routes can attach to them by Route kind,
- namespace, or hostname. If 1 of 2 Gateway listeners accept attachment
- from the referencing Route, the Route MUST be considered successfully
- attached. If no Gateway listeners accept attachment from this Route,
- the Route MUST be considered detached from the Gateway.
-
-
- Support: Extended
- format: int32
- maximum: 65535
- minimum: 1
- type: integer
- sectionName:
- description: |-
- SectionName is the name of a section within the target resource. In the
- following resources, SectionName is interpreted as the following:
-
-
- * Gateway: Listener name. When both Port (experimental) and SectionName
- are specified, the name and port of the selected listener must match
- both specified values.
- * Service: Port name. When both Port (experimental) and SectionName
- are specified, the name and port of the selected listener must match
- both specified values.
-
-
- Implementations MAY choose to support attaching Routes to other resources.
- If that is the case, they MUST clearly document how SectionName is
- interpreted.
-
-
- When unspecified (empty string), this will reference the entire resource.
- For the purpose of status, an attachment is considered successful if at
- least one section in the parent resource accepts it. For example, Gateway
- listeners can restrict which Routes can attach to them by Route kind,
- namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from
- the referencing Route, the Route MUST be considered successfully
- attached. If no Gateway listeners accept attachment from this Route, the
- Route MUST be considered detached from the Gateway.
-
-
- Support: Core
- maxLength: 253
- minLength: 1
- pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
- type: string
- required:
- - name
- type: object
- required:
- - controllerName
- - parentRef
- type: object
- maxItems: 32
- type: array
- required:
- - parents
- type: object
- type: object
- served: true
- storage: false
status:
acceptedNames:
kind: ""
@@ -8569,8 +6126,8 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
- api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/2997
- gateway.networking.k8s.io/bundle-version: v1.1.0
+ api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/3328
+ gateway.networking.k8s.io/bundle-version: v1.2.1
gateway.networking.k8s.io/channel: experimental
creationTimestamp: null
name: httproutes.gateway.networking.k8s.io
@@ -8629,21 +6186,17 @@ spec:
performing a match and (absent of any applicable header modification
configuration) MUST forward this header unmodified to the backend.
-
Valid values for Hostnames are determined by RFC 1123 definition of a
hostname with 2 notable exceptions:
-
1. IPs are not allowed.
2. A hostname may be prefixed with a wildcard label (`*.`). The wildcard
label must appear by itself as the first label.
-
If a hostname is specified by both the Listener and HTTPRoute, there
must be at least one intersecting hostname for the HTTPRoute to be
attached to the Listener. For example:
-
* A Listener with `test.example.com` as the hostname matches HTTPRoutes
that have either not specified any hostnames, or have specified at
least one of `test.example.com` or `*.example.com`.
@@ -8654,55 +6207,45 @@ spec:
all match. On the other hand, `example.com` and `test.example.net` would
not match.
-
Hostnames that are prefixed with a wildcard label (`*.`) are interpreted
as a suffix match. That means that a match for `*.example.com` would match
both `test.example.com`, and `foo.test.example.com`, but not `example.com`.
-
If both the Listener and HTTPRoute have specified hostnames, any
HTTPRoute hostnames that do not match the Listener hostname MUST be
ignored. For example, if a Listener specified `*.example.com`, and the
HTTPRoute specified `test.example.com` and `test.example.net`,
`test.example.net` must not be considered for a match.
-
If both the Listener and HTTPRoute have specified hostnames, and none
match with the criteria above, then the HTTPRoute is not accepted. The
implementation must raise an 'Accepted' Condition with a status of
`False` in the corresponding RouteParentStatus.
-
In the event that multiple HTTPRoutes specify intersecting hostnames (e.g.
overlapping wildcard matching and exact matching hostnames), precedence must
be given to rules from the HTTPRoute with the largest number of:
-
* Characters in a matching non-wildcard hostname.
* Characters in a matching hostname.
-
If ties exist across multiple Routes, the matching precedence rules for
HTTPRouteMatches takes over.
-
Support: Core
items:
description: |-
Hostname is the fully qualified domain name of a network host. This matches
the RFC 1123 definition of a hostname with 2 notable exceptions:
-
1. IPs are not allowed.
2. A hostname may be prefixed with a wildcard label (`*.`). The wildcard
label must appear by itself as the first label.
-
Hostname can be "precise" which is a domain name without the terminating
dot of a network host (e.g. "foo.example.com") or "wildcard", which is a
domain name prefixed with a single wildcard label (e.g. `*.example.com`).
-
Note that as per RFC1035 and RFC1123, a *label* must consist of lower case
alphanumeric characters or '-', and must start and end with an alphanumeric
character. No other punctuation is allowed.
@@ -8725,21 +6268,16 @@ spec:
create a "producer" route for a Service in a different namespace from the
Route.
-
There are two kinds of parent resources with "Core" support:
-
* Gateway (Gateway conformance profile)
* Service (Mesh conformance profile, ClusterIP Services only)
-
This API may be extended in the future to support additional kinds of parent
resources.
-
ParentRefs must be _distinct_. This means either that:
-
* They select different objects. If this is the case, then parentRef
entries are distinct. In terms of fields, this means that the
multi-part key defined by `group`, `kind`, `namespace`, and `name` must
@@ -8749,10 +6287,8 @@ spec:
optional fields to different values. If one ParentRef sets a
combination of optional fields, all must set the same combination.
-
Some examples:
-
* If one ParentRef sets `sectionName`, all ParentRefs referencing the
same object must also set `sectionName`.
* If one ParentRef sets `port`, all ParentRefs referencing the same
@@ -8760,14 +6296,12 @@ spec:
* If one ParentRef sets `sectionName` and `port`, all ParentRefs
referencing the same object must also set `sectionName` and `port`.
-
It is possible to separately reference multiple distinct objects that may
be collapsed by an implementation. For example, some implementations may
choose to merge compatible Gateway Listeners together. If that is the
case, the list of routes attached to those resources should also be
merged.
-
Note that for ParentRefs that cross namespace boundaries, there are specific
rules. Cross-namespace references are only valid if they are explicitly
allowed by something in the namespace they are referring to. For example,
@@ -8775,12 +6309,10 @@ spec:
generic way to enable other kinds of cross-namespace reference.
-
ParentRefs from a Route to a Service in the same namespace are "producer"
routes, which apply default routing rules to inbound connections from
any namespace to the Service.
-
ParentRefs from a Route to a Service in a different namespace are
"consumer" routes, and these routing rules are only applied to outbound
connections originating from the same namespace as the Route, for which
@@ -8791,22 +6323,18 @@ spec:
-
items:
description: |-
ParentReference identifies an API object (usually a Gateway) that can be considered
a parent of this resource (usually a route). There are two kinds of parent resources
with "Core" support:
-
* Gateway (Gateway conformance profile)
* Service (Mesh conformance profile, ClusterIP Services only)
-
This API may be extended in the future to support additional kinds of parent
resources.
-
The API object must be valid in the cluster; the Group and Kind must
be registered in the cluster for this reference to be valid.
properties:
@@ -8818,7 +6346,6 @@ spec:
To set the core API group (such as for a "Service" kind referent),
Group must be explicitly set to "" (empty string).
-
Support: Core
maxLength: 253
pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
@@ -8828,14 +6355,11 @@ spec:
description: |-
Kind is kind of the referent.
-
There are two kinds of parent resources with "Core" support:
-
* Gateway (Gateway conformance profile)
* Service (Mesh conformance profile, ClusterIP Services only)
-
Support for other resources is Implementation-Specific.
maxLength: 63
minLength: 1
@@ -8845,7 +6369,6 @@ spec:
description: |-
Name is the name of the referent.
-
Support: Core
maxLength: 253
minLength: 1
@@ -8855,7 +6378,6 @@ spec:
Namespace is the namespace of the referent. When unspecified, this refers
to the local namespace of the Route.
-
Note that there are specific rules for ParentRefs which cross namespace
boundaries. Cross-namespace references are only valid if they are explicitly
allowed by something in the namespace they are referring to. For example:
@@ -8863,12 +6385,10 @@ spec:
generic way to enable any other kind of cross-namespace reference.
-
ParentRefs from a Route to a Service in the same namespace are "producer"
routes, which apply default routing rules to inbound connections from
any namespace to the Service.
-
ParentRefs from a Route to a Service in a different namespace are
"consumer" routes, and these routing rules are only applied to outbound
connections originating from the same namespace as the Route, for which
@@ -8876,7 +6396,6 @@ spec:
ParentRef of the Route.
-
Support: Core
maxLength: 63
minLength: 1
@@ -8887,7 +6406,6 @@ spec:
Port is the network port this Route targets. It can be interpreted
differently based on the type of parent resource.
-
When the parent resource is a Gateway, this targets all listeners
listening on the specified port that also support this kind of Route(and
select this Route). It's not recommended to set `Port` unless the
@@ -8897,18 +6415,15 @@ spec:
must match both specified values.
-
When the parent resource is a Service, this targets a specific port in the
Service spec. When both Port (experimental) and SectionName are specified,
the name and port of the selected port must match both specified values.
-
Implementations MAY choose to support other parent resources.
Implementations supporting other types of parent resources MUST clearly
document how/if Port is interpreted.
-
For the purpose of status, an attachment is considered successful as
long as the parent resource accepts it partially. For example, Gateway
listeners can restrict which Routes can attach to them by Route kind,
@@ -8917,7 +6432,6 @@ spec:
attached. If no Gateway listeners accept attachment from this Route,
the Route MUST be considered detached from the Gateway.
-
Support: Extended
format: int32
maximum: 65535
@@ -8928,7 +6442,6 @@ spec:
SectionName is the name of a section within the target resource. In the
following resources, SectionName is interpreted as the following:
-
* Gateway: Listener name. When both Port (experimental) and SectionName
are specified, the name and port of the selected listener must match
both specified values.
@@ -8936,12 +6449,10 @@ spec:
are specified, the name and port of the selected listener must match
both specified values.
-
Implementations MAY choose to support attaching Routes to other resources.
If that is the case, they MUST clearly document how SectionName is
interpreted.
-
When unspecified (empty string), this will reference the entire resource.
For the purpose of status, an attachment is considered successful if at
least one section in the parent resource accepts it. For example, Gateway
@@ -8951,7 +6462,6 @@ spec:
attached. If no Gateway listeners accept attachment from this Route, the
Route MUST be considered detached from the Gateway.
-
Support: Core
maxLength: 253
minLength: 1
@@ -8973,7 +6483,9 @@ spec:
- path:
type: PathPrefix
value: /
- description: Rules are a list of HTTP matchers, filters and actions.
+ description: |+
+ Rules are a list of HTTP matchers, filters and actions.
+
items:
description: |-
HTTPRouteRule defines semantics for matching an HTTP request based on
@@ -8985,74 +6497,63 @@ spec:
BackendRefs defines the backend(s) where matching requests should be
sent.
-
Failure behavior here depends on how many BackendRefs are specified and
how many are invalid.
-
If *all* entries in BackendRefs are invalid, and there are also no filters
specified in this route rule, *all* traffic which matches this rule MUST
receive a 500 status code.
-
See the HTTPBackendRef definition for the rules about what makes a single
HTTPBackendRef invalid.
-
When a HTTPBackendRef is invalid, 500 status codes MUST be returned for
requests that would have otherwise been routed to an invalid backend. If
multiple backends are specified, and some are invalid, the proportion of
requests that would otherwise have been routed to an invalid backend
MUST receive a 500 status code.
-
For example, if two backends are specified with equal weights, and one is
invalid, 50 percent of traffic must receive a 500. Implementations may
choose how that 50 percent is determined.
+ When a HTTPBackendRef refers to a Service that has no ready endpoints,
+ implementations SHOULD return a 503 for requests to that backend instead.
+ If an implementation chooses to do this, all of the above rules for 500 responses
+ MUST also apply for responses that return a 503.
Support: Core for Kubernetes Service
-
Support: Extended for Kubernetes ServiceImport
-
Support: Implementation-specific for any other resource
-
Support for weight: Core
items:
description: |-
HTTPBackendRef defines how a HTTPRoute forwards a HTTP request.
-
Note that when a namespace different than the local namespace is specified, a
ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details.
-
-
When the BackendRef points to a Kubernetes Service, implementations SHOULD
honor the appProtocol field if it is set for the target Service Port.
-
Implementations supporting appProtocol SHOULD recognize the Kubernetes
Standard Application Protocols defined in KEP-3726.
-
If a Service appProtocol isn't specified, an implementation MAY infer the
backend protocol through its own means. Implementations MAY infer the
protocol from the Route type referring to the backend Service.
-
If a Route is not able to send traffic to the backend using the specified
protocol then the backend is considered invalid. Implementations MUST set the
"ResolvedRefs" condition to "False" with the "UnsupportedProtocol" reason.
-
properties:
filters:
@@ -9060,7 +6561,6 @@ spec:
Filters defined at this level should be executed if and only if the
request is being forwarded to the backend defined here.
-
Support: Implementation-specific (For broader support of filters, use the
Filters field in HTTPRouteRule.)
items:
@@ -9079,10 +6579,8 @@ spec:
"networking.example.net"). ExtensionRef MUST NOT be used for core and
extended filters.
-
This filter can be used multiple times within the same rule.
-
Support: Implementation-specific
properties:
group:
@@ -9113,7 +6611,6 @@ spec:
RequestHeaderModifier defines a schema for a filter that modifies request
headers.
-
Support: Core
properties:
add:
@@ -9122,18 +6619,15 @@ spec:
before the action. It appends to any existing values associated
with the header name.
-
Input:
GET /foo HTTP/1.1
my-header: foo
-
Config:
add:
- name: "my-header"
value: "bar,baz"
-
Output:
GET /foo HTTP/1.1
my-header: foo,bar,baz
@@ -9145,7 +6639,6 @@ spec:
Name is the name of the HTTP Header to be matched. Name matching MUST be
case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
-
If multiple entries specify equivalent header names, the first entry with
an equivalent name MUST be considered for a match. Subsequent entries
with an equivalent header name MUST be ignored. Due to the
@@ -9176,18 +6669,15 @@ spec:
names are case-insensitive (see
https://datatracker.ietf.org/doc/html/rfc2616#section-4.2).
-
Input:
GET /foo HTTP/1.1
my-header1: foo
my-header2: bar
my-header3: baz
-
Config:
remove: ["my-header1", "my-header3"]
-
Output:
GET /foo HTTP/1.1
my-header2: bar
@@ -9201,18 +6691,15 @@ spec:
Set overwrites the request with the given header (name, value)
before the action.
-
Input:
GET /foo HTTP/1.1
my-header: foo
-
Config:
set:
- name: "my-header"
value: "bar"
-
Output:
GET /foo HTTP/1.1
my-header: bar
@@ -9224,7 +6711,6 @@ spec:
Name is the name of the HTTP Header to be matched. Name matching MUST be
case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
-
If multiple entries specify equivalent header names, the first entry with
an equivalent name MUST be considered for a match. Subsequent entries
with an equivalent header name MUST be ignored. Due to the
@@ -9250,49 +6736,42 @@ spec:
x-kubernetes-list-type: map
type: object
requestMirror:
- description: |-
+ description: |+
RequestMirror defines a schema for a filter that mirrors requests.
Requests are sent to the specified destination, but responses from
that destination are ignored.
-
This filter can be used multiple times within the same rule. Note that
not all implementations will be able to support mirroring to multiple
backends.
-
Support: Extended
+
properties:
backendRef:
description: |-
BackendRef references a resource where mirrored requests are sent.
-
Mirrored requests must be sent only to a single destination endpoint
within this BackendRef, irrespective of how many endpoints are present
within this BackendRef.
-
If the referent cannot be found, this BackendRef is invalid and must be
dropped from the Gateway. The controller must ensure the "ResolvedRefs"
condition on the Route status is set to `status: False` and not configure
this backend in the underlying implementation.
-
If there is a cross-namespace reference to an *existing* object
that is not allowed by a ReferenceGrant, the controller must ensure the
"ResolvedRefs" condition on the Route is set to `status: False`,
with the "RefNotPermitted" reason and not configure this backend in the
underlying implementation.
-
In either error case, the Message of the `ResolvedRefs` Condition
should be used to provide more detail about the problem.
-
Support: Extended for Kubernetes Service
-
Support: Implementation-specific for any other resource
properties:
group:
@@ -9309,20 +6788,16 @@ spec:
Kind is the Kubernetes resource kind of the referent. For example
"Service".
-
Defaults to "Service" when not specified.
-
ExternalName services can refer to CNAME DNS records that may live
outside of the cluster and as such are difficult to reason about in
terms of conformance. They also may not be safe to forward to (see
CVE-2021-25740 for more information). Implementations SHOULD NOT
support ExternalName Services.
-
Support: Core (Services with a type other than ExternalName)
-
Support: Implementation-specific (Services with type ExternalName)
maxLength: 63
minLength: 1
@@ -9338,13 +6813,11 @@ spec:
Namespace is the namespace of the backend. When unspecified, the local
namespace is inferred.
-
Note that when a namespace different than the local namespace is specified,
a ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details.
-
Support: Core
maxLength: 63
minLength: 1
@@ -9367,15 +6840,54 @@ spec:
x-kubernetes-validations:
- message: Must have port for Service reference
rule: '(size(self.group) == 0 && self.kind == ''Service'') ? has(self.port) : true'
+ fraction:
+ description: |+
+ Fraction represents the fraction of requests that should be
+ mirrored to BackendRef.
+
+ Only one of Fraction or Percent may be specified. If neither field
+ is specified, 100% of requests will be mirrored.
+
+ properties:
+ denominator:
+ default: 100
+ format: int32
+ minimum: 1
+ type: integer
+ numerator:
+ format: int32
+ minimum: 0
+ type: integer
+ required:
+ - numerator
+ type: object
+ x-kubernetes-validations:
+ - message: numerator must be less than or equal to denominator
+ rule: self.numerator <= self.denominator
+ percent:
+ description: |+
+ Percent represents the percentage of requests that should be
+ mirrored to BackendRef. Its minimum value is 0 (indicating 0% of
+ requests) and its maximum value is 100 (indicating 100% of requests).
+
+ Only one of Fraction or Percent may be specified. If neither field
+ is specified, 100% of requests will be mirrored.
+
+ format: int32
+ maximum: 100
+ minimum: 0
+ type: integer
required:
- backendRef
type: object
+ x-kubernetes-validations:
+ - message: Only one of percent or fraction may be specified in HTTPRequestMirrorFilter
+ rule: '!(has(self.percent) && has(self.fraction))'
requestRedirect:
description: |-
RequestRedirect defines a schema for a filter that responds to the
request with an HTTP redirection.
-
Support: Core
properties:
hostname:
@@ -9384,7 +6896,6 @@ spec:
header in the response.
When empty, the hostname in the `Host` header of the request is used.
-
Support: Core
maxLength: 253
minLength: 1
@@ -9396,7 +6907,6 @@ spec:
The modified path is then used to construct the `Location` header. When
empty, the request path is used as-is.
-
Support: Extended
properties:
replaceFullPath:
@@ -9412,32 +6922,17 @@ spec:
to "/foo/bar" with a prefix match of "/foo" and a ReplacePrefixMatch
of "/xyz" would be modified to "/xyz/bar".
-
Note that this matches the behavior of the PathPrefix match type. This
matches full path elements. A path element refers to the list of labels
in the path split by the `/` separator. When specified, a trailing `/` is
ignored. For example, the paths `/abc`, `/abc/`, and `/abc/def` would all
match the prefix `/abc`, but the path `/abcd` would not.
-
ReplacePrefixMatch is only compatible with a `PathPrefix` HTTPRouteMatch.
Using any other HTTPRouteMatch type on the same HTTPRouteRule will result in
the implementation setting the Accepted Condition for the Route to `status: False`.
-
Request Path | Prefix Match | Replace Prefix | Modified Path
- -------------|--------------|----------------|----------
- /foo/bar | /foo | /xyz | /xyz/bar
- /foo/bar | /foo | /xyz/ | /xyz/bar
- /foo/bar | /foo/ | /xyz | /xyz/bar
- /foo/bar | /foo/ | /xyz/ | /xyz/bar
- /foo | /foo | /xyz | /xyz
- /foo/ | /foo | /xyz | /xyz/
- /foo/bar | /foo | | /bar
- /foo/ | /foo | | /
- /foo | /foo | | /
- /foo/ | /foo | / | /
- /foo | /foo | / | /
maxLength: 1024
type: string
type:
@@ -9445,11 +6940,9 @@ spec:
Type defines the type of path modifier. Additional types may be
added in a future release of the API.
-
Note that values may be added to this enum, implementations
must ensure that unknown values will not cause a crash.
-
Unknown values here must result in the implementation setting the
Accepted Condition for the Route to `status: False`, with a
Reason of `UnsupportedValue`.
@@ -9474,11 +6967,9 @@ spec:
Port is the port to be used in the value of the `Location`
header in the response.
-
If no port is specified, the redirect port MUST be derived using the
following rules:
-
* If redirect scheme is not-empty, the redirect port MUST be the well-known
port associated with the redirect scheme. Specifically "http" to port 80
and "https" to port 443. If the redirect scheme does not have a
@@ -9486,17 +6977,14 @@ spec:
* If redirect scheme is empty, the redirect port MUST be the Gateway
Listener port.
-
Implementations SHOULD NOT add the port number in the 'Location'
header in the following cases:
-
* A Location header that will use HTTP (whether that is determined via
the Listener protocol or the Scheme field) _and_ use port 80.
* A Location header that will use HTTPS (whether that is determined via
the Listener protocol or the Scheme field) _and_ use port 443.
-
Support: Extended
format: int32
maximum: 65535
@@ -9507,20 +6995,16 @@ spec:
Scheme is the scheme to be used in the value of the `Location` header in
the response. When empty, the scheme of the request is used.
-
Scheme redirects can affect the port of the redirect, for more information,
refer to the documentation for the port field of this filter.
-
Note that values may be added to this enum, implementations
must ensure that unknown values will not cause a crash.
-
Unknown values here must result in the implementation setting the
Accepted Condition for the Route to `status: False`, with a
Reason of `UnsupportedValue`.
-
Support: Extended
enum:
- http
@@ -9531,16 +7015,13 @@ spec:
description: |-
StatusCode is the HTTP status code to be used in response.
-
Note that values may be added to this enum, implementations
must ensure that unknown values will not cause a crash.
-
Unknown values here must result in the implementation setting the
Accepted Condition for the Route to `status: False`, with a
Reason of `UnsupportedValue`.
-
Support: Core
enum:
- 301
@@ -9552,7 +7033,6 @@ spec:
ResponseHeaderModifier defines a schema for a filter that modifies response
headers.
-
Support: Extended
properties:
add:
@@ -9561,18 +7041,15 @@ spec:
before the action. It appends to any existing values associated
with the header name.
-
Input:
GET /foo HTTP/1.1
my-header: foo
-
Config:
add:
- name: "my-header"
value: "bar,baz"
-
Output:
GET /foo HTTP/1.1
my-header: foo,bar,baz
@@ -9584,7 +7061,6 @@ spec:
Name is the name of the HTTP Header to be matched. Name matching MUST be
case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
-
If multiple entries specify equivalent header names, the first entry with
an equivalent name MUST be considered for a match. Subsequent entries
with an equivalent header name MUST be ignored. Due to the
@@ -9615,18 +7091,15 @@ spec:
names are case-insensitive (see
https://datatracker.ietf.org/doc/html/rfc2616#section-4.2).
-
Input:
GET /foo HTTP/1.1
my-header1: foo
my-header2: bar
my-header3: baz
-
Config:
remove: ["my-header1", "my-header3"]
-
Output:
GET /foo HTTP/1.1
my-header2: bar
@@ -9640,18 +7113,15 @@ spec:
Set overwrites the request with the given header (name, value)
before the action.
-
Input:
GET /foo HTTP/1.1
my-header: foo
-
Config:
set:
- name: "my-header"
value: "bar"
-
Output:
GET /foo HTTP/1.1
my-header: bar
@@ -9663,7 +7133,6 @@ spec:
Name is the name of the HTTP Header to be matched. Name matching MUST be
case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
-
If multiple entries specify equivalent header names, the first entry with
an equivalent name MUST be considered for a match. Subsequent entries
with an equivalent header name MUST be ignored. Due to the
@@ -9693,17 +7162,14 @@ spec:
Type identifies the type of filter to apply. As with other API fields,
types are classified into three conformance levels:
-
- Core: Filter types and their corresponding configuration defined by
"Support: Core" in this package, e.g. "RequestHeaderModifier". All
implementations must support core filters.
-
- Extended: Filter types and their corresponding configuration defined by
"Support: Extended" in this package, e.g. "RequestMirror". Implementers
are encouraged to support extended filters.
-
- Implementation-specific: Filters that are defined and supported by
specific vendors.
In the future, filters showing convergence in behavior across multiple
@@ -9712,20 +7178,16 @@ spec:
is specified using the ExtensionRef field. `Type` should be set to
"ExtensionRef" for custom filters.
-
Implementers are encouraged to define custom implementation types to
extend the core API with implementation-specific behavior.
-
If a reference to a custom filter type cannot be resolved, the filter
MUST NOT be skipped. Instead, requests that would have been processed by
that filter MUST receive a HTTP error response.
-
Note that values may be added to this enum, implementations
must ensure that unknown values will not cause a crash.
-
Unknown values here must result in the implementation setting the
Accepted Condition for the Route to `status: False`, with a
Reason of `UnsupportedValue`.
@@ -9741,7 +7203,6 @@ spec:
description: |-
URLRewrite defines a schema for a filter that modifies a request during forwarding.
-
Support: Extended
properties:
hostname:
@@ -9749,7 +7210,6 @@ spec:
Hostname is the value to be used to replace the Host header value during
forwarding.
-
Support: Extended
maxLength: 253
minLength: 1
@@ -9759,7 +7219,6 @@ spec:
description: |-
Path defines a path rewrite.
-
Support: Extended
properties:
replaceFullPath:
@@ -9775,32 +7234,17 @@ spec:
to "/foo/bar" with a prefix match of "/foo" and a ReplacePrefixMatch
of "/xyz" would be modified to "/xyz/bar".
-
Note that this matches the behavior of the PathPrefix match type. This
matches full path elements. A path element refers to the list of labels
in the path split by the `/` separator. When specified, a trailing `/` is
ignored. For example, the paths `/abc`, `/abc/`, and `/abc/def` would all
match the prefix `/abc`, but the path `/abcd` would not.
-
ReplacePrefixMatch is only compatible with a `PathPrefix` HTTPRouteMatch.
Using any other HTTPRouteMatch type on the same HTTPRouteRule will result in
the implementation setting the Accepted Condition for the Route to `status: False`.
-
Request Path | Prefix Match | Replace Prefix | Modified Path
- -------------|--------------|----------------|----------
- /foo/bar | /foo | /xyz | /xyz/bar
- /foo/bar | /foo | /xyz/ | /xyz/bar
- /foo/bar | /foo/ | /xyz | /xyz/bar
- /foo/bar | /foo/ | /xyz/ | /xyz/bar
- /foo | /foo | /xyz | /xyz
- /foo/ | /foo | /xyz | /xyz/
- /foo/bar | /foo | | /bar
- /foo/ | /foo | | /
- /foo | /foo | | /
- /foo/ | /foo | / | /
- /foo | /foo | / | /
maxLength: 1024
type: string
type:
@@ -9808,11 +7252,9 @@ spec:
Type defines the type of path modifier. Additional types may be
added in a future release of the API.
-
Note that values may be added to this enum, implementations
must ensure that unknown values will not cause a crash.
-
Unknown values here must result in the implementation setting the
Accepted Condition for the Route to `status: False`, with a
Reason of `UnsupportedValue`.
@@ -9890,20 +7332,16 @@ spec:
Kind is the Kubernetes resource kind of the referent. For example
"Service".
-
Defaults to "Service" when not specified.
-
ExternalName services can refer to CNAME DNS records that may live
outside of the cluster and as such are difficult to reason about in
terms of conformance. They also may not be safe to forward to (see
CVE-2021-25740 for more information). Implementations SHOULD NOT
support ExternalName Services.
-
Support: Core (Services with a type other than ExternalName)
-
Support: Implementation-specific (Services with type ExternalName)
maxLength: 63
minLength: 1
@@ -9919,13 +7357,11 @@ spec:
Namespace is the namespace of the backend. When unspecified, the local
namespace is inferred.
-
Note that when a namespace different than the local namespace is specified,
a ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details.
-
Support: Core
maxLength: 63
minLength: 1
@@ -9952,13 +7388,11 @@ spec:
implementation supports. Weight is not a percentage and the sum of
weights does not need to equal 100.
-
If only one backend is specified and it has a weight greater than 0, 100%
of the traffic is forwarded to that backend. If weight is set to 0, no
traffic should be forwarded for this entry. If unspecified, weight
defaults to 1.
-
Support for this field varies based on the context where used.
format: int32
maximum: 1000000
@@ -9977,37 +7411,30 @@ spec:
Filters define the filters that are applied to requests that match
this rule.
-
Wherever possible, implementations SHOULD implement filters in the order
they are specified.
-
Implementations MAY choose to implement this ordering strictly, rejecting
any combination or order of filters that can not be supported. If implementations
choose a strict interpretation of filter ordering, they MUST clearly document
that behavior.
-
To reject an invalid combination or order of filters, implementations SHOULD
consider the Route Rules with this configuration invalid. If all Route Rules
in a Route are invalid, the entire Route would be considered invalid. If only
a portion of Route Rules are invalid, implementations MUST set the
"PartiallyInvalid" condition for the Route.
-
Conformance-levels at this level are defined based on the type of filter:
-
- ALL core filters MUST be supported by all implementations.
- Implementers are encouraged to support extended filters.
- Implementation-specific custom filters have no API guarantees across
implementations.
-
Specifying the same filter multiple times is not supported unless explicitly
indicated in the filter.
-
All filters are expected to be compatible with each other except for the
URLRewrite and RequestRedirect filters, which may not be combined. If an
implementation can not support other combinations of filters, they must clearly
@@ -10016,7 +7443,6 @@ spec:
`False`, implementations may use the `IncompatibleFilters` reason to specify
this configuration error.
-
Support: Core
items:
description: |-
@@ -10034,10 +7460,8 @@ spec:
"networking.example.net"). ExtensionRef MUST NOT be used for core and
extended filters.
-
This filter can be used multiple times within the same rule.
-
Support: Implementation-specific
properties:
group:
@@ -10068,7 +7492,6 @@ spec:
RequestHeaderModifier defines a schema for a filter that modifies request
headers.
-
Support: Core
properties:
add:
@@ -10077,18 +7500,15 @@ spec:
before the action. It appends to any existing values associated
with the header name.
-
Input:
GET /foo HTTP/1.1
my-header: foo
-
Config:
add:
- name: "my-header"
value: "bar,baz"
-
Output:
GET /foo HTTP/1.1
my-header: foo,bar,baz
@@ -10100,7 +7520,6 @@ spec:
Name is the name of the HTTP Header to be matched. Name matching MUST be
case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
-
If multiple entries specify equivalent header names, the first entry with
an equivalent name MUST be considered for a match. Subsequent entries
with an equivalent header name MUST be ignored. Due to the
@@ -10131,18 +7550,15 @@ spec:
names are case-insensitive (see
https://datatracker.ietf.org/doc/html/rfc2616#section-4.2).
-
Input:
GET /foo HTTP/1.1
my-header1: foo
my-header2: bar
my-header3: baz
-
Config:
remove: ["my-header1", "my-header3"]
-
Output:
GET /foo HTTP/1.1
my-header2: bar
@@ -10156,18 +7572,15 @@ spec:
Set overwrites the request with the given header (name, value)
before the action.
-
Input:
GET /foo HTTP/1.1
my-header: foo
-
Config:
set:
- name: "my-header"
value: "bar"
-
Output:
GET /foo HTTP/1.1
my-header: bar
@@ -10179,7 +7592,6 @@ spec:
Name is the name of the HTTP Header to be matched. Name matching MUST be
case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
-
If multiple entries specify equivalent header names, the first entry with
an equivalent name MUST be considered for a match. Subsequent entries
with an equivalent header name MUST be ignored. Due to the
@@ -10205,49 +7617,42 @@ spec:
x-kubernetes-list-type: map
type: object
requestMirror:
- description: |-
+ description: |+
RequestMirror defines a schema for a filter that mirrors requests.
Requests are sent to the specified destination, but responses from
that destination are ignored.
-
This filter can be used multiple times within the same rule. Note that
not all implementations will be able to support mirroring to multiple
backends.
-
Support: Extended
+
properties:
backendRef:
description: |-
BackendRef references a resource where mirrored requests are sent.
-
Mirrored requests must be sent only to a single destination endpoint
within this BackendRef, irrespective of how many endpoints are present
within this BackendRef.
-
If the referent cannot be found, this BackendRef is invalid and must be
dropped from the Gateway. The controller must ensure the "ResolvedRefs"
condition on the Route status is set to `status: False` and not configure
this backend in the underlying implementation.
-
If there is a cross-namespace reference to an *existing* object
that is not allowed by a ReferenceGrant, the controller must ensure the
"ResolvedRefs" condition on the Route is set to `status: False`,
with the "RefNotPermitted" reason and not configure this backend in the
underlying implementation.
-
In either error case, the Message of the `ResolvedRefs` Condition
should be used to provide more detail about the problem.
-
Support: Extended for Kubernetes Service
-
Support: Implementation-specific for any other resource
properties:
group:
@@ -10264,20 +7669,16 @@ spec:
Kind is the Kubernetes resource kind of the referent. For example
"Service".
-
Defaults to "Service" when not specified.
-
ExternalName services can refer to CNAME DNS records that may live
outside of the cluster and as such are difficult to reason about in
terms of conformance. They also may not be safe to forward to (see
CVE-2021-25740 for more information). Implementations SHOULD NOT
support ExternalName Services.
-
Support: Core (Services with a type other than ExternalName)
-
Support: Implementation-specific (Services with type ExternalName)
maxLength: 63
minLength: 1
@@ -10293,13 +7694,11 @@ spec:
Namespace is the namespace of the backend. When unspecified, the local
namespace is inferred.
-
Note that when a namespace different than the local namespace is specified,
a ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details.
-
Support: Core
maxLength: 63
minLength: 1
@@ -10322,15 +7721,54 @@ spec:
x-kubernetes-validations:
- message: Must have port for Service reference
rule: '(size(self.group) == 0 && self.kind == ''Service'') ? has(self.port) : true'
+ fraction:
+ description: |+
+ Fraction represents the fraction of requests that should be
+ mirrored to BackendRef.
+
+ Only one of Fraction or Percent may be specified. If neither field
+ is specified, 100% of requests will be mirrored.
+
+ properties:
+ denominator:
+ default: 100
+ format: int32
+ minimum: 1
+ type: integer
+ numerator:
+ format: int32
+ minimum: 0
+ type: integer
+ required:
+ - numerator
+ type: object
+ x-kubernetes-validations:
+ - message: numerator must be less than or equal to denominator
+ rule: self.numerator <= self.denominator
+ percent:
+ description: |+
+ Percent represents the percentage of requests that should be
+ mirrored to BackendRef. Its minimum value is 0 (indicating 0% of
+ requests) and its maximum value is 100 (indicating 100% of requests).
+
+ Only one of Fraction or Percent may be specified. If neither field
+ is specified, 100% of requests will be mirrored.
+
+ format: int32
+ maximum: 100
+ minimum: 0
+ type: integer
required:
- backendRef
type: object
+ x-kubernetes-validations:
+ - message: Only one of percent or fraction may be specified in HTTPRequestMirrorFilter
+ rule: '!(has(self.percent) && has(self.fraction))'
requestRedirect:
description: |-
RequestRedirect defines a schema for a filter that responds to the
request with an HTTP redirection.
-
Support: Core
properties:
hostname:
@@ -10339,7 +7777,6 @@ spec:
header in the response.
When empty, the hostname in the `Host` header of the request is used.
-
Support: Core
maxLength: 253
minLength: 1
@@ -10351,7 +7788,6 @@ spec:
The modified path is then used to construct the `Location` header. When
empty, the request path is used as-is.
-
Support: Extended
properties:
replaceFullPath:
@@ -10367,32 +7803,17 @@ spec:
to "/foo/bar" with a prefix match of "/foo" and a ReplacePrefixMatch
of "/xyz" would be modified to "/xyz/bar".
-
Note that this matches the behavior of the PathPrefix match type. This
matches full path elements. A path element refers to the list of labels
in the path split by the `/` separator. When specified, a trailing `/` is
ignored. For example, the paths `/abc`, `/abc/`, and `/abc/def` would all
match the prefix `/abc`, but the path `/abcd` would not.
-
ReplacePrefixMatch is only compatible with a `PathPrefix` HTTPRouteMatch.
Using any other HTTPRouteMatch type on the same HTTPRouteRule will result in
the implementation setting the Accepted Condition for the Route to `status: False`.
-
Request Path | Prefix Match | Replace Prefix | Modified Path
- -------------|--------------|----------------|----------
- /foo/bar | /foo | /xyz | /xyz/bar
- /foo/bar | /foo | /xyz/ | /xyz/bar
- /foo/bar | /foo/ | /xyz | /xyz/bar
- /foo/bar | /foo/ | /xyz/ | /xyz/bar
- /foo | /foo | /xyz | /xyz
- /foo/ | /foo | /xyz | /xyz/
- /foo/bar | /foo | | /bar
- /foo/ | /foo | | /
- /foo | /foo | | /
- /foo/ | /foo | / | /
- /foo | /foo | / | /
maxLength: 1024
type: string
type:
@@ -10400,11 +7821,9 @@ spec:
Type defines the type of path modifier. Additional types may be
added in a future release of the API.
-
Note that values may be added to this enum, implementations
must ensure that unknown values will not cause a crash.
-
Unknown values here must result in the implementation setting the
Accepted Condition for the Route to `status: False`, with a
Reason of `UnsupportedValue`.
@@ -10429,11 +7848,9 @@ spec:
Port is the port to be used in the value of the `Location`
header in the response.
-
If no port is specified, the redirect port MUST be derived using the
following rules:
-
* If redirect scheme is not-empty, the redirect port MUST be the well-known
port associated with the redirect scheme. Specifically "http" to port 80
and "https" to port 443. If the redirect scheme does not have a
@@ -10441,17 +7858,14 @@ spec:
* If redirect scheme is empty, the redirect port MUST be the Gateway
Listener port.
-
Implementations SHOULD NOT add the port number in the 'Location'
header in the following cases:
-
* A Location header that will use HTTP (whether that is determined via
the Listener protocol or the Scheme field) _and_ use port 80.
* A Location header that will use HTTPS (whether that is determined via
the Listener protocol or the Scheme field) _and_ use port 443.
-
Support: Extended
format: int32
maximum: 65535
@@ -10462,20 +7876,16 @@ spec:
Scheme is the scheme to be used in the value of the `Location` header in
the response. When empty, the scheme of the request is used.
-
Scheme redirects can affect the port of the redirect, for more information,
refer to the documentation for the port field of this filter.
-
Note that values may be added to this enum, implementations
must ensure that unknown values will not cause a crash.
-
Unknown values here must result in the implementation setting the
Accepted Condition for the Route to `status: False`, with a
Reason of `UnsupportedValue`.
-
Support: Extended
enum:
- http
@@ -10486,16 +7896,13 @@ spec:
description: |-
StatusCode is the HTTP status code to be used in response.
-
Note that values may be added to this enum, implementations
must ensure that unknown values will not cause a crash.
-
Unknown values here must result in the implementation setting the
Accepted Condition for the Route to `status: False`, with a
Reason of `UnsupportedValue`.
-
Support: Core
enum:
- 301
@@ -10507,7 +7914,6 @@ spec:
ResponseHeaderModifier defines a schema for a filter that modifies response
headers.
-
Support: Extended
properties:
add:
@@ -10516,18 +7922,15 @@ spec:
before the action. It appends to any existing values associated
with the header name.
-
Input:
GET /foo HTTP/1.1
my-header: foo
-
Config:
add:
- name: "my-header"
value: "bar,baz"
-
Output:
GET /foo HTTP/1.1
my-header: foo,bar,baz
@@ -10539,7 +7942,6 @@ spec:
Name is the name of the HTTP Header to be matched. Name matching MUST be
case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
-
If multiple entries specify equivalent header names, the first entry with
an equivalent name MUST be considered for a match. Subsequent entries
with an equivalent header name MUST be ignored. Due to the
@@ -10570,18 +7972,15 @@ spec:
names are case-insensitive (see
https://datatracker.ietf.org/doc/html/rfc2616#section-4.2).
-
Input:
GET /foo HTTP/1.1
my-header1: foo
my-header2: bar
my-header3: baz
-
Config:
remove: ["my-header1", "my-header3"]
-
Output:
GET /foo HTTP/1.1
my-header2: bar
@@ -10595,18 +7994,15 @@ spec:
Set overwrites the request with the given header (name, value)
before the action.
-
Input:
GET /foo HTTP/1.1
my-header: foo
-
Config:
set:
- name: "my-header"
value: "bar"
-
Output:
GET /foo HTTP/1.1
my-header: bar
@@ -10618,7 +8014,6 @@ spec:
Name is the name of the HTTP Header to be matched. Name matching MUST be
case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
-
If multiple entries specify equivalent header names, the first entry with
an equivalent name MUST be considered for a match. Subsequent entries
with an equivalent header name MUST be ignored. Due to the
@@ -10648,17 +8043,14 @@ spec:
Type identifies the type of filter to apply. As with other API fields,
types are classified into three conformance levels:
-
- Core: Filter types and their corresponding configuration defined by
"Support: Core" in this package, e.g. "RequestHeaderModifier". All
implementations must support core filters.
-
- Extended: Filter types and their corresponding configuration defined by
"Support: Extended" in this package, e.g. "RequestMirror". Implementers
are encouraged to support extended filters.
-
- Implementation-specific: Filters that are defined and supported by
specific vendors.
In the future, filters showing convergence in behavior across multiple
@@ -10667,20 +8059,16 @@ spec:
is specified using the ExtensionRef field. `Type` should be set to
"ExtensionRef" for custom filters.
-
Implementers are encouraged to define custom implementation types to
extend the core API with implementation-specific behavior.
-
If a reference to a custom filter type cannot be resolved, the filter
MUST NOT be skipped. Instead, requests that would have been processed by
that filter MUST receive a HTTP error response.
-
Note that values may be added to this enum, implementations
must ensure that unknown values will not cause a crash.
-
Unknown values here must result in the implementation setting the
Accepted Condition for the Route to `status: False`, with a
Reason of `UnsupportedValue`.
@@ -10696,7 +8084,6 @@ spec:
description: |-
URLRewrite defines a schema for a filter that modifies a request during forwarding.
-
Support: Extended
properties:
hostname:
@@ -10704,7 +8091,6 @@ spec:
Hostname is the value to be used to replace the Host header value during
forwarding.
-
Support: Extended
maxLength: 253
minLength: 1
@@ -10714,7 +8100,6 @@ spec:
description: |-
Path defines a path rewrite.
-
Support: Extended
properties:
replaceFullPath:
@@ -10730,32 +8115,17 @@ spec:
to "/foo/bar" with a prefix match of "/foo" and a ReplacePrefixMatch
of "/xyz" would be modified to "/xyz/bar".
-
Note that this matches the behavior of the PathPrefix match type. This
matches full path elements. A path element refers to the list of labels
in the path split by the `/` separator. When specified, a trailing `/` is
ignored. For example, the paths `/abc`, `/abc/`, and `/abc/def` would all
match the prefix `/abc`, but the path `/abcd` would not.
-
ReplacePrefixMatch is only compatible with a `PathPrefix` HTTPRouteMatch.
Using any other HTTPRouteMatch type on the same HTTPRouteRule will result in
the implementation setting the Accepted Condition for the Route to `status: False`.
-
Request Path | Prefix Match | Replace Prefix | Modified Path
- -------------|--------------|----------------|----------
- /foo/bar | /foo | /xyz | /xyz/bar
- /foo/bar | /foo | /xyz/ | /xyz/bar
- /foo/bar | /foo/ | /xyz | /xyz/bar
- /foo/bar | /foo/ | /xyz/ | /xyz/bar
- /foo | /foo | /xyz | /xyz
- /foo/ | /foo | /xyz | /xyz/
- /foo/bar | /foo | | /bar
- /foo/ | /foo | | /
- /foo | /foo | | /
- /foo/ | /foo | / | /
- /foo | /foo | / | /
maxLength: 1024
type: string
type:
@@ -10763,11 +8133,9 @@ spec:
Type defines the type of path modifier. Additional types may be
added in a future release of the API.
-
Note that values may be added to this enum, implementations
must ensure that unknown values will not cause a crash.
-
Unknown values here must result in the implementation setting the
Accepted Condition for the Route to `status: False`, with a
Reason of `UnsupportedValue`.
@@ -10839,10 +8207,8 @@ spec:
HTTP requests. Each match is independent, i.e. this rule will be matched
if **any** one of the matches is satisfied.
-
For example, take the following matches configuration:
-
```
matches:
- path:
@@ -10854,58 +8220,47 @@ spec:
value: "/v2/foo"
```
-
For a request to match against this rule, a request must satisfy
EITHER of the two conditions:
-
- path prefixed with `/foo` AND contains the header `version: v2`
- path prefix of `/v2/foo`
-
See the documentation for HTTPRouteMatch on how to specify multiple
match conditions that should be ANDed together.
-
If no matches are specified, the default is a prefix
path match on "/", which has the effect of matching every
HTTP request.
-
Proxy or Load Balancer routing configuration generated from HTTPRoutes
MUST prioritize matches based on the following criteria, continuing on
ties. Across all rules specified on applicable Routes, precedence must be
given to the match having:
-
* "Exact" path match.
* "Prefix" path match with largest number of characters.
* Method match.
* Largest number of header matches.
* Largest number of query param matches.
-
Note: The precedence of RegularExpression path matches are implementation-specific.
-
If ties still exist across multiple Routes, matching precedence MUST be
determined in order of the following criteria, continuing on ties:
-
* The oldest Route based on creation timestamp.
* The Route appearing first in alphabetical order by
"{namespace}/{name}".
-
If ties still exist within an HTTPRoute, matching precedence MUST be granted
to the FIRST matching rule (in list order) with a match meeting the above
criteria.
-
When no rules matching a request have been successfully attached to the
parent a request is coming from, a HTTP 404 status code MUST be returned.
items:
- description: "HTTPRouteMatch defines the predicate used to match requests to a given\naction. Multiple match types are ANDed together, i.e. the match will\nevaluate to true only if all conditions are satisfied.\n\n\nFor example, the match below will match a HTTP request only if its path\nstarts with `/foo` AND it contains the `version: v1` header:\n\n\n```\nmatch:\n\n\n\tpath:\n\t value: \"/foo\"\n\theaders:\n\t- name: \"version\"\n\t value \"v1\"\n\n\n```"
+ description: "HTTPRouteMatch defines the predicate used to match requests to a given\naction. Multiple match types are ANDed together, i.e. the match will\nevaluate to true only if all conditions are satisfied.\n\nFor example, the match below will match a HTTP request only if its path\nstarts with `/foo` AND it contains the `version: v1` header:\n\n```\nmatch:\n\n\tpath:\n\t value: \"/foo\"\n\theaders:\n\t- name: \"version\"\n\t value \"v1\"\n\n```"
properties:
headers:
description: |-
@@ -10922,14 +8277,12 @@ spec:
Name is the name of the HTTP Header to be matched. Name matching MUST be
case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
-
If multiple entries specify equivalent header names, only the first
entry with an equivalent name MUST be considered for a match. Subsequent
entries with an equivalent header name MUST be ignored. Due to the
case-insensitivity of header names, "foo" and "Foo" are considered
equivalent.
-
When a header is repeated in an HTTP request, it is
implementation-specific behavior as to how this is represented.
Generally, proxies should follow the guidance from the RFC:
@@ -10944,13 +8297,10 @@ spec:
description: |-
Type specifies how to match against the value of the header.
-
Support: Core (Exact)
-
Support: Implementation-specific (RegularExpression)
-
Since RegularExpression HeaderMatchType has implementation-specific
conformance, implementations can support POSIX, PCRE or any other dialects
of regular expressions. Please read the implementation's documentation to
@@ -10979,7 +8329,6 @@ spec:
When specified, this route will be matched only if the request has the
specified method.
-
Support: Extended
enum:
- GET
@@ -11005,10 +8354,8 @@ spec:
description: |-
Type specifies how to match against the path Value.
-
Support: Core (Exact, PathPrefix)
-
Support: Implementation-specific (RegularExpression)
enum:
- Exact
@@ -11050,7 +8397,6 @@ spec:
values are ANDed together, meaning, a request must match all the
specified query parameters to select the route.
-
Support: Extended
items:
description: |-
@@ -11063,12 +8409,10 @@ spec:
exact string match. (See
https://tools.ietf.org/html/rfc7230#section-2.7.3).
-
If multiple entries specify equivalent query param names, only the first
entry with an equivalent name MUST be considered for a match. Subsequent
entries with an equivalent query param name MUST be ignored.
-
If a query param is repeated in an HTTP request, the behavior is
purposely left undefined, since different data planes have different
capabilities. However, it is *recommended* that implementations should
@@ -11076,7 +8420,6 @@ spec:
as this behavior is expected in other load balancing contexts outside of
the Gateway API.
-
Users SHOULD NOT route traffic based on repeated query params to guard
themselves against potential differences in the implementations.
maxLength: 256
@@ -11088,13 +8431,10 @@ spec:
description: |-
Type specifies how to match against the value of the query parameter.
-
Support: Extended (Exact)
-
Support: Implementation-specific (RegularExpression)
-
Since RegularExpression QueryParamMatchType has Implementation-specific
conformance, implementations can support POSIX, PCRE or any other
dialects of regular expressions. Please read the implementation's
@@ -11118,17 +8458,114 @@ spec:
- name
x-kubernetes-list-type: map
type: object
- maxItems: 8
+ maxItems: 64
type: array
+ name:
+ description: |
+ Name is the name of the route rule. This name MUST be unique within a Route if it is set.
+
+ Support: Extended
+ maxLength: 253
+ minLength: 1
+ pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
+ type: string
+ retry:
+ description: |+
+ Retry defines the configuration for when to retry an HTTP request.
+
+ Support: Extended
+
+ properties:
+ attempts:
+ description: |-
+ Attempts specifies the maxmimum number of times an individual request
+ from the gateway to a backend should be retried.
+
+ If the maximum number of retries has been attempted without a successful
+ response from the backend, the Gateway MUST return an error.
+
+ When this field is unspecified, the number of times to attempt to retry
+ a backend request is implementation-specific.
+
+ Support: Extended
+ type: integer
+ backoff:
+ description: |-
+ Backoff specifies the minimum duration a Gateway should wait between
+ retry attempts and is represented in Gateway API Duration formatting.
+
+ For example, setting the `rules[].retry.backoff` field to the value
+ `100ms` will cause a backend request to first be retried approximately
+ 100 milliseconds after timing out or receiving a response code configured
+ to be retryable.
+
+ An implementation MAY use an exponential or alternative backoff strategy
+ for subsequent retry attempts, MAY cap the maximum backoff duration to
+ some amount greater than the specified minimum, and MAY add arbitrary
+ jitter to stagger requests, as long as unsuccessful backend requests are
+ not retried before the configured minimum duration.
+
+ If a Request timeout (`rules[].timeouts.request`) is configured on the
+ route, the entire duration of the initial request and any retry attempts
+ MUST not exceed the Request timeout duration. If any retry attempts are
+ still in progress when the Request timeout duration has been reached,
+ these SHOULD be canceled if possible and the Gateway MUST immediately
+ return a timeout error.
+
+ If a BackendRequest timeout (`rules[].timeouts.backendRequest`) is
+ configured on the route, any retry attempts which reach the configured
+ BackendRequest timeout duration without a response SHOULD be canceled if
+ possible and the Gateway should wait for at least the specified backoff
+ duration before attempting to retry the backend request again.
+
+ If a BackendRequest timeout is _not_ configured on the route, retry
+ attempts MAY time out after an implementation default duration, or MAY
+ remain pending until a configured Request timeout or implementation
+ default duration for total request time is reached.
+
+ When this field is unspecified, the time to wait between retry attempts
+ is implementation-specific.
+
+ Support: Extended
+ pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
+ type: string
+ codes:
+ description: |-
+ Codes defines the HTTP response status codes for which a backend request
+ should be retried.
+
+ Support: Extended
+ items:
+ description: |-
+ HTTPRouteRetryStatusCode defines an HTTP response status code for
+ which a backend request should be retried.
+
+ Implementations MUST support the following status codes as retryable:
+
+ * 500
+ * 502
+ * 503
+ * 504
+
+ Implementations MAY support specifying additional discrete values in the
+ 500-599 range.
+
+ Implementations MAY support specifying discrete values in the 400-499 range,
+ which are often inadvisable to retry.
+
+
+ maximum: 599
+ minimum: 400
+ type: integer
+ type: array
+ type: object
sessionPersistence:
description: |+
SessionPersistence defines and configures session persistence
for the route rule.
-
Support: Extended
-
properties:
absoluteTimeout:
description: |-
@@ -11136,7 +8573,6 @@ spec:
session. Once the AbsoluteTimeout duration has elapsed, the
session becomes invalid.
-
Support: Extended
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
@@ -11145,7 +8581,6 @@ spec:
CookieConfig provides configuration settings that are specific
to cookie-based session persistence.
-
Support: Core
properties:
lifetimeType:
@@ -11157,20 +8592,16 @@ spec:
attributes, while a session cookie is deleted when the current
session ends.
-
When set to "Permanent", AbsoluteTimeout indicates the
cookie's lifetime via the Expires or Max-Age cookie attributes
and is required.
-
When set to "Session", AbsoluteTimeout indicates the
absolute lifetime of the cookie tracked by the gateway and
is optional.
-
Support: Core for "Session" type
-
Support: Extended for "Permanent" type
enum:
- Permanent
@@ -11183,7 +8614,6 @@ spec:
Once the session has been idle for more than the specified
IdleTimeout duration, the session becomes invalid.
-
Support: Extended
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
@@ -11194,7 +8624,6 @@ spec:
should avoid reusing session names to prevent unintended
consequences, such as rejection or unpredictable behavior.
-
Support: Implementation-specific
maxLength: 128
type: string
@@ -11205,10 +8634,8 @@ spec:
the use a header or cookie. Defaults to cookie based session
persistence.
-
Support: Core for "Cookie" type
-
Support: Extended for "Header" type
enum:
- Cookie
@@ -11217,15 +8644,12 @@ spec:
type: object
x-kubernetes-validations:
- message: AbsoluteTimeout must be specified when cookie lifetimeType is Permanent
- rule: '!has(self.cookieConfig.lifetimeType) || self.cookieConfig.lifetimeType != ''Permanent'' || has(self.absoluteTimeout)'
+ rule: '!has(self.cookieConfig) || !has(self.cookieConfig.lifetimeType) || self.cookieConfig.lifetimeType != ''Permanent'' || has(self.absoluteTimeout)'
timeouts:
- description: |+
+ description: |-
Timeouts defines the timeouts that can be configured for an HTTP request.
-
Support: Extended
-
-
properties:
backendRequest:
description: |-
@@ -11233,21 +8657,19 @@ spec:
to a backend. This covers the time from when the request first starts being
sent from the gateway to when the full response has been received from the backend.
-
Setting a timeout to the zero duration (e.g. "0s") SHOULD disable the timeout
completely. Implementations that cannot completely disable the timeout MUST
instead interpret the zero duration as the longest possible value to which
the timeout can be set.
-
An entire client HTTP transaction with a gateway, covered by the Request timeout,
may result in more than one call from the gateway to the destination backend,
for example, if automatic retries are supported.
-
- Because the Request timeout encompasses the BackendRequest timeout, the value of
- BackendRequest must be <= the value of Request timeout.
-
+ The value of BackendRequest must be a Gateway API Duration string as defined by
+ GEP-2257. When this field is unspecified, its behavior is implementation-specific;
+ when specified, the value of BackendRequest must be no more than the value of the
+ Request timeout (since the Request timeout encompasses the BackendRequest timeout).
Support: Extended
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
@@ -11258,26 +8680,22 @@ spec:
If the gateway has not been able to respond before this deadline is met, the gateway
MUST return a timeout error.
-
For example, setting the `rules.timeouts.request` field to the value `10s` in an
`HTTPRoute` will cause a timeout if a client request is taking longer than 10 seconds
to complete.
-
Setting a timeout to the zero duration (e.g. "0s") SHOULD disable the timeout
completely. Implementations that cannot completely disable the timeout MUST
instead interpret the zero duration as the longest possible value to which
the timeout can be set.
-
This timeout is intended to cover as close to the whole request-response transaction
as possible although an implementation MAY choose to start the timeout after the entire
request stream has been received instead of immediately after the transaction is
initiated by the client.
-
- When this field is unspecified, request timeout behavior is implementation-specific.
-
+ The value of Request is a Gateway API Duration string as defined by GEP-2257. When this
+ field is unspecified, request timeout behavior is implementation-specific.
Support: Extended
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
@@ -11300,6 +8718,11 @@ spec:
rule: '(has(self.backendRefs) && self.backendRefs.exists_one(b, (has(b.filters) && b.filters.exists_one(f, has(f.urlRewrite) && has(f.urlRewrite.path) && f.urlRewrite.path.type == ''ReplacePrefixMatch'' && has(f.urlRewrite.path.replacePrefixMatch))) )) ? ((size(self.matches) != 1 || !has(self.matches[0].path) || self.matches[0].path.type != ''PathPrefix'') ? false : true) : true'
maxItems: 16
type: array
+ x-kubernetes-validations:
+ - message: While 16 rules and 64 matches per rule are allowed, the total number of matches across all rules in a route must be less than 128
+ rule: '(self.size() > 0 ? self[0].matches.size() : 0) + (self.size() > 1 ? self[1].matches.size() : 0) + (self.size() > 2 ? self[2].matches.size() : 0) + (self.size() > 3 ? self[3].matches.size() : 0) + (self.size() > 4 ? self[4].matches.size() : 0) + (self.size() > 5 ? self[5].matches.size() : 0) + (self.size() > 6 ? self[6].matches.size() : 0) + (self.size() > 7 ? self[7].matches.size() : 0) + (self.size() > 8 ? self[8].matches.size() : 0) + (self.size() > 9 ? self[9].matches.size() : 0) + (self.size() > 10 ? self[10].matches.size() : 0) + (self.size() > 11 ? self[11].matches.size() : 0) + (self.size() > 12 ? self[12].matches.size() : 0) + (self.size() > 13 ? self[13].matches.size() : 0) + (self.size() > 14 ? self[14].matches.size() : 0) + (self.size() > 15 ? self[15].matches.size() : 0) <= 128'
+ - message: Rule name must be unique within the route
+ rule: self.all(l1, !has(l1.name) || self.exists_one(l2, has(l2.name) && l1.name == l2.name))
type: object
status:
description: Status defines the current state of HTTPRoute.
@@ -11313,13 +8736,11 @@ spec:
first sees the route and should update the entry as appropriate when the
route or gateway is modified.
-
Note that parent references that cannot be resolved by an implementation
of this API will not be added to this list. Implementations of this API
can only populate Route status for the Gateways/parent resources they are
responsible for.
-
A maximum of 32 Gateways will be represented in this list. An empty list
means the route has not been attached to any Gateway.
items:
@@ -11333,27 +8754,23 @@ spec:
Note that the route's availability is also subject to the Gateway's own
status conditions and listener status.
-
If the Route's ParentRef specifies an existing Gateway that supports
Routes of this kind AND that Gateway's controller has sufficient access,
then that Gateway's controller MUST set the "Accepted" condition on the
Route, to indicate whether the route has been accepted or rejected by the
Gateway, and why.
-
A Route MUST be considered "Accepted" if at least one of the Route's
rules is implemented by the Gateway.
-
There are a number of cases where the "Accepted" condition may not be set
due to lack of controller visibility, that includes when:
-
* The Route refers to a non-existent parent.
* The Route is of a type that the controller does not support.
* The Route is in a namespace the controller does not have access to.
items:
- description: "Condition contains details for one aspect of the current state of this API Resource.\n---\nThis struct is intended for direct use as an array at the field path .status.conditions. For example,\n\n\n\ttype FooStatus struct{\n\t // Represents the observations of a foo's current state.\n\t // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\"\n\t // +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t // other fields\n\t}"
+ description: Condition contains details for one aspect of the current state of this API Resource.
properties:
lastTransitionTime:
description: |-
@@ -11394,12 +8811,7 @@ spec:
- Unknown
type: string
type:
- description: |-
- type of condition in CamelCase or in foo.example.com/CamelCase.
- ---
- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
- useful (see .node.status.conditions), the ability to deconflict is important.
- The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
+ description: type of condition in CamelCase or in foo.example.com/CamelCase.
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
@@ -11422,15 +8834,12 @@ spec:
controller that wrote this status. This corresponds with the
controllerName field on GatewayClass.
-
Example: "example.net/gateway-controller".
-
The format of this field is DOMAIN "/" PATH, where DOMAIN and PATH are
valid Kubernetes names
(https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
-
Controllers MUST populate this field when writing status. Controllers should ensure that
entries to status populated with their ControllerName are cleaned up when they are no
longer necessary.
@@ -11451,7 +8860,6 @@ spec:
To set the core API group (such as for a "Service" kind referent),
Group must be explicitly set to "" (empty string).
-
Support: Core
maxLength: 253
pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
@@ -11461,14 +8869,11 @@ spec:
description: |-
Kind is kind of the referent.
-
There are two kinds of parent resources with "Core" support:
-
* Gateway (Gateway conformance profile)
* Service (Mesh conformance profile, ClusterIP Services only)
-
Support for other resources is Implementation-Specific.
maxLength: 63
minLength: 1
@@ -11478,7 +8883,6 @@ spec:
description: |-
Name is the name of the referent.
-
Support: Core
maxLength: 253
minLength: 1
@@ -11488,7 +8892,6 @@ spec:
Namespace is the namespace of the referent. When unspecified, this refers
to the local namespace of the Route.
-
Note that there are specific rules for ParentRefs which cross namespace
boundaries. Cross-namespace references are only valid if they are explicitly
allowed by something in the namespace they are referring to. For example:
@@ -11496,12 +8899,10 @@ spec:
generic way to enable any other kind of cross-namespace reference.
-
ParentRefs from a Route to a Service in the same namespace are "producer"
routes, which apply default routing rules to inbound connections from
any namespace to the Service.
-
ParentRefs from a Route to a Service in a different namespace are
"consumer" routes, and these routing rules are only applied to outbound
connections originating from the same namespace as the Route, for which
@@ -11509,7 +8910,6 @@ spec:
ParentRef of the Route.
-
Support: Core
maxLength: 63
minLength: 1
@@ -11520,7 +8920,6 @@ spec:
Port is the network port this Route targets. It can be interpreted
differently based on the type of parent resource.
-
When the parent resource is a Gateway, this targets all listeners
listening on the specified port that also support this kind of Route(and
select this Route). It's not recommended to set `Port` unless the
@@ -11530,18 +8929,15 @@ spec:
must match both specified values.
-
When the parent resource is a Service, this targets a specific port in the
Service spec. When both Port (experimental) and SectionName are specified,
the name and port of the selected port must match both specified values.
-
Implementations MAY choose to support other parent resources.
Implementations supporting other types of parent resources MUST clearly
document how/if Port is interpreted.
-
For the purpose of status, an attachment is considered successful as
long as the parent resource accepts it partially. For example, Gateway
listeners can restrict which Routes can attach to them by Route kind,
@@ -11550,7 +8946,6 @@ spec:
attached. If no Gateway listeners accept attachment from this Route,
the Route MUST be considered detached from the Gateway.
-
Support: Extended
format: int32
maximum: 65535
@@ -11561,7 +8956,6 @@ spec:
SectionName is the name of a section within the target resource. In the
following resources, SectionName is interpreted as the following:
-
* Gateway: Listener name. When both Port (experimental) and SectionName
are specified, the name and port of the selected listener must match
both specified values.
@@ -11569,12 +8963,10 @@ spec:
are specified, the name and port of the selected listener must match
both specified values.
-
Implementations MAY choose to support attaching Routes to other resources.
If that is the case, they MUST clearly document how SectionName is
interpreted.
-
When unspecified (empty string), this will reference the entire resource.
For the purpose of status, an attachment is considered successful if at
least one section in the parent resource accepts it. For example, Gateway
@@ -11584,7 +8976,6 @@ spec:
attached. If no Gateway listeners accept attachment from this Route, the
Route MUST be considered detached from the Gateway.
-
Support: Core
maxLength: 253
minLength: 1
@@ -11653,21 +9044,17 @@ spec:
performing a match and (absent of any applicable header modification
configuration) MUST forward this header unmodified to the backend.
-
Valid values for Hostnames are determined by RFC 1123 definition of a
hostname with 2 notable exceptions:
-
1. IPs are not allowed.
2. A hostname may be prefixed with a wildcard label (`*.`). The wildcard
label must appear by itself as the first label.
-
If a hostname is specified by both the Listener and HTTPRoute, there
must be at least one intersecting hostname for the HTTPRoute to be
attached to the Listener. For example:
-
* A Listener with `test.example.com` as the hostname matches HTTPRoutes
that have either not specified any hostnames, or have specified at
least one of `test.example.com` or `*.example.com`.
@@ -11678,55 +9065,45 @@ spec:
all match. On the other hand, `example.com` and `test.example.net` would
not match.
-
Hostnames that are prefixed with a wildcard label (`*.`) are interpreted
as a suffix match. That means that a match for `*.example.com` would match
both `test.example.com`, and `foo.test.example.com`, but not `example.com`.
-
If both the Listener and HTTPRoute have specified hostnames, any
HTTPRoute hostnames that do not match the Listener hostname MUST be
ignored. For example, if a Listener specified `*.example.com`, and the
HTTPRoute specified `test.example.com` and `test.example.net`,
`test.example.net` must not be considered for a match.
-
If both the Listener and HTTPRoute have specified hostnames, and none
match with the criteria above, then the HTTPRoute is not accepted. The
implementation must raise an 'Accepted' Condition with a status of
`False` in the corresponding RouteParentStatus.
-
In the event that multiple HTTPRoutes specify intersecting hostnames (e.g.
overlapping wildcard matching and exact matching hostnames), precedence must
be given to rules from the HTTPRoute with the largest number of:
-
* Characters in a matching non-wildcard hostname.
* Characters in a matching hostname.
-
If ties exist across multiple Routes, the matching precedence rules for
HTTPRouteMatches takes over.
-
Support: Core
items:
description: |-
Hostname is the fully qualified domain name of a network host. This matches
the RFC 1123 definition of a hostname with 2 notable exceptions:
-
1. IPs are not allowed.
2. A hostname may be prefixed with a wildcard label (`*.`). The wildcard
label must appear by itself as the first label.
-
Hostname can be "precise" which is a domain name without the terminating
dot of a network host (e.g. "foo.example.com") or "wildcard", which is a
domain name prefixed with a single wildcard label (e.g. `*.example.com`).
-
Note that as per RFC1035 and RFC1123, a *label* must consist of lower case
alphanumeric characters or '-', and must start and end with an alphanumeric
character. No other punctuation is allowed.
@@ -11749,21 +9126,16 @@ spec:
create a "producer" route for a Service in a different namespace from the
Route.
-
There are two kinds of parent resources with "Core" support:
-
* Gateway (Gateway conformance profile)
* Service (Mesh conformance profile, ClusterIP Services only)
-
This API may be extended in the future to support additional kinds of parent
resources.
-
ParentRefs must be _distinct_. This means either that:
-
* They select different objects. If this is the case, then parentRef
entries are distinct. In terms of fields, this means that the
multi-part key defined by `group`, `kind`, `namespace`, and `name` must
@@ -11773,10 +9145,8 @@ spec:
optional fields to different values. If one ParentRef sets a
combination of optional fields, all must set the same combination.
-
Some examples:
-
* If one ParentRef sets `sectionName`, all ParentRefs referencing the
same object must also set `sectionName`.
* If one ParentRef sets `port`, all ParentRefs referencing the same
@@ -11784,14 +9154,12 @@ spec:
* If one ParentRef sets `sectionName` and `port`, all ParentRefs
referencing the same object must also set `sectionName` and `port`.
-
It is possible to separately reference multiple distinct objects that may
be collapsed by an implementation. For example, some implementations may
choose to merge compatible Gateway Listeners together. If that is the
case, the list of routes attached to those resources should also be
merged.
-
Note that for ParentRefs that cross namespace boundaries, there are specific
rules. Cross-namespace references are only valid if they are explicitly
allowed by something in the namespace they are referring to. For example,
@@ -11799,12 +9167,10 @@ spec:
generic way to enable other kinds of cross-namespace reference.
-
ParentRefs from a Route to a Service in the same namespace are "producer"
routes, which apply default routing rules to inbound connections from
any namespace to the Service.
-
ParentRefs from a Route to a Service in a different namespace are
"consumer" routes, and these routing rules are only applied to outbound
connections originating from the same namespace as the Route, for which
@@ -11815,22 +9181,18 @@ spec:
-
items:
description: |-
ParentReference identifies an API object (usually a Gateway) that can be considered
a parent of this resource (usually a route). There are two kinds of parent resources
with "Core" support:
-
* Gateway (Gateway conformance profile)
* Service (Mesh conformance profile, ClusterIP Services only)
-
This API may be extended in the future to support additional kinds of parent
resources.
-
The API object must be valid in the cluster; the Group and Kind must
be registered in the cluster for this reference to be valid.
properties:
@@ -11842,7 +9204,6 @@ spec:
To set the core API group (such as for a "Service" kind referent),
Group must be explicitly set to "" (empty string).
-
Support: Core
maxLength: 253
pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
@@ -11852,14 +9213,11 @@ spec:
description: |-
Kind is kind of the referent.
-
There are two kinds of parent resources with "Core" support:
-
* Gateway (Gateway conformance profile)
* Service (Mesh conformance profile, ClusterIP Services only)
-
Support for other resources is Implementation-Specific.
maxLength: 63
minLength: 1
@@ -11869,7 +9227,6 @@ spec:
description: |-
Name is the name of the referent.
-
Support: Core
maxLength: 253
minLength: 1
@@ -11879,7 +9236,6 @@ spec:
Namespace is the namespace of the referent. When unspecified, this refers
to the local namespace of the Route.
-
Note that there are specific rules for ParentRefs which cross namespace
boundaries. Cross-namespace references are only valid if they are explicitly
allowed by something in the namespace they are referring to. For example:
@@ -11887,12 +9243,10 @@ spec:
generic way to enable any other kind of cross-namespace reference.
-
ParentRefs from a Route to a Service in the same namespace are "producer"
routes, which apply default routing rules to inbound connections from
any namespace to the Service.
-
ParentRefs from a Route to a Service in a different namespace are
"consumer" routes, and these routing rules are only applied to outbound
connections originating from the same namespace as the Route, for which
@@ -11900,7 +9254,6 @@ spec:
ParentRef of the Route.
-
Support: Core
maxLength: 63
minLength: 1
@@ -11911,7 +9264,6 @@ spec:
Port is the network port this Route targets. It can be interpreted
differently based on the type of parent resource.
-
When the parent resource is a Gateway, this targets all listeners
listening on the specified port that also support this kind of Route(and
select this Route). It's not recommended to set `Port` unless the
@@ -11921,18 +9273,15 @@ spec:
must match both specified values.
-
When the parent resource is a Service, this targets a specific port in the
Service spec. When both Port (experimental) and SectionName are specified,
the name and port of the selected port must match both specified values.
-
Implementations MAY choose to support other parent resources.
Implementations supporting other types of parent resources MUST clearly
document how/if Port is interpreted.
-
For the purpose of status, an attachment is considered successful as
long as the parent resource accepts it partially. For example, Gateway
listeners can restrict which Routes can attach to them by Route kind,
@@ -11941,7 +9290,6 @@ spec:
attached. If no Gateway listeners accept attachment from this Route,
the Route MUST be considered detached from the Gateway.
-
Support: Extended
format: int32
maximum: 65535
@@ -11952,7 +9300,6 @@ spec:
SectionName is the name of a section within the target resource. In the
following resources, SectionName is interpreted as the following:
-
* Gateway: Listener name. When both Port (experimental) and SectionName
are specified, the name and port of the selected listener must match
both specified values.
@@ -11960,12 +9307,10 @@ spec:
are specified, the name and port of the selected listener must match
both specified values.
-
Implementations MAY choose to support attaching Routes to other resources.
If that is the case, they MUST clearly document how SectionName is
interpreted.
-
When unspecified (empty string), this will reference the entire resource.
For the purpose of status, an attachment is considered successful if at
least one section in the parent resource accepts it. For example, Gateway
@@ -11975,7 +9320,6 @@ spec:
attached. If no Gateway listeners accept attachment from this Route, the
Route MUST be considered detached from the Gateway.
-
Support: Core
maxLength: 253
minLength: 1
@@ -11997,7 +9341,9 @@ spec:
- path:
type: PathPrefix
value: /
- description: Rules are a list of HTTP matchers, filters and actions.
+ description: |+
+ Rules are a list of HTTP matchers, filters and actions.
+
items:
description: |-
HTTPRouteRule defines semantics for matching an HTTP request based on
@@ -12009,74 +9355,63 @@ spec:
BackendRefs defines the backend(s) where matching requests should be
sent.
-
Failure behavior here depends on how many BackendRefs are specified and
how many are invalid.
-
If *all* entries in BackendRefs are invalid, and there are also no filters
specified in this route rule, *all* traffic which matches this rule MUST
receive a 500 status code.
-
See the HTTPBackendRef definition for the rules about what makes a single
HTTPBackendRef invalid.
-
When a HTTPBackendRef is invalid, 500 status codes MUST be returned for
requests that would have otherwise been routed to an invalid backend. If
multiple backends are specified, and some are invalid, the proportion of
requests that would otherwise have been routed to an invalid backend
MUST receive a 500 status code.
-
For example, if two backends are specified with equal weights, and one is
invalid, 50 percent of traffic must receive a 500. Implementations may
choose how that 50 percent is determined.
+ When a HTTPBackendRef refers to a Service that has no ready endpoints,
+ implementations SHOULD return a 503 for requests to that backend instead.
+ If an implementation chooses to do this, all of the above rules for 500 responses
+ MUST also apply for responses that return a 503.
Support: Core for Kubernetes Service
-
Support: Extended for Kubernetes ServiceImport
-
Support: Implementation-specific for any other resource
-
Support for weight: Core
items:
description: |-
HTTPBackendRef defines how a HTTPRoute forwards a HTTP request.
-
Note that when a namespace different than the local namespace is specified, a
ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details.
-
-
When the BackendRef points to a Kubernetes Service, implementations SHOULD
honor the appProtocol field if it is set for the target Service Port.
-
Implementations supporting appProtocol SHOULD recognize the Kubernetes
Standard Application Protocols defined in KEP-3726.
-
If a Service appProtocol isn't specified, an implementation MAY infer the
backend protocol through its own means. Implementations MAY infer the
protocol from the Route type referring to the backend Service.
-
If a Route is not able to send traffic to the backend using the specified
protocol then the backend is considered invalid. Implementations MUST set the
"ResolvedRefs" condition to "False" with the "UnsupportedProtocol" reason.
-
properties:
filters:
@@ -12084,7 +9419,6 @@ spec:
Filters defined at this level should be executed if and only if the
request is being forwarded to the backend defined here.
-
Support: Implementation-specific (For broader support of filters, use the
Filters field in HTTPRouteRule.)
items:
@@ -12103,10 +9437,8 @@ spec:
"networking.example.net"). ExtensionRef MUST NOT be used for core and
extended filters.
-
This filter can be used multiple times within the same rule.
-
Support: Implementation-specific
properties:
group:
@@ -12137,7 +9469,6 @@ spec:
RequestHeaderModifier defines a schema for a filter that modifies request
headers.
-
Support: Core
properties:
add:
@@ -12146,18 +9477,15 @@ spec:
before the action. It appends to any existing values associated
with the header name.
-
Input:
GET /foo HTTP/1.1
my-header: foo
-
Config:
add:
- name: "my-header"
value: "bar,baz"
-
Output:
GET /foo HTTP/1.1
my-header: foo,bar,baz
@@ -12169,7 +9497,6 @@ spec:
Name is the name of the HTTP Header to be matched. Name matching MUST be
case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
-
If multiple entries specify equivalent header names, the first entry with
an equivalent name MUST be considered for a match. Subsequent entries
with an equivalent header name MUST be ignored. Due to the
@@ -12200,18 +9527,15 @@ spec:
names are case-insensitive (see
https://datatracker.ietf.org/doc/html/rfc2616#section-4.2).
-
Input:
GET /foo HTTP/1.1
my-header1: foo
my-header2: bar
my-header3: baz
-
Config:
remove: ["my-header1", "my-header3"]
-
Output:
GET /foo HTTP/1.1
my-header2: bar
@@ -12225,18 +9549,15 @@ spec:
Set overwrites the request with the given header (name, value)
before the action.
-
Input:
GET /foo HTTP/1.1
my-header: foo
-
Config:
set:
- name: "my-header"
value: "bar"
-
Output:
GET /foo HTTP/1.1
my-header: bar
@@ -12248,7 +9569,6 @@ spec:
Name is the name of the HTTP Header to be matched. Name matching MUST be
case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
-
If multiple entries specify equivalent header names, the first entry with
an equivalent name MUST be considered for a match. Subsequent entries
with an equivalent header name MUST be ignored. Due to the
@@ -12274,49 +9594,42 @@ spec:
x-kubernetes-list-type: map
type: object
requestMirror:
- description: |-
+ description: |+
RequestMirror defines a schema for a filter that mirrors requests.
Requests are sent to the specified destination, but responses from
that destination are ignored.
-
This filter can be used multiple times within the same rule. Note that
not all implementations will be able to support mirroring to multiple
backends.
-
Support: Extended
+
properties:
backendRef:
description: |-
BackendRef references a resource where mirrored requests are sent.
-
Mirrored requests must be sent only to a single destination endpoint
within this BackendRef, irrespective of how many endpoints are present
within this BackendRef.
-
If the referent cannot be found, this BackendRef is invalid and must be
dropped from the Gateway. The controller must ensure the "ResolvedRefs"
condition on the Route status is set to `status: False` and not configure
this backend in the underlying implementation.
-
If there is a cross-namespace reference to an *existing* object
that is not allowed by a ReferenceGrant, the controller must ensure the
"ResolvedRefs" condition on the Route is set to `status: False`,
with the "RefNotPermitted" reason and not configure this backend in the
underlying implementation.
-
In either error case, the Message of the `ResolvedRefs` Condition
should be used to provide more detail about the problem.
-
Support: Extended for Kubernetes Service
-
Support: Implementation-specific for any other resource
properties:
group:
@@ -12333,20 +9646,16 @@ spec:
Kind is the Kubernetes resource kind of the referent. For example
"Service".
-
Defaults to "Service" when not specified.
-
ExternalName services can refer to CNAME DNS records that may live
outside of the cluster and as such are difficult to reason about in
terms of conformance. They also may not be safe to forward to (see
CVE-2021-25740 for more information). Implementations SHOULD NOT
support ExternalName Services.
-
Support: Core (Services with a type other than ExternalName)
-
Support: Implementation-specific (Services with type ExternalName)
maxLength: 63
minLength: 1
@@ -12362,13 +9671,11 @@ spec:
Namespace is the namespace of the backend. When unspecified, the local
namespace is inferred.
-
Note that when a namespace different than the local namespace is specified,
a ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details.
-
Support: Core
maxLength: 63
minLength: 1
@@ -12391,15 +9698,54 @@ spec:
x-kubernetes-validations:
- message: Must have port for Service reference
rule: '(size(self.group) == 0 && self.kind == ''Service'') ? has(self.port) : true'
+ fraction:
+ description: |+
+ Fraction represents the fraction of requests that should be
+ mirrored to BackendRef.
+
+ Only one of Fraction or Percent may be specified. If neither field
+ is specified, 100% of requests will be mirrored.
+
+ properties:
+ denominator:
+ default: 100
+ format: int32
+ minimum: 1
+ type: integer
+ numerator:
+ format: int32
+ minimum: 0
+ type: integer
+ required:
+ - numerator
+ type: object
+ x-kubernetes-validations:
+ - message: numerator must be less than or equal to denominator
+ rule: self.numerator <= self.denominator
+ percent:
+ description: |+
+ Percent represents the percentage of requests that should be
+ mirrored to BackendRef. Its minimum value is 0 (indicating 0% of
+ requests) and its maximum value is 100 (indicating 100% of requests).
+
+ Only one of Fraction or Percent may be specified. If neither field
+ is specified, 100% of requests will be mirrored.
+
+ format: int32
+ maximum: 100
+ minimum: 0
+ type: integer
required:
- backendRef
type: object
+ x-kubernetes-validations:
+ - message: Only one of percent or fraction may be specified in HTTPRequestMirrorFilter
+ rule: '!(has(self.percent) && has(self.fraction))'
requestRedirect:
description: |-
RequestRedirect defines a schema for a filter that responds to the
request with an HTTP redirection.
-
Support: Core
properties:
hostname:
@@ -12408,7 +9754,6 @@ spec:
header in the response.
When empty, the hostname in the `Host` header of the request is used.
-
Support: Core
maxLength: 253
minLength: 1
@@ -12420,7 +9765,6 @@ spec:
The modified path is then used to construct the `Location` header. When
empty, the request path is used as-is.
-
Support: Extended
properties:
replaceFullPath:
@@ -12436,32 +9780,17 @@ spec:
to "/foo/bar" with a prefix match of "/foo" and a ReplacePrefixMatch
of "/xyz" would be modified to "/xyz/bar".
-
Note that this matches the behavior of the PathPrefix match type. This
matches full path elements. A path element refers to the list of labels
in the path split by the `/` separator. When specified, a trailing `/` is
ignored. For example, the paths `/abc`, `/abc/`, and `/abc/def` would all
match the prefix `/abc`, but the path `/abcd` would not.
-
ReplacePrefixMatch is only compatible with a `PathPrefix` HTTPRouteMatch.
Using any other HTTPRouteMatch type on the same HTTPRouteRule will result in
the implementation setting the Accepted Condition for the Route to `status: False`.
-
Request Path | Prefix Match | Replace Prefix | Modified Path
- -------------|--------------|----------------|----------
- /foo/bar | /foo | /xyz | /xyz/bar
- /foo/bar | /foo | /xyz/ | /xyz/bar
- /foo/bar | /foo/ | /xyz | /xyz/bar
- /foo/bar | /foo/ | /xyz/ | /xyz/bar
- /foo | /foo | /xyz | /xyz
- /foo/ | /foo | /xyz | /xyz/
- /foo/bar | /foo | | /bar
- /foo/ | /foo | | /
- /foo | /foo | | /
- /foo/ | /foo | / | /
- /foo | /foo | / | /
maxLength: 1024
type: string
type:
@@ -12469,11 +9798,9 @@ spec:
Type defines the type of path modifier. Additional types may be
added in a future release of the API.
-
Note that values may be added to this enum, implementations
must ensure that unknown values will not cause a crash.
-
Unknown values here must result in the implementation setting the
Accepted Condition for the Route to `status: False`, with a
Reason of `UnsupportedValue`.
@@ -12498,11 +9825,9 @@ spec:
Port is the port to be used in the value of the `Location`
header in the response.
-
If no port is specified, the redirect port MUST be derived using the
following rules:
-
* If redirect scheme is not-empty, the redirect port MUST be the well-known
port associated with the redirect scheme. Specifically "http" to port 80
and "https" to port 443. If the redirect scheme does not have a
@@ -12510,17 +9835,14 @@ spec:
* If redirect scheme is empty, the redirect port MUST be the Gateway
Listener port.
-
Implementations SHOULD NOT add the port number in the 'Location'
header in the following cases:
-
* A Location header that will use HTTP (whether that is determined via
the Listener protocol or the Scheme field) _and_ use port 80.
* A Location header that will use HTTPS (whether that is determined via
the Listener protocol or the Scheme field) _and_ use port 443.
-
Support: Extended
format: int32
maximum: 65535
@@ -12531,20 +9853,16 @@ spec:
Scheme is the scheme to be used in the value of the `Location` header in
the response. When empty, the scheme of the request is used.
-
Scheme redirects can affect the port of the redirect, for more information,
refer to the documentation for the port field of this filter.
-
Note that values may be added to this enum, implementations
must ensure that unknown values will not cause a crash.
-
Unknown values here must result in the implementation setting the
Accepted Condition for the Route to `status: False`, with a
Reason of `UnsupportedValue`.
-
Support: Extended
enum:
- http
@@ -12555,16 +9873,13 @@ spec:
description: |-
StatusCode is the HTTP status code to be used in response.
-
Note that values may be added to this enum, implementations
must ensure that unknown values will not cause a crash.
-
Unknown values here must result in the implementation setting the
Accepted Condition for the Route to `status: False`, with a
Reason of `UnsupportedValue`.
-
Support: Core
enum:
- 301
@@ -12576,7 +9891,6 @@ spec:
ResponseHeaderModifier defines a schema for a filter that modifies response
headers.
-
Support: Extended
properties:
add:
@@ -12585,18 +9899,15 @@ spec:
before the action. It appends to any existing values associated
with the header name.
-
Input:
GET /foo HTTP/1.1
my-header: foo
-
Config:
add:
- name: "my-header"
value: "bar,baz"
-
Output:
GET /foo HTTP/1.1
my-header: foo,bar,baz
@@ -12608,7 +9919,6 @@ spec:
Name is the name of the HTTP Header to be matched. Name matching MUST be
case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
-
If multiple entries specify equivalent header names, the first entry with
an equivalent name MUST be considered for a match. Subsequent entries
with an equivalent header name MUST be ignored. Due to the
@@ -12639,18 +9949,15 @@ spec:
names are case-insensitive (see
https://datatracker.ietf.org/doc/html/rfc2616#section-4.2).
-
Input:
GET /foo HTTP/1.1
my-header1: foo
my-header2: bar
my-header3: baz
-
Config:
remove: ["my-header1", "my-header3"]
-
Output:
GET /foo HTTP/1.1
my-header2: bar
@@ -12664,18 +9971,15 @@ spec:
Set overwrites the request with the given header (name, value)
before the action.
-
Input:
GET /foo HTTP/1.1
my-header: foo
-
Config:
set:
- name: "my-header"
value: "bar"
-
Output:
GET /foo HTTP/1.1
my-header: bar
@@ -12687,7 +9991,6 @@ spec:
Name is the name of the HTTP Header to be matched. Name matching MUST be
case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
-
If multiple entries specify equivalent header names, the first entry with
an equivalent name MUST be considered for a match. Subsequent entries
with an equivalent header name MUST be ignored. Due to the
@@ -12717,17 +10020,14 @@ spec:
Type identifies the type of filter to apply. As with other API fields,
types are classified into three conformance levels:
-
- Core: Filter types and their corresponding configuration defined by
"Support: Core" in this package, e.g. "RequestHeaderModifier". All
implementations must support core filters.
-
- Extended: Filter types and their corresponding configuration defined by
"Support: Extended" in this package, e.g. "RequestMirror". Implementers
are encouraged to support extended filters.
-
- Implementation-specific: Filters that are defined and supported by
specific vendors.
In the future, filters showing convergence in behavior across multiple
@@ -12736,20 +10036,16 @@ spec:
is specified using the ExtensionRef field. `Type` should be set to
"ExtensionRef" for custom filters.
-
Implementers are encouraged to define custom implementation types to
extend the core API with implementation-specific behavior.
-
If a reference to a custom filter type cannot be resolved, the filter
MUST NOT be skipped. Instead, requests that would have been processed by
that filter MUST receive a HTTP error response.
-
Note that values may be added to this enum, implementations
must ensure that unknown values will not cause a crash.
-
Unknown values here must result in the implementation setting the
Accepted Condition for the Route to `status: False`, with a
Reason of `UnsupportedValue`.
@@ -12765,7 +10061,6 @@ spec:
description: |-
URLRewrite defines a schema for a filter that modifies a request during forwarding.
-
Support: Extended
properties:
hostname:
@@ -12773,7 +10068,6 @@ spec:
Hostname is the value to be used to replace the Host header value during
forwarding.
-
Support: Extended
maxLength: 253
minLength: 1
@@ -12783,7 +10077,6 @@ spec:
description: |-
Path defines a path rewrite.
-
Support: Extended
properties:
replaceFullPath:
@@ -12799,32 +10092,17 @@ spec:
to "/foo/bar" with a prefix match of "/foo" and a ReplacePrefixMatch
of "/xyz" would be modified to "/xyz/bar".
-
Note that this matches the behavior of the PathPrefix match type. This
matches full path elements. A path element refers to the list of labels
in the path split by the `/` separator. When specified, a trailing `/` is
ignored. For example, the paths `/abc`, `/abc/`, and `/abc/def` would all
match the prefix `/abc`, but the path `/abcd` would not.
-
ReplacePrefixMatch is only compatible with a `PathPrefix` HTTPRouteMatch.
Using any other HTTPRouteMatch type on the same HTTPRouteRule will result in
the implementation setting the Accepted Condition for the Route to `status: False`.
-
Request Path | Prefix Match | Replace Prefix | Modified Path
- -------------|--------------|----------------|----------
- /foo/bar | /foo | /xyz | /xyz/bar
- /foo/bar | /foo | /xyz/ | /xyz/bar
- /foo/bar | /foo/ | /xyz | /xyz/bar
- /foo/bar | /foo/ | /xyz/ | /xyz/bar
- /foo | /foo | /xyz | /xyz
- /foo/ | /foo | /xyz | /xyz/
- /foo/bar | /foo | | /bar
- /foo/ | /foo | | /
- /foo | /foo | | /
- /foo/ | /foo | / | /
- /foo | /foo | / | /
maxLength: 1024
type: string
type:
@@ -12832,11 +10110,9 @@ spec:
Type defines the type of path modifier. Additional types may be
added in a future release of the API.
-
Note that values may be added to this enum, implementations
must ensure that unknown values will not cause a crash.
-
Unknown values here must result in the implementation setting the
Accepted Condition for the Route to `status: False`, with a
Reason of `UnsupportedValue`.
@@ -12914,20 +10190,16 @@ spec:
Kind is the Kubernetes resource kind of the referent. For example
"Service".
-
Defaults to "Service" when not specified.
-
ExternalName services can refer to CNAME DNS records that may live
outside of the cluster and as such are difficult to reason about in
terms of conformance. They also may not be safe to forward to (see
CVE-2021-25740 for more information). Implementations SHOULD NOT
support ExternalName Services.
-
Support: Core (Services with a type other than ExternalName)
-
Support: Implementation-specific (Services with type ExternalName)
maxLength: 63
minLength: 1
@@ -12943,13 +10215,11 @@ spec:
Namespace is the namespace of the backend. When unspecified, the local
namespace is inferred.
-
Note that when a namespace different than the local namespace is specified,
a ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details.
-
Support: Core
maxLength: 63
minLength: 1
@@ -12976,13 +10246,11 @@ spec:
implementation supports. Weight is not a percentage and the sum of
weights does not need to equal 100.
-
If only one backend is specified and it has a weight greater than 0, 100%
of the traffic is forwarded to that backend. If weight is set to 0, no
traffic should be forwarded for this entry. If unspecified, weight
defaults to 1.
-
Support for this field varies based on the context where used.
format: int32
maximum: 1000000
@@ -13001,37 +10269,30 @@ spec:
Filters define the filters that are applied to requests that match
this rule.
-
Wherever possible, implementations SHOULD implement filters in the order
they are specified.
-
Implementations MAY choose to implement this ordering strictly, rejecting
any combination or order of filters that can not be supported. If implementations
choose a strict interpretation of filter ordering, they MUST clearly document
that behavior.
-
To reject an invalid combination or order of filters, implementations SHOULD
consider the Route Rules with this configuration invalid. If all Route Rules
in a Route are invalid, the entire Route would be considered invalid. If only
a portion of Route Rules are invalid, implementations MUST set the
"PartiallyInvalid" condition for the Route.
-
Conformance-levels at this level are defined based on the type of filter:
-
- ALL core filters MUST be supported by all implementations.
- Implementers are encouraged to support extended filters.
- Implementation-specific custom filters have no API guarantees across
implementations.
-
Specifying the same filter multiple times is not supported unless explicitly
indicated in the filter.
-
All filters are expected to be compatible with each other except for the
URLRewrite and RequestRedirect filters, which may not be combined. If an
implementation can not support other combinations of filters, they must clearly
@@ -13040,7 +10301,6 @@ spec:
`False`, implementations may use the `IncompatibleFilters` reason to specify
this configuration error.
-
Support: Core
items:
description: |-
@@ -13058,10 +10318,8 @@ spec:
"networking.example.net"). ExtensionRef MUST NOT be used for core and
extended filters.
-
This filter can be used multiple times within the same rule.
-
Support: Implementation-specific
properties:
group:
@@ -13092,7 +10350,6 @@ spec:
RequestHeaderModifier defines a schema for a filter that modifies request
headers.
-
Support: Core
properties:
add:
@@ -13101,18 +10358,15 @@ spec:
before the action. It appends to any existing values associated
with the header name.
-
Input:
GET /foo HTTP/1.1
my-header: foo
-
Config:
add:
- name: "my-header"
value: "bar,baz"
-
Output:
GET /foo HTTP/1.1
my-header: foo,bar,baz
@@ -13124,7 +10378,6 @@ spec:
Name is the name of the HTTP Header to be matched. Name matching MUST be
case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
-
If multiple entries specify equivalent header names, the first entry with
an equivalent name MUST be considered for a match. Subsequent entries
with an equivalent header name MUST be ignored. Due to the
@@ -13155,18 +10408,15 @@ spec:
names are case-insensitive (see
https://datatracker.ietf.org/doc/html/rfc2616#section-4.2).
-
Input:
GET /foo HTTP/1.1
my-header1: foo
my-header2: bar
my-header3: baz
-
Config:
remove: ["my-header1", "my-header3"]
-
Output:
GET /foo HTTP/1.1
my-header2: bar
@@ -13180,18 +10430,15 @@ spec:
Set overwrites the request with the given header (name, value)
before the action.
-
Input:
GET /foo HTTP/1.1
my-header: foo
-
Config:
set:
- name: "my-header"
value: "bar"
-
Output:
GET /foo HTTP/1.1
my-header: bar
@@ -13203,7 +10450,6 @@ spec:
Name is the name of the HTTP Header to be matched. Name matching MUST be
case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
-
If multiple entries specify equivalent header names, the first entry with
an equivalent name MUST be considered for a match. Subsequent entries
with an equivalent header name MUST be ignored. Due to the
@@ -13229,49 +10475,42 @@ spec:
x-kubernetes-list-type: map
type: object
requestMirror:
- description: |-
+ description: |+
RequestMirror defines a schema for a filter that mirrors requests.
Requests are sent to the specified destination, but responses from
that destination are ignored.
-
This filter can be used multiple times within the same rule. Note that
not all implementations will be able to support mirroring to multiple
backends.
-
Support: Extended
+
properties:
backendRef:
description: |-
BackendRef references a resource where mirrored requests are sent.
-
Mirrored requests must be sent only to a single destination endpoint
within this BackendRef, irrespective of how many endpoints are present
within this BackendRef.
-
If the referent cannot be found, this BackendRef is invalid and must be
dropped from the Gateway. The controller must ensure the "ResolvedRefs"
condition on the Route status is set to `status: False` and not configure
this backend in the underlying implementation.
-
If there is a cross-namespace reference to an *existing* object
that is not allowed by a ReferenceGrant, the controller must ensure the
"ResolvedRefs" condition on the Route is set to `status: False`,
with the "RefNotPermitted" reason and not configure this backend in the
underlying implementation.
-
In either error case, the Message of the `ResolvedRefs` Condition
should be used to provide more detail about the problem.
-
Support: Extended for Kubernetes Service
-
Support: Implementation-specific for any other resource
properties:
group:
@@ -13288,20 +10527,16 @@ spec:
Kind is the Kubernetes resource kind of the referent. For example
"Service".
-
Defaults to "Service" when not specified.
-
ExternalName services can refer to CNAME DNS records that may live
outside of the cluster and as such are difficult to reason about in
terms of conformance. They also may not be safe to forward to (see
CVE-2021-25740 for more information). Implementations SHOULD NOT
support ExternalName Services.
-
Support: Core (Services with a type other than ExternalName)
-
Support: Implementation-specific (Services with type ExternalName)
maxLength: 63
minLength: 1
@@ -13317,13 +10552,11 @@ spec:
Namespace is the namespace of the backend. When unspecified, the local
namespace is inferred.
-
Note that when a namespace different than the local namespace is specified,
a ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details.
-
Support: Core
maxLength: 63
minLength: 1
@@ -13346,15 +10579,54 @@ spec:
x-kubernetes-validations:
- message: Must have port for Service reference
rule: '(size(self.group) == 0 && self.kind == ''Service'') ? has(self.port) : true'
+ fraction:
+ description: |+
+ Fraction represents the fraction of requests that should be
+ mirrored to BackendRef.
+
+ Only one of Fraction or Percent may be specified. If neither field
+ is specified, 100% of requests will be mirrored.
+
+ properties:
+ denominator:
+ default: 100
+ format: int32
+ minimum: 1
+ type: integer
+ numerator:
+ format: int32
+ minimum: 0
+ type: integer
+ required:
+ - numerator
+ type: object
+ x-kubernetes-validations:
+ - message: numerator must be less than or equal to denominator
+ rule: self.numerator <= self.denominator
+ percent:
+ description: |+
+ Percent represents the percentage of requests that should be
+ mirrored to BackendRef. Its minimum value is 0 (indicating 0% of
+ requests) and its maximum value is 100 (indicating 100% of requests).
+
+ Only one of Fraction or Percent may be specified. If neither field
+ is specified, 100% of requests will be mirrored.
+
+ format: int32
+ maximum: 100
+ minimum: 0
+ type: integer
required:
- backendRef
type: object
+ x-kubernetes-validations:
+ - message: Only one of percent or fraction may be specified in HTTPRequestMirrorFilter
+ rule: '!(has(self.percent) && has(self.fraction))'
requestRedirect:
description: |-
RequestRedirect defines a schema for a filter that responds to the
request with an HTTP redirection.
-
Support: Core
properties:
hostname:
@@ -13363,7 +10635,6 @@ spec:
header in the response.
When empty, the hostname in the `Host` header of the request is used.
-
Support: Core
maxLength: 253
minLength: 1
@@ -13375,7 +10646,6 @@ spec:
The modified path is then used to construct the `Location` header. When
empty, the request path is used as-is.
-
Support: Extended
properties:
replaceFullPath:
@@ -13391,32 +10661,17 @@ spec:
to "/foo/bar" with a prefix match of "/foo" and a ReplacePrefixMatch
of "/xyz" would be modified to "/xyz/bar".
-
Note that this matches the behavior of the PathPrefix match type. This
matches full path elements. A path element refers to the list of labels
in the path split by the `/` separator. When specified, a trailing `/` is
ignored. For example, the paths `/abc`, `/abc/`, and `/abc/def` would all
match the prefix `/abc`, but the path `/abcd` would not.
-
ReplacePrefixMatch is only compatible with a `PathPrefix` HTTPRouteMatch.
Using any other HTTPRouteMatch type on the same HTTPRouteRule will result in
the implementation setting the Accepted Condition for the Route to `status: False`.
-
Request Path | Prefix Match | Replace Prefix | Modified Path
- -------------|--------------|----------------|----------
- /foo/bar | /foo | /xyz | /xyz/bar
- /foo/bar | /foo | /xyz/ | /xyz/bar
- /foo/bar | /foo/ | /xyz | /xyz/bar
- /foo/bar | /foo/ | /xyz/ | /xyz/bar
- /foo | /foo | /xyz | /xyz
- /foo/ | /foo | /xyz | /xyz/
- /foo/bar | /foo | | /bar
- /foo/ | /foo | | /
- /foo | /foo | | /
- /foo/ | /foo | / | /
- /foo | /foo | / | /
maxLength: 1024
type: string
type:
@@ -13424,11 +10679,9 @@ spec:
Type defines the type of path modifier. Additional types may be
added in a future release of the API.
-
Note that values may be added to this enum, implementations
must ensure that unknown values will not cause a crash.
-
Unknown values here must result in the implementation setting the
Accepted Condition for the Route to `status: False`, with a
Reason of `UnsupportedValue`.
@@ -13453,11 +10706,9 @@ spec:
Port is the port to be used in the value of the `Location`
header in the response.
-
If no port is specified, the redirect port MUST be derived using the
following rules:
-
* If redirect scheme is not-empty, the redirect port MUST be the well-known
port associated with the redirect scheme. Specifically "http" to port 80
and "https" to port 443. If the redirect scheme does not have a
@@ -13465,17 +10716,14 @@ spec:
* If redirect scheme is empty, the redirect port MUST be the Gateway
Listener port.
-
Implementations SHOULD NOT add the port number in the 'Location'
header in the following cases:
-
* A Location header that will use HTTP (whether that is determined via
the Listener protocol or the Scheme field) _and_ use port 80.
* A Location header that will use HTTPS (whether that is determined via
the Listener protocol or the Scheme field) _and_ use port 443.
-
Support: Extended
format: int32
maximum: 65535
@@ -13486,20 +10734,16 @@ spec:
Scheme is the scheme to be used in the value of the `Location` header in
the response. When empty, the scheme of the request is used.
-
Scheme redirects can affect the port of the redirect, for more information,
refer to the documentation for the port field of this filter.
-
Note that values may be added to this enum, implementations
must ensure that unknown values will not cause a crash.
-
Unknown values here must result in the implementation setting the
Accepted Condition for the Route to `status: False`, with a
Reason of `UnsupportedValue`.
-
Support: Extended
enum:
- http
@@ -13510,16 +10754,13 @@ spec:
description: |-
StatusCode is the HTTP status code to be used in response.
-
Note that values may be added to this enum, implementations
must ensure that unknown values will not cause a crash.
-
Unknown values here must result in the implementation setting the
Accepted Condition for the Route to `status: False`, with a
Reason of `UnsupportedValue`.
-
Support: Core
enum:
- 301
@@ -13531,7 +10772,6 @@ spec:
ResponseHeaderModifier defines a schema for a filter that modifies response
headers.
-
Support: Extended
properties:
add:
@@ -13540,18 +10780,15 @@ spec:
before the action. It appends to any existing values associated
with the header name.
-
Input:
GET /foo HTTP/1.1
my-header: foo
-
Config:
add:
- name: "my-header"
value: "bar,baz"
-
Output:
GET /foo HTTP/1.1
my-header: foo,bar,baz
@@ -13563,7 +10800,6 @@ spec:
Name is the name of the HTTP Header to be matched. Name matching MUST be
case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
-
If multiple entries specify equivalent header names, the first entry with
an equivalent name MUST be considered for a match. Subsequent entries
with an equivalent header name MUST be ignored. Due to the
@@ -13594,18 +10830,15 @@ spec:
names are case-insensitive (see
https://datatracker.ietf.org/doc/html/rfc2616#section-4.2).
-
Input:
GET /foo HTTP/1.1
my-header1: foo
my-header2: bar
my-header3: baz
-
Config:
remove: ["my-header1", "my-header3"]
-
Output:
GET /foo HTTP/1.1
my-header2: bar
@@ -13619,18 +10852,15 @@ spec:
Set overwrites the request with the given header (name, value)
before the action.
-
Input:
GET /foo HTTP/1.1
my-header: foo
-
Config:
set:
- name: "my-header"
value: "bar"
-
Output:
GET /foo HTTP/1.1
my-header: bar
@@ -13642,7 +10872,6 @@ spec:
Name is the name of the HTTP Header to be matched. Name matching MUST be
case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
-
If multiple entries specify equivalent header names, the first entry with
an equivalent name MUST be considered for a match. Subsequent entries
with an equivalent header name MUST be ignored. Due to the
@@ -13672,17 +10901,14 @@ spec:
Type identifies the type of filter to apply. As with other API fields,
types are classified into three conformance levels:
-
- Core: Filter types and their corresponding configuration defined by
"Support: Core" in this package, e.g. "RequestHeaderModifier". All
implementations must support core filters.
-
- Extended: Filter types and their corresponding configuration defined by
"Support: Extended" in this package, e.g. "RequestMirror". Implementers
are encouraged to support extended filters.
-
- Implementation-specific: Filters that are defined and supported by
specific vendors.
In the future, filters showing convergence in behavior across multiple
@@ -13691,20 +10917,16 @@ spec:
is specified using the ExtensionRef field. `Type` should be set to
"ExtensionRef" for custom filters.
-
Implementers are encouraged to define custom implementation types to
extend the core API with implementation-specific behavior.
-
If a reference to a custom filter type cannot be resolved, the filter
MUST NOT be skipped. Instead, requests that would have been processed by
that filter MUST receive a HTTP error response.
-
Note that values may be added to this enum, implementations
must ensure that unknown values will not cause a crash.
-
Unknown values here must result in the implementation setting the
Accepted Condition for the Route to `status: False`, with a
Reason of `UnsupportedValue`.
@@ -13720,7 +10942,6 @@ spec:
description: |-
URLRewrite defines a schema for a filter that modifies a request during forwarding.
-
Support: Extended
properties:
hostname:
@@ -13728,7 +10949,6 @@ spec:
Hostname is the value to be used to replace the Host header value during
forwarding.
-
Support: Extended
maxLength: 253
minLength: 1
@@ -13738,7 +10958,6 @@ spec:
description: |-
Path defines a path rewrite.
-
Support: Extended
properties:
replaceFullPath:
@@ -13754,32 +10973,17 @@ spec:
to "/foo/bar" with a prefix match of "/foo" and a ReplacePrefixMatch
of "/xyz" would be modified to "/xyz/bar".
-
Note that this matches the behavior of the PathPrefix match type. This
matches full path elements. A path element refers to the list of labels
in the path split by the `/` separator. When specified, a trailing `/` is
ignored. For example, the paths `/abc`, `/abc/`, and `/abc/def` would all
match the prefix `/abc`, but the path `/abcd` would not.
-
ReplacePrefixMatch is only compatible with a `PathPrefix` HTTPRouteMatch.
Using any other HTTPRouteMatch type on the same HTTPRouteRule will result in
the implementation setting the Accepted Condition for the Route to `status: False`.
-
Request Path | Prefix Match | Replace Prefix | Modified Path
- -------------|--------------|----------------|----------
- /foo/bar | /foo | /xyz | /xyz/bar
- /foo/bar | /foo | /xyz/ | /xyz/bar
- /foo/bar | /foo/ | /xyz | /xyz/bar
- /foo/bar | /foo/ | /xyz/ | /xyz/bar
- /foo | /foo | /xyz | /xyz
- /foo/ | /foo | /xyz | /xyz/
- /foo/bar | /foo | | /bar
- /foo/ | /foo | | /
- /foo | /foo | | /
- /foo/ | /foo | / | /
- /foo | /foo | / | /
maxLength: 1024
type: string
type:
@@ -13787,11 +10991,9 @@ spec:
Type defines the type of path modifier. Additional types may be
added in a future release of the API.
-
Note that values may be added to this enum, implementations
must ensure that unknown values will not cause a crash.
-
Unknown values here must result in the implementation setting the
Accepted Condition for the Route to `status: False`, with a
Reason of `UnsupportedValue`.
@@ -13863,10 +11065,8 @@ spec:
HTTP requests. Each match is independent, i.e. this rule will be matched
if **any** one of the matches is satisfied.
-
For example, take the following matches configuration:
-
```
matches:
- path:
@@ -13878,58 +11078,47 @@ spec:
value: "/v2/foo"
```
-
For a request to match against this rule, a request must satisfy
EITHER of the two conditions:
-
- path prefixed with `/foo` AND contains the header `version: v2`
- path prefix of `/v2/foo`
-
See the documentation for HTTPRouteMatch on how to specify multiple
match conditions that should be ANDed together.
-
If no matches are specified, the default is a prefix
path match on "/", which has the effect of matching every
HTTP request.
-
Proxy or Load Balancer routing configuration generated from HTTPRoutes
MUST prioritize matches based on the following criteria, continuing on
ties. Across all rules specified on applicable Routes, precedence must be
given to the match having:
-
* "Exact" path match.
* "Prefix" path match with largest number of characters.
* Method match.
* Largest number of header matches.
* Largest number of query param matches.
-
Note: The precedence of RegularExpression path matches are implementation-specific.
-
If ties still exist across multiple Routes, matching precedence MUST be
determined in order of the following criteria, continuing on ties:
-
* The oldest Route based on creation timestamp.
* The Route appearing first in alphabetical order by
"{namespace}/{name}".
-
If ties still exist within an HTTPRoute, matching precedence MUST be granted
to the FIRST matching rule (in list order) with a match meeting the above
criteria.
-
When no rules matching a request have been successfully attached to the
parent a request is coming from, a HTTP 404 status code MUST be returned.
items:
- description: "HTTPRouteMatch defines the predicate used to match requests to a given\naction. Multiple match types are ANDed together, i.e. the match will\nevaluate to true only if all conditions are satisfied.\n\n\nFor example, the match below will match a HTTP request only if its path\nstarts with `/foo` AND it contains the `version: v1` header:\n\n\n```\nmatch:\n\n\n\tpath:\n\t value: \"/foo\"\n\theaders:\n\t- name: \"version\"\n\t value \"v1\"\n\n\n```"
+ description: "HTTPRouteMatch defines the predicate used to match requests to a given\naction. Multiple match types are ANDed together, i.e. the match will\nevaluate to true only if all conditions are satisfied.\n\nFor example, the match below will match a HTTP request only if its path\nstarts with `/foo` AND it contains the `version: v1` header:\n\n```\nmatch:\n\n\tpath:\n\t value: \"/foo\"\n\theaders:\n\t- name: \"version\"\n\t value \"v1\"\n\n```"
properties:
headers:
description: |-
@@ -13946,14 +11135,12 @@ spec:
Name is the name of the HTTP Header to be matched. Name matching MUST be
case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
-
If multiple entries specify equivalent header names, only the first
entry with an equivalent name MUST be considered for a match. Subsequent
entries with an equivalent header name MUST be ignored. Due to the
case-insensitivity of header names, "foo" and "Foo" are considered
equivalent.
-
When a header is repeated in an HTTP request, it is
implementation-specific behavior as to how this is represented.
Generally, proxies should follow the guidance from the RFC:
@@ -13968,13 +11155,10 @@ spec:
description: |-
Type specifies how to match against the value of the header.
-
Support: Core (Exact)
-
Support: Implementation-specific (RegularExpression)
-
Since RegularExpression HeaderMatchType has implementation-specific
conformance, implementations can support POSIX, PCRE or any other dialects
of regular expressions. Please read the implementation's documentation to
@@ -14003,7 +11187,6 @@ spec:
When specified, this route will be matched only if the request has the
specified method.
-
Support: Extended
enum:
- GET
@@ -14029,10 +11212,8 @@ spec:
description: |-
Type specifies how to match against the path Value.
-
Support: Core (Exact, PathPrefix)
-
Support: Implementation-specific (RegularExpression)
enum:
- Exact
@@ -14074,7 +11255,6 @@ spec:
values are ANDed together, meaning, a request must match all the
specified query parameters to select the route.
-
Support: Extended
items:
description: |-
@@ -14087,12 +11267,10 @@ spec:
exact string match. (See
https://tools.ietf.org/html/rfc7230#section-2.7.3).
-
If multiple entries specify equivalent query param names, only the first
entry with an equivalent name MUST be considered for a match. Subsequent
entries with an equivalent query param name MUST be ignored.
-
If a query param is repeated in an HTTP request, the behavior is
purposely left undefined, since different data planes have different
capabilities. However, it is *recommended* that implementations should
@@ -14100,7 +11278,6 @@ spec:
as this behavior is expected in other load balancing contexts outside of
the Gateway API.
-
Users SHOULD NOT route traffic based on repeated query params to guard
themselves against potential differences in the implementations.
maxLength: 256
@@ -14112,13 +11289,10 @@ spec:
description: |-
Type specifies how to match against the value of the query parameter.
-
Support: Extended (Exact)
-
Support: Implementation-specific (RegularExpression)
-
Since RegularExpression QueryParamMatchType has Implementation-specific
conformance, implementations can support POSIX, PCRE or any other
dialects of regular expressions. Please read the implementation's
@@ -14142,17 +11316,114 @@ spec:
- name
x-kubernetes-list-type: map
type: object
- maxItems: 8
+ maxItems: 64
type: array
+ name:
+ description: |
+ Name is the name of the route rule. This name MUST be unique within a Route if it is set.
+
+ Support: Extended
+ maxLength: 253
+ minLength: 1
+ pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
+ type: string
+ retry:
+ description: |+
+ Retry defines the configuration for when to retry an HTTP request.
+
+ Support: Extended
+
+ properties:
+ attempts:
+ description: |-
+ Attempts specifies the maxmimum number of times an individual request
+ from the gateway to a backend should be retried.
+
+ If the maximum number of retries has been attempted without a successful
+ response from the backend, the Gateway MUST return an error.
+
+ When this field is unspecified, the number of times to attempt to retry
+ a backend request is implementation-specific.
+
+ Support: Extended
+ type: integer
+ backoff:
+ description: |-
+ Backoff specifies the minimum duration a Gateway should wait between
+ retry attempts and is represented in Gateway API Duration formatting.
+
+ For example, setting the `rules[].retry.backoff` field to the value
+ `100ms` will cause a backend request to first be retried approximately
+ 100 milliseconds after timing out or receiving a response code configured
+ to be retryable.
+
+ An implementation MAY use an exponential or alternative backoff strategy
+ for subsequent retry attempts, MAY cap the maximum backoff duration to
+ some amount greater than the specified minimum, and MAY add arbitrary
+ jitter to stagger requests, as long as unsuccessful backend requests are
+ not retried before the configured minimum duration.
+
+ If a Request timeout (`rules[].timeouts.request`) is configured on the
+ route, the entire duration of the initial request and any retry attempts
+ MUST not exceed the Request timeout duration. If any retry attempts are
+ still in progress when the Request timeout duration has been reached,
+ these SHOULD be canceled if possible and the Gateway MUST immediately
+ return a timeout error.
+
+ If a BackendRequest timeout (`rules[].timeouts.backendRequest`) is
+ configured on the route, any retry attempts which reach the configured
+ BackendRequest timeout duration without a response SHOULD be canceled if
+ possible and the Gateway should wait for at least the specified backoff
+ duration before attempting to retry the backend request again.
+
+ If a BackendRequest timeout is _not_ configured on the route, retry
+ attempts MAY time out after an implementation default duration, or MAY
+ remain pending until a configured Request timeout or implementation
+ default duration for total request time is reached.
+
+ When this field is unspecified, the time to wait between retry attempts
+ is implementation-specific.
+
+ Support: Extended
+ pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
+ type: string
+ codes:
+ description: |-
+ Codes defines the HTTP response status codes for which a backend request
+ should be retried.
+
+ Support: Extended
+ items:
+ description: |-
+ HTTPRouteRetryStatusCode defines an HTTP response status code for
+ which a backend request should be retried.
+
+ Implementations MUST support the following status codes as retryable:
+
+ * 500
+ * 502
+ * 503
+ * 504
+
+ Implementations MAY support specifying additional discrete values in the
+ 500-599 range.
+
+ Implementations MAY support specifying discrete values in the 400-499 range,
+ which are often inadvisable to retry.
+
+
+ maximum: 599
+ minimum: 400
+ type: integer
+ type: array
+ type: object
sessionPersistence:
description: |+
SessionPersistence defines and configures session persistence
for the route rule.
-
Support: Extended
-
properties:
absoluteTimeout:
description: |-
@@ -14160,7 +11431,6 @@ spec:
session. Once the AbsoluteTimeout duration has elapsed, the
session becomes invalid.
-
Support: Extended
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
@@ -14169,7 +11439,6 @@ spec:
CookieConfig provides configuration settings that are specific
to cookie-based session persistence.
-
Support: Core
properties:
lifetimeType:
@@ -14181,20 +11450,16 @@ spec:
attributes, while a session cookie is deleted when the current
session ends.
-
When set to "Permanent", AbsoluteTimeout indicates the
cookie's lifetime via the Expires or Max-Age cookie attributes
and is required.
-
When set to "Session", AbsoluteTimeout indicates the
absolute lifetime of the cookie tracked by the gateway and
is optional.
-
Support: Core for "Session" type
-
Support: Extended for "Permanent" type
enum:
- Permanent
@@ -14207,7 +11472,6 @@ spec:
Once the session has been idle for more than the specified
IdleTimeout duration, the session becomes invalid.
-
Support: Extended
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
type: string
@@ -14218,7 +11482,6 @@ spec:
should avoid reusing session names to prevent unintended
consequences, such as rejection or unpredictable behavior.
-
Support: Implementation-specific
maxLength: 128
type: string
@@ -14229,10 +11492,8 @@ spec:
the use a header or cookie. Defaults to cookie based session
persistence.
-
Support: Core for "Cookie" type
-
Support: Extended for "Header" type
enum:
- Cookie
@@ -14241,15 +11502,12 @@ spec:
type: object
x-kubernetes-validations:
- message: AbsoluteTimeout must be specified when cookie lifetimeType is Permanent
- rule: '!has(self.cookieConfig.lifetimeType) || self.cookieConfig.lifetimeType != ''Permanent'' || has(self.absoluteTimeout)'
+ rule: '!has(self.cookieConfig) || !has(self.cookieConfig.lifetimeType) || self.cookieConfig.lifetimeType != ''Permanent'' || has(self.absoluteTimeout)'
timeouts:
- description: |+
+ description: |-
Timeouts defines the timeouts that can be configured for an HTTP request.
-
Support: Extended
-
-
properties:
backendRequest:
description: |-
@@ -14257,21 +11515,19 @@ spec:
to a backend. This covers the time from when the request first starts being
sent from the gateway to when the full response has been received from the backend.
-
Setting a timeout to the zero duration (e.g. "0s") SHOULD disable the timeout
completely. Implementations that cannot completely disable the timeout MUST
instead interpret the zero duration as the longest possible value to which
the timeout can be set.
-
An entire client HTTP transaction with a gateway, covered by the Request timeout,
may result in more than one call from the gateway to the destination backend,
for example, if automatic retries are supported.
-
- Because the Request timeout encompasses the BackendRequest timeout, the value of
- BackendRequest must be <= the value of Request timeout.
-
+ The value of BackendRequest must be a Gateway API Duration string as defined by
+ GEP-2257. When this field is unspecified, its behavior is implementation-specific;
+ when specified, the value of BackendRequest must be no more than the value of the
+ Request timeout (since the Request timeout encompasses the BackendRequest timeout).
Support: Extended
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
@@ -14282,26 +11538,22 @@ spec:
If the gateway has not been able to respond before this deadline is met, the gateway
MUST return a timeout error.
-
For example, setting the `rules.timeouts.request` field to the value `10s` in an
`HTTPRoute` will cause a timeout if a client request is taking longer than 10 seconds
to complete.
-
Setting a timeout to the zero duration (e.g. "0s") SHOULD disable the timeout
completely. Implementations that cannot completely disable the timeout MUST
instead interpret the zero duration as the longest possible value to which
the timeout can be set.
-
This timeout is intended to cover as close to the whole request-response transaction
as possible although an implementation MAY choose to start the timeout after the entire
request stream has been received instead of immediately after the transaction is
initiated by the client.
-
- When this field is unspecified, request timeout behavior is implementation-specific.
-
+ The value of Request is a Gateway API Duration string as defined by GEP-2257. When this
+ field is unspecified, request timeout behavior is implementation-specific.
Support: Extended
pattern: ^([0-9]{1,5}(h|m|s|ms)){1,4}$
@@ -14324,6 +11576,11 @@ spec:
rule: '(has(self.backendRefs) && self.backendRefs.exists_one(b, (has(b.filters) && b.filters.exists_one(f, has(f.urlRewrite) && has(f.urlRewrite.path) && f.urlRewrite.path.type == ''ReplacePrefixMatch'' && has(f.urlRewrite.path.replacePrefixMatch))) )) ? ((size(self.matches) != 1 || !has(self.matches[0].path) || self.matches[0].path.type != ''PathPrefix'') ? false : true) : true'
maxItems: 16
type: array
+ x-kubernetes-validations:
+ - message: While 16 rules and 64 matches per rule are allowed, the total number of matches across all rules in a route must be less than 128
+ rule: '(self.size() > 0 ? self[0].matches.size() : 0) + (self.size() > 1 ? self[1].matches.size() : 0) + (self.size() > 2 ? self[2].matches.size() : 0) + (self.size() > 3 ? self[3].matches.size() : 0) + (self.size() > 4 ? self[4].matches.size() : 0) + (self.size() > 5 ? self[5].matches.size() : 0) + (self.size() > 6 ? self[6].matches.size() : 0) + (self.size() > 7 ? self[7].matches.size() : 0) + (self.size() > 8 ? self[8].matches.size() : 0) + (self.size() > 9 ? self[9].matches.size() : 0) + (self.size() > 10 ? self[10].matches.size() : 0) + (self.size() > 11 ? self[11].matches.size() : 0) + (self.size() > 12 ? self[12].matches.size() : 0) + (self.size() > 13 ? self[13].matches.size() : 0) + (self.size() > 14 ? self[14].matches.size() : 0) + (self.size() > 15 ? self[15].matches.size() : 0) <= 128'
+ - message: Rule name must be unique within the route
+ rule: self.all(l1, !has(l1.name) || self.exists_one(l2, has(l2.name) && l1.name == l2.name))
type: object
status:
description: Status defines the current state of HTTPRoute.
@@ -14337,13 +11594,11 @@ spec:
first sees the route and should update the entry as appropriate when the
route or gateway is modified.
-
Note that parent references that cannot be resolved by an implementation
of this API will not be added to this list. Implementations of this API
can only populate Route status for the Gateways/parent resources they are
responsible for.
-
A maximum of 32 Gateways will be represented in this list. An empty list
means the route has not been attached to any Gateway.
items:
@@ -14357,27 +11612,23 @@ spec:
Note that the route's availability is also subject to the Gateway's own
status conditions and listener status.
-
If the Route's ParentRef specifies an existing Gateway that supports
Routes of this kind AND that Gateway's controller has sufficient access,
then that Gateway's controller MUST set the "Accepted" condition on the
Route, to indicate whether the route has been accepted or rejected by the
Gateway, and why.
-
A Route MUST be considered "Accepted" if at least one of the Route's
rules is implemented by the Gateway.
-
There are a number of cases where the "Accepted" condition may not be set
due to lack of controller visibility, that includes when:
-
* The Route refers to a non-existent parent.
* The Route is of a type that the controller does not support.
* The Route is in a namespace the controller does not have access to.
items:
- description: "Condition contains details for one aspect of the current state of this API Resource.\n---\nThis struct is intended for direct use as an array at the field path .status.conditions. For example,\n\n\n\ttype FooStatus struct{\n\t // Represents the observations of a foo's current state.\n\t // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\"\n\t // +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t // other fields\n\t}"
+ description: Condition contains details for one aspect of the current state of this API Resource.
properties:
lastTransitionTime:
description: |-
@@ -14418,12 +11669,7 @@ spec:
- Unknown
type: string
type:
- description: |-
- type of condition in CamelCase or in foo.example.com/CamelCase.
- ---
- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
- useful (see .node.status.conditions), the ability to deconflict is important.
- The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
+ description: type of condition in CamelCase or in foo.example.com/CamelCase.
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
@@ -14446,15 +11692,12 @@ spec:
controller that wrote this status. This corresponds with the
controllerName field on GatewayClass.
-
Example: "example.net/gateway-controller".
-
The format of this field is DOMAIN "/" PATH, where DOMAIN and PATH are
valid Kubernetes names
(https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
-
Controllers MUST populate this field when writing status. Controllers should ensure that
entries to status populated with their ControllerName are cleaned up when they are no
longer necessary.
@@ -14475,7 +11718,6 @@ spec:
To set the core API group (such as for a "Service" kind referent),
Group must be explicitly set to "" (empty string).
-
Support: Core
maxLength: 253
pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
@@ -14485,14 +11727,11 @@ spec:
description: |-
Kind is kind of the referent.
-
There are two kinds of parent resources with "Core" support:
-
* Gateway (Gateway conformance profile)
* Service (Mesh conformance profile, ClusterIP Services only)
-
Support for other resources is Implementation-Specific.
maxLength: 63
minLength: 1
@@ -14502,7 +11741,6 @@ spec:
description: |-
Name is the name of the referent.
-
Support: Core
maxLength: 253
minLength: 1
@@ -14512,7 +11750,6 @@ spec:
Namespace is the namespace of the referent. When unspecified, this refers
to the local namespace of the Route.
-
Note that there are specific rules for ParentRefs which cross namespace
boundaries. Cross-namespace references are only valid if they are explicitly
allowed by something in the namespace they are referring to. For example:
@@ -14520,12 +11757,10 @@ spec:
generic way to enable any other kind of cross-namespace reference.
-
ParentRefs from a Route to a Service in the same namespace are "producer"
routes, which apply default routing rules to inbound connections from
any namespace to the Service.
-
ParentRefs from a Route to a Service in a different namespace are
"consumer" routes, and these routing rules are only applied to outbound
connections originating from the same namespace as the Route, for which
@@ -14533,7 +11768,6 @@ spec:
ParentRef of the Route.
-
Support: Core
maxLength: 63
minLength: 1
@@ -14544,7 +11778,6 @@ spec:
Port is the network port this Route targets. It can be interpreted
differently based on the type of parent resource.
-
When the parent resource is a Gateway, this targets all listeners
listening on the specified port that also support this kind of Route(and
select this Route). It's not recommended to set `Port` unless the
@@ -14554,18 +11787,15 @@ spec:
must match both specified values.
-
When the parent resource is a Service, this targets a specific port in the
Service spec. When both Port (experimental) and SectionName are specified,
the name and port of the selected port must match both specified values.
-
Implementations MAY choose to support other parent resources.
Implementations supporting other types of parent resources MUST clearly
document how/if Port is interpreted.
-
For the purpose of status, an attachment is considered successful as
long as the parent resource accepts it partially. For example, Gateway
listeners can restrict which Routes can attach to them by Route kind,
@@ -14574,7 +11804,6 @@ spec:
attached. If no Gateway listeners accept attachment from this Route,
the Route MUST be considered detached from the Gateway.
-
Support: Extended
format: int32
maximum: 65535
@@ -14585,7 +11814,6 @@ spec:
SectionName is the name of a section within the target resource. In the
following resources, SectionName is interpreted as the following:
-
* Gateway: Listener name. When both Port (experimental) and SectionName
are specified, the name and port of the selected listener must match
both specified values.
@@ -14593,12 +11821,10 @@ spec:
are specified, the name and port of the selected listener must match
both specified values.
-
Implementations MAY choose to support attaching Routes to other resources.
If that is the case, they MUST clearly document how SectionName is
interpreted.
-
When unspecified (empty string), this will reference the entire resource.
For the purpose of status, an attachment is considered successful if at
least one section in the parent resource accepts it. For example, Gateway
@@ -14608,7 +11834,6 @@ spec:
attached. If no Gateway listeners accept attachment from this Route, the
Route MUST be considered detached from the Gateway.
-
Support: Core
maxLength: 253
minLength: 1
@@ -14647,8 +11872,8 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
- api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/2997
- gateway.networking.k8s.io/bundle-version: v1.1.0
+ api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/3328
+ gateway.networking.k8s.io/bundle-version: v1.2.1
gateway.networking.k8s.io/channel: experimental
creationTimestamp: null
name: referencegrants.gateway.networking.k8s.io
@@ -14665,185 +11890,6 @@ spec:
singular: referencegrant
scope: Namespaced
versions:
- - additionalPrinterColumns:
- - jsonPath: .metadata.creationTimestamp
- name: Age
- type: date
- deprecated: true
- deprecationWarning: The v1alpha2 version of ReferenceGrant has been deprecated and will be removed in a future release of the API. Please upgrade to v1beta1.
- name: v1alpha2
- schema:
- openAPIV3Schema:
- description: |-
- ReferenceGrant identifies kinds of resources in other namespaces that are
- trusted to reference the specified kinds of resources in the same namespace
- as the policy.
-
-
- Each ReferenceGrant can be used to represent a unique trust relationship.
- Additional Reference Grants can be used to add to the set of trusted
- sources of inbound references for the namespace they are defined within.
-
-
- A ReferenceGrant is required for all cross-namespace references in Gateway API
- (with the exception of cross-namespace Route-Gateway attachment, which is
- governed by the AllowedRoutes configuration on the Gateway, and cross-namespace
- Service ParentRefs on a "consumer" mesh Route, which defines routing rules
- applicable only to workloads in the Route namespace). ReferenceGrants allowing
- a reference from a Route to a Service are only applicable to BackendRefs.
-
-
- ReferenceGrant is a form of runtime verification allowing users to assert
- which cross-namespace object references are permitted. Implementations that
- support ReferenceGrant MUST NOT permit cross-namespace references which have
- no grant, and MUST respond to the removal of a grant by revoking the access
- that the grant allowed.
- properties:
- apiVersion:
- description: |-
- APIVersion defines the versioned schema of this representation of an object.
- Servers should convert recognized schemas to the latest internal value, and
- may reject unrecognized values.
- More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
- type: string
- kind:
- description: |-
- Kind is a string value representing the REST resource this object represents.
- Servers may infer this from the endpoint the client submits requests to.
- Cannot be updated.
- In CamelCase.
- More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
- type: string
- metadata:
- type: object
- spec:
- description: Spec defines the desired state of ReferenceGrant.
- properties:
- from:
- description: |-
- From describes the trusted namespaces and kinds that can reference the
- resources described in "To". Each entry in this list MUST be considered
- to be an additional place that references can be valid from, or to put
- this another way, entries MUST be combined using OR.
-
-
- Support: Core
- items:
- description: ReferenceGrantFrom describes trusted namespaces and kinds.
- properties:
- group:
- description: |-
- Group is the group of the referent.
- When empty, the Kubernetes core API group is inferred.
-
-
- Support: Core
- maxLength: 253
- pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
- type: string
- kind:
- description: |-
- Kind is the kind of the referent. Although implementations may support
- additional resources, the following types are part of the "Core"
- support level for this field.
-
-
- When used to permit a SecretObjectReference:
-
-
- * Gateway
-
-
- When used to permit a BackendObjectReference:
-
-
- * GRPCRoute
- * HTTPRoute
- * TCPRoute
- * TLSRoute
- * UDPRoute
- maxLength: 63
- minLength: 1
- pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$
- type: string
- namespace:
- description: |-
- Namespace is the namespace of the referent.
-
-
- Support: Core
- maxLength: 63
- minLength: 1
- pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
- type: string
- required:
- - group
- - kind
- - namespace
- type: object
- maxItems: 16
- minItems: 1
- type: array
- to:
- description: |-
- To describes the resources that may be referenced by the resources
- described in "From". Each entry in this list MUST be considered to be an
- additional place that references can be valid to, or to put this another
- way, entries MUST be combined using OR.
-
-
- Support: Core
- items:
- description: |-
- ReferenceGrantTo describes what Kinds are allowed as targets of the
- references.
- properties:
- group:
- description: |-
- Group is the group of the referent.
- When empty, the Kubernetes core API group is inferred.
-
-
- Support: Core
- maxLength: 253
- pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
- type: string
- kind:
- description: |-
- Kind is the kind of the referent. Although implementations may support
- additional resources, the following types are part of the "Core"
- support level for this field:
-
-
- * Secret when used to permit a SecretObjectReference
- * Service when used to permit a BackendObjectReference
- maxLength: 63
- minLength: 1
- pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$
- type: string
- name:
- description: |-
- Name is the name of the referent. When unspecified, this policy
- refers to all resources of the specified Group and Kind in the local
- namespace.
- maxLength: 253
- minLength: 1
- type: string
- required:
- - group
- - kind
- type: object
- maxItems: 16
- minItems: 1
- type: array
- required:
- - from
- - to
- type: object
- type: object
- served: true
- storage: false
- subresources: {}
- additionalPrinterColumns:
- jsonPath: .metadata.creationTimestamp
name: Age
@@ -14856,16 +11902,13 @@ spec:
trusted to reference the specified kinds of resources in the same namespace
as the policy.
-
Each ReferenceGrant can be used to represent a unique trust relationship.
Additional Reference Grants can be used to add to the set of trusted
sources of inbound references for the namespace they are defined within.
-
All cross-namespace references in Gateway API (with the exception of cross-namespace
Gateway-route attachment) require a ReferenceGrant.
-
ReferenceGrant is a form of runtime verification allowing users to assert
which cross-namespace object references are permitted. Implementations that
support ReferenceGrant MUST NOT permit cross-namespace references which have
@@ -14899,7 +11942,6 @@ spec:
to be an additional place that references can be valid from, or to put
this another way, entries MUST be combined using OR.
-
Support: Core
items:
description: ReferenceGrantFrom describes trusted namespaces and kinds.
@@ -14909,7 +11951,6 @@ spec:
Group is the group of the referent.
When empty, the Kubernetes core API group is inferred.
-
Support: Core
maxLength: 253
pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
@@ -14920,16 +11961,12 @@ spec:
additional resources, the following types are part of the "Core"
support level for this field.
-
When used to permit a SecretObjectReference:
-
* Gateway
-
When used to permit a BackendObjectReference:
-
* GRPCRoute
* HTTPRoute
* TCPRoute
@@ -14943,7 +11980,6 @@ spec:
description: |-
Namespace is the namespace of the referent.
-
Support: Core
maxLength: 63
minLength: 1
@@ -14964,7 +12000,6 @@ spec:
additional place that references can be valid to, or to put this another
way, entries MUST be combined using OR.
-
Support: Core
items:
description: |-
@@ -14976,7 +12011,6 @@ spec:
Group is the group of the referent.
When empty, the Kubernetes core API group is inferred.
-
Support: Core
maxLength: 253
pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
@@ -14987,7 +12021,6 @@ spec:
additional resources, the following types are part of the "Core"
support level for this field:
-
* Secret when used to permit a SecretObjectReference
* Service when used to permit a BackendObjectReference
maxLength: 63
@@ -15031,8 +12064,8 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
- api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/2997
- gateway.networking.k8s.io/bundle-version: v1.1.0
+ api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/3328
+ gateway.networking.k8s.io/bundle-version: v1.2.1
gateway.networking.k8s.io/channel: experimental
creationTimestamp: null
name: tcproutes.gateway.networking.k8s.io
@@ -15092,21 +12125,16 @@ spec:
create a "producer" route for a Service in a different namespace from the
Route.
-
There are two kinds of parent resources with "Core" support:
-
* Gateway (Gateway conformance profile)
* Service (Mesh conformance profile, ClusterIP Services only)
-
This API may be extended in the future to support additional kinds of parent
resources.
-
ParentRefs must be _distinct_. This means either that:
-
* They select different objects. If this is the case, then parentRef
entries are distinct. In terms of fields, this means that the
multi-part key defined by `group`, `kind`, `namespace`, and `name` must
@@ -15116,10 +12144,8 @@ spec:
optional fields to different values. If one ParentRef sets a
combination of optional fields, all must set the same combination.
-
Some examples:
-
* If one ParentRef sets `sectionName`, all ParentRefs referencing the
same object must also set `sectionName`.
* If one ParentRef sets `port`, all ParentRefs referencing the same
@@ -15127,14 +12153,12 @@ spec:
* If one ParentRef sets `sectionName` and `port`, all ParentRefs
referencing the same object must also set `sectionName` and `port`.
-
It is possible to separately reference multiple distinct objects that may
be collapsed by an implementation. For example, some implementations may
choose to merge compatible Gateway Listeners together. If that is the
case, the list of routes attached to those resources should also be
merged.
-
Note that for ParentRefs that cross namespace boundaries, there are specific
rules. Cross-namespace references are only valid if they are explicitly
allowed by something in the namespace they are referring to. For example,
@@ -15142,12 +12166,10 @@ spec:
generic way to enable other kinds of cross-namespace reference.
-
ParentRefs from a Route to a Service in the same namespace are "producer"
routes, which apply default routing rules to inbound connections from
any namespace to the Service.
-
ParentRefs from a Route to a Service in a different namespace are
"consumer" routes, and these routing rules are only applied to outbound
connections originating from the same namespace as the Route, for which
@@ -15158,22 +12180,18 @@ spec:
-
items:
description: |-
ParentReference identifies an API object (usually a Gateway) that can be considered
a parent of this resource (usually a route). There are two kinds of parent resources
with "Core" support:
-
* Gateway (Gateway conformance profile)
* Service (Mesh conformance profile, ClusterIP Services only)
-
This API may be extended in the future to support additional kinds of parent
resources.
-
The API object must be valid in the cluster; the Group and Kind must
be registered in the cluster for this reference to be valid.
properties:
@@ -15185,7 +12203,6 @@ spec:
To set the core API group (such as for a "Service" kind referent),
Group must be explicitly set to "" (empty string).
-
Support: Core
maxLength: 253
pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
@@ -15195,14 +12212,11 @@ spec:
description: |-
Kind is kind of the referent.
-
There are two kinds of parent resources with "Core" support:
-
* Gateway (Gateway conformance profile)
* Service (Mesh conformance profile, ClusterIP Services only)
-
Support for other resources is Implementation-Specific.
maxLength: 63
minLength: 1
@@ -15212,7 +12226,6 @@ spec:
description: |-
Name is the name of the referent.
-
Support: Core
maxLength: 253
minLength: 1
@@ -15222,7 +12235,6 @@ spec:
Namespace is the namespace of the referent. When unspecified, this refers
to the local namespace of the Route.
-
Note that there are specific rules for ParentRefs which cross namespace
boundaries. Cross-namespace references are only valid if they are explicitly
allowed by something in the namespace they are referring to. For example:
@@ -15230,12 +12242,10 @@ spec:
generic way to enable any other kind of cross-namespace reference.
-
ParentRefs from a Route to a Service in the same namespace are "producer"
routes, which apply default routing rules to inbound connections from
any namespace to the Service.
-
ParentRefs from a Route to a Service in a different namespace are
"consumer" routes, and these routing rules are only applied to outbound
connections originating from the same namespace as the Route, for which
@@ -15243,7 +12253,6 @@ spec:
ParentRef of the Route.
-
Support: Core
maxLength: 63
minLength: 1
@@ -15254,7 +12263,6 @@ spec:
Port is the network port this Route targets. It can be interpreted
differently based on the type of parent resource.
-
When the parent resource is a Gateway, this targets all listeners
listening on the specified port that also support this kind of Route(and
select this Route). It's not recommended to set `Port` unless the
@@ -15264,18 +12272,15 @@ spec:
must match both specified values.
-
When the parent resource is a Service, this targets a specific port in the
Service spec. When both Port (experimental) and SectionName are specified,
the name and port of the selected port must match both specified values.
-
Implementations MAY choose to support other parent resources.
Implementations supporting other types of parent resources MUST clearly
document how/if Port is interpreted.
-
For the purpose of status, an attachment is considered successful as
long as the parent resource accepts it partially. For example, Gateway
listeners can restrict which Routes can attach to them by Route kind,
@@ -15284,7 +12289,6 @@ spec:
attached. If no Gateway listeners accept attachment from this Route,
the Route MUST be considered detached from the Gateway.
-
Support: Extended
format: int32
maximum: 65535
@@ -15295,7 +12299,6 @@ spec:
SectionName is the name of a section within the target resource. In the
following resources, SectionName is interpreted as the following:
-
* Gateway: Listener name. When both Port (experimental) and SectionName
are specified, the name and port of the selected listener must match
both specified values.
@@ -15303,12 +12306,10 @@ spec:
are specified, the name and port of the selected listener must match
both specified values.
-
Implementations MAY choose to support attaching Routes to other resources.
If that is the case, they MUST clearly document how SectionName is
interpreted.
-
When unspecified (empty string), this will reference the entire resource.
For the purpose of status, an attachment is considered successful if at
least one section in the parent resource accepts it. For example, Gateway
@@ -15318,7 +12319,6 @@ spec:
attached. If no Gateway listeners accept attachment from this Route, the
Route MUST be considered detached from the Gateway.
-
Support: Core
maxLength: 253
minLength: 1
@@ -15335,7 +12335,9 @@ spec:
- message: sectionName or port must be unique when parentRefs includes 2 or more references to the same parent
rule: self.all(p1, self.exists_one(p2, p1.group == p2.group && p1.kind == p2.kind && p1.name == p2.name && (((!has(p1.__namespace__) || p1.__namespace__ == '') && (!has(p2.__namespace__) || p2.__namespace__ == '')) || (has(p1.__namespace__) && has(p2.__namespace__) && p1.__namespace__ == p2.__namespace__ )) && (((!has(p1.sectionName) || p1.sectionName == '') && (!has(p2.sectionName) || p2.sectionName == '')) || ( has(p1.sectionName) && has(p2.sectionName) && p1.sectionName == p2.sectionName)) && (((!has(p1.port) || p1.port == 0) && (!has(p2.port) || p2.port == 0)) || (has(p1.port) && has(p2.port) && p1.port == p2.port))))
rules:
- description: Rules are a list of TCP matchers and actions.
+ description: |+
+ Rules are a list of TCP matchers and actions.
+
items:
description: TCPRouteRule is the configuration for a given rule.
properties:
@@ -15348,53 +12350,41 @@ spec:
respect weight; if an invalid backend is requested to have 80% of
connections, then 80% of connections must be rejected instead.
-
Support: Core for Kubernetes Service
-
Support: Extended for Kubernetes ServiceImport
-
Support: Implementation-specific for any other resource
-
Support for weight: Extended
items:
description: |-
BackendRef defines how a Route should forward a request to a Kubernetes
resource.
-
Note that when a namespace different than the local namespace is specified, a
ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details.
-
-
When the BackendRef points to a Kubernetes Service, implementations SHOULD
honor the appProtocol field if it is set for the target Service Port.
-
Implementations supporting appProtocol SHOULD recognize the Kubernetes
Standard Application Protocols defined in KEP-3726.
-
If a Service appProtocol isn't specified, an implementation MAY infer the
backend protocol through its own means. Implementations MAY infer the
protocol from the Route type referring to the backend Service.
-
If a Route is not able to send traffic to the backend using the specified
protocol then the backend is considered invalid. Implementations MUST set the
"ResolvedRefs" condition to "False" with the "UnsupportedProtocol" reason.
-
-
Note that when the BackendTLSPolicy object is enabled by the implementation,
there are some extra rules about validity to consider here. See the fields
where this struct is used for more information about the exact behavior.
@@ -15413,20 +12403,16 @@ spec:
Kind is the Kubernetes resource kind of the referent. For example
"Service".
-
Defaults to "Service" when not specified.
-
ExternalName services can refer to CNAME DNS records that may live
outside of the cluster and as such are difficult to reason about in
terms of conformance. They also may not be safe to forward to (see
CVE-2021-25740 for more information). Implementations SHOULD NOT
support ExternalName Services.
-
Support: Core (Services with a type other than ExternalName)
-
Support: Implementation-specific (Services with type ExternalName)
maxLength: 63
minLength: 1
@@ -15442,13 +12428,11 @@ spec:
Namespace is the namespace of the backend. When unspecified, the local
namespace is inferred.
-
Note that when a namespace different than the local namespace is specified,
a ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details.
-
Support: Core
maxLength: 63
minLength: 1
@@ -15475,13 +12459,11 @@ spec:
implementation supports. Weight is not a percentage and the sum of
weights does not need to equal 100.
-
If only one backend is specified and it has a weight greater than 0, 100%
of the traffic is forwarded to that backend. If weight is set to 0, no
traffic should be forwarded for this entry. If unspecified, weight
defaults to 1.
-
Support for this field varies based on the context where used.
format: int32
maximum: 1000000
@@ -15496,10 +12478,22 @@ spec:
maxItems: 16
minItems: 1
type: array
+ name:
+ description: |-
+ Name is the name of the route rule. This name MUST be unique within a Route if it is set.
+
+ Support: Extended
+ maxLength: 253
+ minLength: 1
+ pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
+ type: string
type: object
maxItems: 16
minItems: 1
type: array
+ x-kubernetes-validations:
+ - message: Rule name must be unique within the route
+ rule: self.all(l1, !has(l1.name) || self.exists_one(l2, has(l2.name) && l1.name == l2.name))
required:
- rules
type: object
@@ -15515,13 +12509,11 @@ spec:
first sees the route and should update the entry as appropriate when the
route or gateway is modified.
-
Note that parent references that cannot be resolved by an implementation
of this API will not be added to this list. Implementations of this API
can only populate Route status for the Gateways/parent resources they are
responsible for.
-
A maximum of 32 Gateways will be represented in this list. An empty list
means the route has not been attached to any Gateway.
items:
@@ -15535,27 +12527,23 @@ spec:
Note that the route's availability is also subject to the Gateway's own
status conditions and listener status.
-
If the Route's ParentRef specifies an existing Gateway that supports
Routes of this kind AND that Gateway's controller has sufficient access,
then that Gateway's controller MUST set the "Accepted" condition on the
Route, to indicate whether the route has been accepted or rejected by the
Gateway, and why.
-
A Route MUST be considered "Accepted" if at least one of the Route's
rules is implemented by the Gateway.
-
There are a number of cases where the "Accepted" condition may not be set
due to lack of controller visibility, that includes when:
-
* The Route refers to a non-existent parent.
* The Route is of a type that the controller does not support.
* The Route is in a namespace the controller does not have access to.
items:
- description: "Condition contains details for one aspect of the current state of this API Resource.\n---\nThis struct is intended for direct use as an array at the field path .status.conditions. For example,\n\n\n\ttype FooStatus struct{\n\t // Represents the observations of a foo's current state.\n\t // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\"\n\t // +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t // other fields\n\t}"
+ description: Condition contains details for one aspect of the current state of this API Resource.
properties:
lastTransitionTime:
description: |-
@@ -15596,12 +12584,7 @@ spec:
- Unknown
type: string
type:
- description: |-
- type of condition in CamelCase or in foo.example.com/CamelCase.
- ---
- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
- useful (see .node.status.conditions), the ability to deconflict is important.
- The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
+ description: type of condition in CamelCase or in foo.example.com/CamelCase.
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
@@ -15624,15 +12607,12 @@ spec:
controller that wrote this status. This corresponds with the
controllerName field on GatewayClass.
-
Example: "example.net/gateway-controller".
-
The format of this field is DOMAIN "/" PATH, where DOMAIN and PATH are
valid Kubernetes names
(https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
-
Controllers MUST populate this field when writing status. Controllers should ensure that
entries to status populated with their ControllerName are cleaned up when they are no
longer necessary.
@@ -15653,7 +12633,6 @@ spec:
To set the core API group (such as for a "Service" kind referent),
Group must be explicitly set to "" (empty string).
-
Support: Core
maxLength: 253
pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
@@ -15663,14 +12642,11 @@ spec:
description: |-
Kind is kind of the referent.
-
There are two kinds of parent resources with "Core" support:
-
* Gateway (Gateway conformance profile)
* Service (Mesh conformance profile, ClusterIP Services only)
-
Support for other resources is Implementation-Specific.
maxLength: 63
minLength: 1
@@ -15680,7 +12656,6 @@ spec:
description: |-
Name is the name of the referent.
-
Support: Core
maxLength: 253
minLength: 1
@@ -15690,7 +12665,6 @@ spec:
Namespace is the namespace of the referent. When unspecified, this refers
to the local namespace of the Route.
-
Note that there are specific rules for ParentRefs which cross namespace
boundaries. Cross-namespace references are only valid if they are explicitly
allowed by something in the namespace they are referring to. For example:
@@ -15698,12 +12672,10 @@ spec:
generic way to enable any other kind of cross-namespace reference.
-
ParentRefs from a Route to a Service in the same namespace are "producer"
routes, which apply default routing rules to inbound connections from
any namespace to the Service.
-
ParentRefs from a Route to a Service in a different namespace are
"consumer" routes, and these routing rules are only applied to outbound
connections originating from the same namespace as the Route, for which
@@ -15711,7 +12683,6 @@ spec:
ParentRef of the Route.
-
Support: Core
maxLength: 63
minLength: 1
@@ -15722,7 +12693,6 @@ spec:
Port is the network port this Route targets. It can be interpreted
differently based on the type of parent resource.
-
When the parent resource is a Gateway, this targets all listeners
listening on the specified port that also support this kind of Route(and
select this Route). It's not recommended to set `Port` unless the
@@ -15732,18 +12702,15 @@ spec:
must match both specified values.
-
When the parent resource is a Service, this targets a specific port in the
Service spec. When both Port (experimental) and SectionName are specified,
the name and port of the selected port must match both specified values.
-
Implementations MAY choose to support other parent resources.
Implementations supporting other types of parent resources MUST clearly
document how/if Port is interpreted.
-
For the purpose of status, an attachment is considered successful as
long as the parent resource accepts it partially. For example, Gateway
listeners can restrict which Routes can attach to them by Route kind,
@@ -15752,7 +12719,6 @@ spec:
attached. If no Gateway listeners accept attachment from this Route,
the Route MUST be considered detached from the Gateway.
-
Support: Extended
format: int32
maximum: 65535
@@ -15763,7 +12729,6 @@ spec:
SectionName is the name of a section within the target resource. In the
following resources, SectionName is interpreted as the following:
-
* Gateway: Listener name. When both Port (experimental) and SectionName
are specified, the name and port of the selected listener must match
both specified values.
@@ -15771,12 +12736,10 @@ spec:
are specified, the name and port of the selected listener must match
both specified values.
-
Implementations MAY choose to support attaching Routes to other resources.
If that is the case, they MUST clearly document how SectionName is
interpreted.
-
When unspecified (empty string), this will reference the entire resource.
For the purpose of status, an attachment is considered successful if at
least one section in the parent resource accepts it. For example, Gateway
@@ -15786,7 +12749,6 @@ spec:
attached. If no Gateway listeners accept attachment from this Route, the
Route MUST be considered detached from the Gateway.
-
Support: Core
maxLength: 253
minLength: 1
@@ -15825,8 +12787,8 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
- api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/2997
- gateway.networking.k8s.io/bundle-version: v1.1.0
+ api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/3328
+ gateway.networking.k8s.io/bundle-version: v1.2.1
gateway.networking.k8s.io/channel: experimental
creationTimestamp: null
name: tlsroutes.gateway.networking.k8s.io
@@ -15853,7 +12815,6 @@ spec:
to match against TLS-specific metadata. This allows more flexibility
in matching streams for a given TLS listener.
-
If you need to forward traffic to a single target for a TLS listener, you
could choose to use a TCPRoute with a TLS listener.
properties:
@@ -15883,17 +12844,14 @@ spec:
SNI attribute of TLS ClientHello message in TLS handshake. This matches
the RFC 1123 definition of a hostname with 2 notable exceptions:
-
1. IPs are not allowed in SNI names per RFC 6066.
2. A hostname may be prefixed with a wildcard label (`*.`). The wildcard
label must appear by itself as the first label.
-
If a hostname is specified by both the Listener and TLSRoute, there
must be at least one intersecting hostname for the TLSRoute to be
attached to the Listener. For example:
-
* A Listener with `test.example.com` as the hostname matches TLSRoutes
that have either not specified any hostnames, or have specified at
least one of `test.example.com` or `*.example.com`.
@@ -15903,37 +12861,31 @@ spec:
`test.example.com` and `*.example.com` would both match. On the other
hand, `example.com` and `test.example.net` would not match.
-
If both the Listener and TLSRoute have specified hostnames, any
TLSRoute hostnames that do not match the Listener hostname MUST be
ignored. For example, if a Listener specified `*.example.com`, and the
TLSRoute specified `test.example.com` and `test.example.net`,
`test.example.net` must not be considered for a match.
-
If both the Listener and TLSRoute have specified hostnames, and none
match with the criteria above, then the TLSRoute is not accepted. The
implementation must raise an 'Accepted' Condition with a status of
`False` in the corresponding RouteParentStatus.
-
Support: Core
items:
description: |-
Hostname is the fully qualified domain name of a network host. This matches
the RFC 1123 definition of a hostname with 2 notable exceptions:
-
1. IPs are not allowed.
2. A hostname may be prefixed with a wildcard label (`*.`). The wildcard
label must appear by itself as the first label.
-
Hostname can be "precise" which is a domain name without the terminating
dot of a network host (e.g. "foo.example.com") or "wildcard", which is a
domain name prefixed with a single wildcard label (e.g. `*.example.com`).
-
Note that as per RFC1035 and RFC1123, a *label* must consist of lower case
alphanumeric characters or '-', and must start and end with an alphanumeric
character. No other punctuation is allowed.
@@ -15956,21 +12908,16 @@ spec:
create a "producer" route for a Service in a different namespace from the
Route.
-
There are two kinds of parent resources with "Core" support:
-
* Gateway (Gateway conformance profile)
* Service (Mesh conformance profile, ClusterIP Services only)
-
This API may be extended in the future to support additional kinds of parent
resources.
-
ParentRefs must be _distinct_. This means either that:
-
* They select different objects. If this is the case, then parentRef
entries are distinct. In terms of fields, this means that the
multi-part key defined by `group`, `kind`, `namespace`, and `name` must
@@ -15980,10 +12927,8 @@ spec:
optional fields to different values. If one ParentRef sets a
combination of optional fields, all must set the same combination.
-
Some examples:
-
* If one ParentRef sets `sectionName`, all ParentRefs referencing the
same object must also set `sectionName`.
* If one ParentRef sets `port`, all ParentRefs referencing the same
@@ -15991,14 +12936,12 @@ spec:
* If one ParentRef sets `sectionName` and `port`, all ParentRefs
referencing the same object must also set `sectionName` and `port`.
-
It is possible to separately reference multiple distinct objects that may
be collapsed by an implementation. For example, some implementations may
choose to merge compatible Gateway Listeners together. If that is the
case, the list of routes attached to those resources should also be
merged.
-
Note that for ParentRefs that cross namespace boundaries, there are specific
rules. Cross-namespace references are only valid if they are explicitly
allowed by something in the namespace they are referring to. For example,
@@ -16006,12 +12949,10 @@ spec:
generic way to enable other kinds of cross-namespace reference.
-
ParentRefs from a Route to a Service in the same namespace are "producer"
routes, which apply default routing rules to inbound connections from
any namespace to the Service.
-
ParentRefs from a Route to a Service in a different namespace are
"consumer" routes, and these routing rules are only applied to outbound
connections originating from the same namespace as the Route, for which
@@ -16022,22 +12963,18 @@ spec:
-
items:
description: |-
ParentReference identifies an API object (usually a Gateway) that can be considered
a parent of this resource (usually a route). There are two kinds of parent resources
with "Core" support:
-
* Gateway (Gateway conformance profile)
* Service (Mesh conformance profile, ClusterIP Services only)
-
This API may be extended in the future to support additional kinds of parent
resources.
-
The API object must be valid in the cluster; the Group and Kind must
be registered in the cluster for this reference to be valid.
properties:
@@ -16049,7 +12986,6 @@ spec:
To set the core API group (such as for a "Service" kind referent),
Group must be explicitly set to "" (empty string).
-
Support: Core
maxLength: 253
pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
@@ -16059,14 +12995,11 @@ spec:
description: |-
Kind is kind of the referent.
-
There are two kinds of parent resources with "Core" support:
-
* Gateway (Gateway conformance profile)
* Service (Mesh conformance profile, ClusterIP Services only)
-
Support for other resources is Implementation-Specific.
maxLength: 63
minLength: 1
@@ -16076,7 +13009,6 @@ spec:
description: |-
Name is the name of the referent.
-
Support: Core
maxLength: 253
minLength: 1
@@ -16086,7 +13018,6 @@ spec:
Namespace is the namespace of the referent. When unspecified, this refers
to the local namespace of the Route.
-
Note that there are specific rules for ParentRefs which cross namespace
boundaries. Cross-namespace references are only valid if they are explicitly
allowed by something in the namespace they are referring to. For example:
@@ -16094,12 +13025,10 @@ spec:
generic way to enable any other kind of cross-namespace reference.
-
ParentRefs from a Route to a Service in the same namespace are "producer"
routes, which apply default routing rules to inbound connections from
any namespace to the Service.
-
ParentRefs from a Route to a Service in a different namespace are
"consumer" routes, and these routing rules are only applied to outbound
connections originating from the same namespace as the Route, for which
@@ -16107,7 +13036,6 @@ spec:
ParentRef of the Route.
-
Support: Core
maxLength: 63
minLength: 1
@@ -16118,7 +13046,6 @@ spec:
Port is the network port this Route targets. It can be interpreted
differently based on the type of parent resource.
-
When the parent resource is a Gateway, this targets all listeners
listening on the specified port that also support this kind of Route(and
select this Route). It's not recommended to set `Port` unless the
@@ -16128,18 +13055,15 @@ spec:
must match both specified values.
-
When the parent resource is a Service, this targets a specific port in the
Service spec. When both Port (experimental) and SectionName are specified,
the name and port of the selected port must match both specified values.
-
Implementations MAY choose to support other parent resources.
Implementations supporting other types of parent resources MUST clearly
document how/if Port is interpreted.
-
For the purpose of status, an attachment is considered successful as
long as the parent resource accepts it partially. For example, Gateway
listeners can restrict which Routes can attach to them by Route kind,
@@ -16148,7 +13072,6 @@ spec:
attached. If no Gateway listeners accept attachment from this Route,
the Route MUST be considered detached from the Gateway.
-
Support: Extended
format: int32
maximum: 65535
@@ -16159,7 +13082,6 @@ spec:
SectionName is the name of a section within the target resource. In the
following resources, SectionName is interpreted as the following:
-
* Gateway: Listener name. When both Port (experimental) and SectionName
are specified, the name and port of the selected listener must match
both specified values.
@@ -16167,12 +13089,10 @@ spec:
are specified, the name and port of the selected listener must match
both specified values.
-
Implementations MAY choose to support attaching Routes to other resources.
If that is the case, they MUST clearly document how SectionName is
interpreted.
-
When unspecified (empty string), this will reference the entire resource.
For the purpose of status, an attachment is considered successful if at
least one section in the parent resource accepts it. For example, Gateway
@@ -16182,7 +13102,6 @@ spec:
attached. If no Gateway listeners accept attachment from this Route, the
Route MUST be considered detached from the Gateway.
-
Support: Core
maxLength: 253
minLength: 1
@@ -16199,7 +13118,9 @@ spec:
- message: sectionName or port must be unique when parentRefs includes 2 or more references to the same parent
rule: self.all(p1, self.exists_one(p2, p1.group == p2.group && p1.kind == p2.kind && p1.name == p2.name && (((!has(p1.__namespace__) || p1.__namespace__ == '') && (!has(p2.__namespace__) || p2.__namespace__ == '')) || (has(p1.__namespace__) && has(p2.__namespace__) && p1.__namespace__ == p2.__namespace__ )) && (((!has(p1.sectionName) || p1.sectionName == '') && (!has(p2.sectionName) || p2.sectionName == '')) || ( has(p1.sectionName) && has(p2.sectionName) && p1.sectionName == p2.sectionName)) && (((!has(p1.port) || p1.port == 0) && (!has(p2.port) || p2.port == 0)) || (has(p1.port) && has(p2.port) && p1.port == p2.port))))
rules:
- description: Rules are a list of TLS matchers and actions.
+ description: |+
+ Rules are a list of TLS matchers and actions.
+
items:
description: TLSRouteRule is the configuration for a given rule.
properties:
@@ -16215,53 +13136,41 @@ spec:
requested to have 80% of requests, then 80% of requests must be rejected
instead.
-
Support: Core for Kubernetes Service
-
Support: Extended for Kubernetes ServiceImport
-
Support: Implementation-specific for any other resource
-
Support for weight: Extended
items:
description: |-
BackendRef defines how a Route should forward a request to a Kubernetes
resource.
-
Note that when a namespace different than the local namespace is specified, a
ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details.
-
-
When the BackendRef points to a Kubernetes Service, implementations SHOULD
honor the appProtocol field if it is set for the target Service Port.
-
Implementations supporting appProtocol SHOULD recognize the Kubernetes
Standard Application Protocols defined in KEP-3726.
-
If a Service appProtocol isn't specified, an implementation MAY infer the
backend protocol through its own means. Implementations MAY infer the
protocol from the Route type referring to the backend Service.
-
If a Route is not able to send traffic to the backend using the specified
protocol then the backend is considered invalid. Implementations MUST set the
"ResolvedRefs" condition to "False" with the "UnsupportedProtocol" reason.
-
-
Note that when the BackendTLSPolicy object is enabled by the implementation,
there are some extra rules about validity to consider here. See the fields
where this struct is used for more information about the exact behavior.
@@ -16280,20 +13189,16 @@ spec:
Kind is the Kubernetes resource kind of the referent. For example
"Service".
-
Defaults to "Service" when not specified.
-
ExternalName services can refer to CNAME DNS records that may live
outside of the cluster and as such are difficult to reason about in
terms of conformance. They also may not be safe to forward to (see
CVE-2021-25740 for more information). Implementations SHOULD NOT
support ExternalName Services.
-
Support: Core (Services with a type other than ExternalName)
-
Support: Implementation-specific (Services with type ExternalName)
maxLength: 63
minLength: 1
@@ -16309,13 +13214,11 @@ spec:
Namespace is the namespace of the backend. When unspecified, the local
namespace is inferred.
-
Note that when a namespace different than the local namespace is specified,
a ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details.
-
Support: Core
maxLength: 63
minLength: 1
@@ -16342,13 +13245,11 @@ spec:
implementation supports. Weight is not a percentage and the sum of
weights does not need to equal 100.
-
If only one backend is specified and it has a weight greater than 0, 100%
of the traffic is forwarded to that backend. If weight is set to 0, no
traffic should be forwarded for this entry. If unspecified, weight
defaults to 1.
-
Support for this field varies based on the context where used.
format: int32
maximum: 1000000
@@ -16363,10 +13264,22 @@ spec:
maxItems: 16
minItems: 1
type: array
+ name:
+ description: |-
+ Name is the name of the route rule. This name MUST be unique within a Route if it is set.
+
+ Support: Extended
+ maxLength: 253
+ minLength: 1
+ pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
+ type: string
type: object
maxItems: 16
minItems: 1
type: array
+ x-kubernetes-validations:
+ - message: Rule name must be unique within the route
+ rule: self.all(l1, !has(l1.name) || self.exists_one(l2, has(l2.name) && l1.name == l2.name))
required:
- rules
type: object
@@ -16382,13 +13295,11 @@ spec:
first sees the route and should update the entry as appropriate when the
route or gateway is modified.
-
Note that parent references that cannot be resolved by an implementation
of this API will not be added to this list. Implementations of this API
can only populate Route status for the Gateways/parent resources they are
responsible for.
-
A maximum of 32 Gateways will be represented in this list. An empty list
means the route has not been attached to any Gateway.
items:
@@ -16402,27 +13313,23 @@ spec:
Note that the route's availability is also subject to the Gateway's own
status conditions and listener status.
-
If the Route's ParentRef specifies an existing Gateway that supports
Routes of this kind AND that Gateway's controller has sufficient access,
then that Gateway's controller MUST set the "Accepted" condition on the
Route, to indicate whether the route has been accepted or rejected by the
Gateway, and why.
-
A Route MUST be considered "Accepted" if at least one of the Route's
rules is implemented by the Gateway.
-
There are a number of cases where the "Accepted" condition may not be set
due to lack of controller visibility, that includes when:
-
* The Route refers to a non-existent parent.
* The Route is of a type that the controller does not support.
* The Route is in a namespace the controller does not have access to.
items:
- description: "Condition contains details for one aspect of the current state of this API Resource.\n---\nThis struct is intended for direct use as an array at the field path .status.conditions. For example,\n\n\n\ttype FooStatus struct{\n\t // Represents the observations of a foo's current state.\n\t // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\"\n\t // +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t // other fields\n\t}"
+ description: Condition contains details for one aspect of the current state of this API Resource.
properties:
lastTransitionTime:
description: |-
@@ -16463,12 +13370,7 @@ spec:
- Unknown
type: string
type:
- description: |-
- type of condition in CamelCase or in foo.example.com/CamelCase.
- ---
- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
- useful (see .node.status.conditions), the ability to deconflict is important.
- The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
+ description: type of condition in CamelCase or in foo.example.com/CamelCase.
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
@@ -16491,15 +13393,12 @@ spec:
controller that wrote this status. This corresponds with the
controllerName field on GatewayClass.
-
Example: "example.net/gateway-controller".
-
The format of this field is DOMAIN "/" PATH, where DOMAIN and PATH are
valid Kubernetes names
(https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
-
Controllers MUST populate this field when writing status. Controllers should ensure that
entries to status populated with their ControllerName are cleaned up when they are no
longer necessary.
@@ -16520,7 +13419,6 @@ spec:
To set the core API group (such as for a "Service" kind referent),
Group must be explicitly set to "" (empty string).
-
Support: Core
maxLength: 253
pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
@@ -16530,14 +13428,11 @@ spec:
description: |-
Kind is kind of the referent.
-
There are two kinds of parent resources with "Core" support:
-
* Gateway (Gateway conformance profile)
* Service (Mesh conformance profile, ClusterIP Services only)
-
Support for other resources is Implementation-Specific.
maxLength: 63
minLength: 1
@@ -16547,7 +13442,6 @@ spec:
description: |-
Name is the name of the referent.
-
Support: Core
maxLength: 253
minLength: 1
@@ -16557,7 +13451,6 @@ spec:
Namespace is the namespace of the referent. When unspecified, this refers
to the local namespace of the Route.
-
Note that there are specific rules for ParentRefs which cross namespace
boundaries. Cross-namespace references are only valid if they are explicitly
allowed by something in the namespace they are referring to. For example:
@@ -16565,12 +13458,10 @@ spec:
generic way to enable any other kind of cross-namespace reference.
-
ParentRefs from a Route to a Service in the same namespace are "producer"
routes, which apply default routing rules to inbound connections from
any namespace to the Service.
-
ParentRefs from a Route to a Service in a different namespace are
"consumer" routes, and these routing rules are only applied to outbound
connections originating from the same namespace as the Route, for which
@@ -16578,7 +13469,6 @@ spec:
ParentRef of the Route.
-
Support: Core
maxLength: 63
minLength: 1
@@ -16589,7 +13479,6 @@ spec:
Port is the network port this Route targets. It can be interpreted
differently based on the type of parent resource.
-
When the parent resource is a Gateway, this targets all listeners
listening on the specified port that also support this kind of Route(and
select this Route). It's not recommended to set `Port` unless the
@@ -16599,18 +13488,15 @@ spec:
must match both specified values.
-
When the parent resource is a Service, this targets a specific port in the
Service spec. When both Port (experimental) and SectionName are specified,
the name and port of the selected port must match both specified values.
-
Implementations MAY choose to support other parent resources.
Implementations supporting other types of parent resources MUST clearly
document how/if Port is interpreted.
-
For the purpose of status, an attachment is considered successful as
long as the parent resource accepts it partially. For example, Gateway
listeners can restrict which Routes can attach to them by Route kind,
@@ -16619,7 +13505,6 @@ spec:
attached. If no Gateway listeners accept attachment from this Route,
the Route MUST be considered detached from the Gateway.
-
Support: Extended
format: int32
maximum: 65535
@@ -16630,7 +13515,6 @@ spec:
SectionName is the name of a section within the target resource. In the
following resources, SectionName is interpreted as the following:
-
* Gateway: Listener name. When both Port (experimental) and SectionName
are specified, the name and port of the selected listener must match
both specified values.
@@ -16638,12 +13522,10 @@ spec:
are specified, the name and port of the selected listener must match
both specified values.
-
Implementations MAY choose to support attaching Routes to other resources.
If that is the case, they MUST clearly document how SectionName is
interpreted.
-
When unspecified (empty string), this will reference the entire resource.
For the purpose of status, an attachment is considered successful if at
least one section in the parent resource accepts it. For example, Gateway
@@ -16653,7 +13535,6 @@ spec:
attached. If no Gateway listeners accept attachment from this Route, the
Route MUST be considered detached from the Gateway.
-
Support: Core
maxLength: 253
minLength: 1
@@ -16692,8 +13573,8 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
- api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/2997
- gateway.networking.k8s.io/bundle-version: v1.1.0
+ api-approved.kubernetes.io: https://github.com/kubernetes-sigs/gateway-api/pull/3328
+ gateway.networking.k8s.io/bundle-version: v1.2.1
gateway.networking.k8s.io/channel: experimental
creationTimestamp: null
name: udproutes.gateway.networking.k8s.io
@@ -16753,21 +13634,16 @@ spec:
create a "producer" route for a Service in a different namespace from the
Route.
-
There are two kinds of parent resources with "Core" support:
-
* Gateway (Gateway conformance profile)
* Service (Mesh conformance profile, ClusterIP Services only)
-
This API may be extended in the future to support additional kinds of parent
resources.
-
ParentRefs must be _distinct_. This means either that:
-
* They select different objects. If this is the case, then parentRef
entries are distinct. In terms of fields, this means that the
multi-part key defined by `group`, `kind`, `namespace`, and `name` must
@@ -16777,10 +13653,8 @@ spec:
optional fields to different values. If one ParentRef sets a
combination of optional fields, all must set the same combination.
-
Some examples:
-
* If one ParentRef sets `sectionName`, all ParentRefs referencing the
same object must also set `sectionName`.
* If one ParentRef sets `port`, all ParentRefs referencing the same
@@ -16788,14 +13662,12 @@ spec:
* If one ParentRef sets `sectionName` and `port`, all ParentRefs
referencing the same object must also set `sectionName` and `port`.
-
It is possible to separately reference multiple distinct objects that may
be collapsed by an implementation. For example, some implementations may
choose to merge compatible Gateway Listeners together. If that is the
case, the list of routes attached to those resources should also be
merged.
-
Note that for ParentRefs that cross namespace boundaries, there are specific
rules. Cross-namespace references are only valid if they are explicitly
allowed by something in the namespace they are referring to. For example,
@@ -16803,12 +13675,10 @@ spec:
generic way to enable other kinds of cross-namespace reference.
-
ParentRefs from a Route to a Service in the same namespace are "producer"
routes, which apply default routing rules to inbound connections from
any namespace to the Service.
-
ParentRefs from a Route to a Service in a different namespace are
"consumer" routes, and these routing rules are only applied to outbound
connections originating from the same namespace as the Route, for which
@@ -16819,22 +13689,18 @@ spec:
-
items:
description: |-
ParentReference identifies an API object (usually a Gateway) that can be considered
a parent of this resource (usually a route). There are two kinds of parent resources
with "Core" support:
-
* Gateway (Gateway conformance profile)
* Service (Mesh conformance profile, ClusterIP Services only)
-
This API may be extended in the future to support additional kinds of parent
resources.
-
The API object must be valid in the cluster; the Group and Kind must
be registered in the cluster for this reference to be valid.
properties:
@@ -16846,7 +13712,6 @@ spec:
To set the core API group (such as for a "Service" kind referent),
Group must be explicitly set to "" (empty string).
-
Support: Core
maxLength: 253
pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
@@ -16856,14 +13721,11 @@ spec:
description: |-
Kind is kind of the referent.
-
There are two kinds of parent resources with "Core" support:
-
* Gateway (Gateway conformance profile)
* Service (Mesh conformance profile, ClusterIP Services only)
-
Support for other resources is Implementation-Specific.
maxLength: 63
minLength: 1
@@ -16873,7 +13735,6 @@ spec:
description: |-
Name is the name of the referent.
-
Support: Core
maxLength: 253
minLength: 1
@@ -16883,7 +13744,6 @@ spec:
Namespace is the namespace of the referent. When unspecified, this refers
to the local namespace of the Route.
-
Note that there are specific rules for ParentRefs which cross namespace
boundaries. Cross-namespace references are only valid if they are explicitly
allowed by something in the namespace they are referring to. For example:
@@ -16891,12 +13751,10 @@ spec:
generic way to enable any other kind of cross-namespace reference.
-
ParentRefs from a Route to a Service in the same namespace are "producer"
routes, which apply default routing rules to inbound connections from
any namespace to the Service.
-
ParentRefs from a Route to a Service in a different namespace are
"consumer" routes, and these routing rules are only applied to outbound
connections originating from the same namespace as the Route, for which
@@ -16904,7 +13762,6 @@ spec:
ParentRef of the Route.
-
Support: Core
maxLength: 63
minLength: 1
@@ -16915,7 +13772,6 @@ spec:
Port is the network port this Route targets. It can be interpreted
differently based on the type of parent resource.
-
When the parent resource is a Gateway, this targets all listeners
listening on the specified port that also support this kind of Route(and
select this Route). It's not recommended to set `Port` unless the
@@ -16925,18 +13781,15 @@ spec:
must match both specified values.
-
When the parent resource is a Service, this targets a specific port in the
Service spec. When both Port (experimental) and SectionName are specified,
the name and port of the selected port must match both specified values.
-
Implementations MAY choose to support other parent resources.
Implementations supporting other types of parent resources MUST clearly
document how/if Port is interpreted.
-
For the purpose of status, an attachment is considered successful as
long as the parent resource accepts it partially. For example, Gateway
listeners can restrict which Routes can attach to them by Route kind,
@@ -16945,7 +13798,6 @@ spec:
attached. If no Gateway listeners accept attachment from this Route,
the Route MUST be considered detached from the Gateway.
-
Support: Extended
format: int32
maximum: 65535
@@ -16956,7 +13808,6 @@ spec:
SectionName is the name of a section within the target resource. In the
following resources, SectionName is interpreted as the following:
-
* Gateway: Listener name. When both Port (experimental) and SectionName
are specified, the name and port of the selected listener must match
both specified values.
@@ -16964,12 +13815,10 @@ spec:
are specified, the name and port of the selected listener must match
both specified values.
-
Implementations MAY choose to support attaching Routes to other resources.
If that is the case, they MUST clearly document how SectionName is
interpreted.
-
When unspecified (empty string), this will reference the entire resource.
For the purpose of status, an attachment is considered successful if at
least one section in the parent resource accepts it. For example, Gateway
@@ -16979,7 +13828,6 @@ spec:
attached. If no Gateway listeners accept attachment from this Route, the
Route MUST be considered detached from the Gateway.
-
Support: Core
maxLength: 253
minLength: 1
@@ -16996,7 +13844,9 @@ spec:
- message: sectionName or port must be unique when parentRefs includes 2 or more references to the same parent
rule: self.all(p1, self.exists_one(p2, p1.group == p2.group && p1.kind == p2.kind && p1.name == p2.name && (((!has(p1.__namespace__) || p1.__namespace__ == '') && (!has(p2.__namespace__) || p2.__namespace__ == '')) || (has(p1.__namespace__) && has(p2.__namespace__) && p1.__namespace__ == p2.__namespace__ )) && (((!has(p1.sectionName) || p1.sectionName == '') && (!has(p2.sectionName) || p2.sectionName == '')) || ( has(p1.sectionName) && has(p2.sectionName) && p1.sectionName == p2.sectionName)) && (((!has(p1.port) || p1.port == 0) && (!has(p2.port) || p2.port == 0)) || (has(p1.port) && has(p2.port) && p1.port == p2.port))))
rules:
- description: Rules are a list of UDP matchers and actions.
+ description: |+
+ Rules are a list of UDP matchers and actions.
+
items:
description: UDPRouteRule is the configuration for a given rule.
properties:
@@ -17009,53 +13859,41 @@ spec:
respect weight; if an invalid backend is requested to have 80% of
the packets, then 80% of packets must be dropped instead.
-
Support: Core for Kubernetes Service
-
Support: Extended for Kubernetes ServiceImport
-
Support: Implementation-specific for any other resource
-
Support for weight: Extended
items:
description: |-
BackendRef defines how a Route should forward a request to a Kubernetes
resource.
-
Note that when a namespace different than the local namespace is specified, a
ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details.
-
-
When the BackendRef points to a Kubernetes Service, implementations SHOULD
honor the appProtocol field if it is set for the target Service Port.
-
Implementations supporting appProtocol SHOULD recognize the Kubernetes
Standard Application Protocols defined in KEP-3726.
-
If a Service appProtocol isn't specified, an implementation MAY infer the
backend protocol through its own means. Implementations MAY infer the
protocol from the Route type referring to the backend Service.
-
If a Route is not able to send traffic to the backend using the specified
protocol then the backend is considered invalid. Implementations MUST set the
"ResolvedRefs" condition to "False" with the "UnsupportedProtocol" reason.
-
-
Note that when the BackendTLSPolicy object is enabled by the implementation,
there are some extra rules about validity to consider here. See the fields
where this struct is used for more information about the exact behavior.
@@ -17074,20 +13912,16 @@ spec:
Kind is the Kubernetes resource kind of the referent. For example
"Service".
-
Defaults to "Service" when not specified.
-
ExternalName services can refer to CNAME DNS records that may live
outside of the cluster and as such are difficult to reason about in
terms of conformance. They also may not be safe to forward to (see
CVE-2021-25740 for more information). Implementations SHOULD NOT
support ExternalName Services.
-
Support: Core (Services with a type other than ExternalName)
-
Support: Implementation-specific (Services with type ExternalName)
maxLength: 63
minLength: 1
@@ -17103,13 +13937,11 @@ spec:
Namespace is the namespace of the backend. When unspecified, the local
namespace is inferred.
-
Note that when a namespace different than the local namespace is specified,
a ReferenceGrant object is required in the referent namespace to allow that
namespace's owner to accept the reference. See the ReferenceGrant
documentation for details.
-
Support: Core
maxLength: 63
minLength: 1
@@ -17136,13 +13968,11 @@ spec:
implementation supports. Weight is not a percentage and the sum of
weights does not need to equal 100.
-
If only one backend is specified and it has a weight greater than 0, 100%
of the traffic is forwarded to that backend. If weight is set to 0, no
traffic should be forwarded for this entry. If unspecified, weight
defaults to 1.
-
Support for this field varies based on the context where used.
format: int32
maximum: 1000000
@@ -17157,10 +13987,22 @@ spec:
maxItems: 16
minItems: 1
type: array
+ name:
+ description: |-
+ Name is the name of the route rule. This name MUST be unique within a Route if it is set.
+
+ Support: Extended
+ maxLength: 253
+ minLength: 1
+ pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
+ type: string
type: object
maxItems: 16
minItems: 1
type: array
+ x-kubernetes-validations:
+ - message: Rule name must be unique within the route
+ rule: self.all(l1, !has(l1.name) || self.exists_one(l2, has(l2.name) && l1.name == l2.name))
required:
- rules
type: object
@@ -17176,13 +14018,11 @@ spec:
first sees the route and should update the entry as appropriate when the
route or gateway is modified.
-
Note that parent references that cannot be resolved by an implementation
of this API will not be added to this list. Implementations of this API
can only populate Route status for the Gateways/parent resources they are
responsible for.
-
A maximum of 32 Gateways will be represented in this list. An empty list
means the route has not been attached to any Gateway.
items:
@@ -17196,27 +14036,23 @@ spec:
Note that the route's availability is also subject to the Gateway's own
status conditions and listener status.
-
If the Route's ParentRef specifies an existing Gateway that supports
Routes of this kind AND that Gateway's controller has sufficient access,
then that Gateway's controller MUST set the "Accepted" condition on the
Route, to indicate whether the route has been accepted or rejected by the
Gateway, and why.
-
A Route MUST be considered "Accepted" if at least one of the Route's
rules is implemented by the Gateway.
-
There are a number of cases where the "Accepted" condition may not be set
due to lack of controller visibility, that includes when:
-
* The Route refers to a non-existent parent.
* The Route is of a type that the controller does not support.
* The Route is in a namespace the controller does not have access to.
items:
- description: "Condition contains details for one aspect of the current state of this API Resource.\n---\nThis struct is intended for direct use as an array at the field path .status.conditions. For example,\n\n\n\ttype FooStatus struct{\n\t // Represents the observations of a foo's current state.\n\t // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\"\n\t // +patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t // other fields\n\t}"
+ description: Condition contains details for one aspect of the current state of this API Resource.
properties:
lastTransitionTime:
description: |-
@@ -17257,12 +14093,7 @@ spec:
- Unknown
type: string
type:
- description: |-
- type of condition in CamelCase or in foo.example.com/CamelCase.
- ---
- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
- useful (see .node.status.conditions), the ability to deconflict is important.
- The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
+ description: type of condition in CamelCase or in foo.example.com/CamelCase.
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
@@ -17285,15 +14116,12 @@ spec:
controller that wrote this status. This corresponds with the
controllerName field on GatewayClass.
-
Example: "example.net/gateway-controller".
-
The format of this field is DOMAIN "/" PATH, where DOMAIN and PATH are
valid Kubernetes names
(https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
-
Controllers MUST populate this field when writing status. Controllers should ensure that
entries to status populated with their ControllerName are cleaned up when they are no
longer necessary.
@@ -17314,7 +14142,6 @@ spec:
To set the core API group (such as for a "Service" kind referent),
Group must be explicitly set to "" (empty string).
-
Support: Core
maxLength: 253
pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$
@@ -17324,14 +14151,11 @@ spec:
description: |-
Kind is kind of the referent.
-
There are two kinds of parent resources with "Core" support:
-
* Gateway (Gateway conformance profile)
* Service (Mesh conformance profile, ClusterIP Services only)
-
Support for other resources is Implementation-Specific.
maxLength: 63
minLength: 1
@@ -17341,7 +14165,6 @@ spec:
description: |-
Name is the name of the referent.
-
Support: Core
maxLength: 253
minLength: 1
@@ -17351,7 +14174,6 @@ spec:
Namespace is the namespace of the referent. When unspecified, this refers
to the local namespace of the Route.
-
Note that there are specific rules for ParentRefs which cross namespace
boundaries. Cross-namespace references are only valid if they are explicitly
allowed by something in the namespace they are referring to. For example:
@@ -17359,12 +14181,10 @@ spec:
generic way to enable any other kind of cross-namespace reference.
-
ParentRefs from a Route to a Service in the same namespace are "producer"
routes, which apply default routing rules to inbound connections from
any namespace to the Service.
-
ParentRefs from a Route to a Service in a different namespace are
"consumer" routes, and these routing rules are only applied to outbound
connections originating from the same namespace as the Route, for which
@@ -17372,7 +14192,6 @@ spec:
ParentRef of the Route.
-
Support: Core
maxLength: 63
minLength: 1
@@ -17383,7 +14202,6 @@ spec:
Port is the network port this Route targets. It can be interpreted
differently based on the type of parent resource.
-
When the parent resource is a Gateway, this targets all listeners
listening on the specified port that also support this kind of Route(and
select this Route). It's not recommended to set `Port` unless the
@@ -17393,18 +14211,15 @@ spec:
must match both specified values.
-
When the parent resource is a Service, this targets a specific port in the
Service spec. When both Port (experimental) and SectionName are specified,
the name and port of the selected port must match both specified values.
-
Implementations MAY choose to support other parent resources.
Implementations supporting other types of parent resources MUST clearly
document how/if Port is interpreted.
-
For the purpose of status, an attachment is considered successful as
long as the parent resource accepts it partially. For example, Gateway
listeners can restrict which Routes can attach to them by Route kind,
@@ -17413,7 +14228,6 @@ spec:
attached. If no Gateway listeners accept attachment from this Route,
the Route MUST be considered detached from the Gateway.
-
Support: Extended
format: int32
maximum: 65535
@@ -17424,7 +14238,6 @@ spec:
SectionName is the name of a section within the target resource. In the
following resources, SectionName is interpreted as the following:
-
* Gateway: Listener name. When both Port (experimental) and SectionName
are specified, the name and port of the selected listener must match
both specified values.
@@ -17432,12 +14245,10 @@ spec:
are specified, the name and port of the selected listener must match
both specified values.
-
Implementations MAY choose to support attaching Routes to other resources.
If that is the case, they MUST clearly document how SectionName is
interpreted.
-
When unspecified (empty string), this will reference the entire resource.
For the purpose of status, an attachment is considered successful if at
least one section in the parent resource accepts it. For example, Gateway
@@ -17447,7 +14258,6 @@ spec:
attached. If no Gateway listeners accept attachment from this Route, the
Route MUST be considered detached from the Gateway.
-
Support: Core
maxLength: 253
minLength: 1
diff --git a/third_party/gateway-api-latest/istio-gateway.yaml b/third_party/gateway-api-latest/istio-gateway.yaml
index 7ea2412cec69..71b4f717730b 100644
--- a/third_party/gateway-api-latest/istio-gateway.yaml
+++ b/third_party/gateway-api-latest/istio-gateway.yaml
@@ -22,7 +22,7 @@ metadata:
labels:
app.kubernetes.io/component: net-gateway-api
app.kubernetes.io/name: knative-serving
- app.kubernetes.io/version: "20241128-8c9f69b3"
+ app.kubernetes.io/version: "20241226-dbddc320"
experimental.istio.io/disable-gateway-port-translation: "true"
spec:
type: ClusterIP
diff --git a/third_party/gateway-api-latest/net-gateway-api.yaml b/third_party/gateway-api-latest/net-gateway-api.yaml
index a13b90a874c1..4facbfa6d78f 100644
--- a/third_party/gateway-api-latest/net-gateway-api.yaml
+++ b/third_party/gateway-api-latest/net-gateway-api.yaml
@@ -20,7 +20,7 @@ metadata:
networking.knative.dev/ingress-provider: net-gateway-api
app.kubernetes.io/component: net-gateway-api
app.kubernetes.io/name: knative-serving
- app.kubernetes.io/version: "20241128-8c9f69b3"
+ app.kubernetes.io/version: "20241226-dbddc320"
aggregationRule:
clusterRoleSelectors:
- matchLabels:
@@ -36,7 +36,7 @@ metadata:
networking.knative.dev/ingress-provider: net-gateway-api
app.kubernetes.io/component: net-gateway-api
app.kubernetes.io/name: knative-serving
- app.kubernetes.io/version: "20241128-8c9f69b3"
+ app.kubernetes.io/version: "20241226-dbddc320"
rules:
- apiGroups: ["gateway.networking.k8s.io"]
resources: ["httproutes", "referencegrants", "referencepolicies"]
@@ -68,7 +68,7 @@ metadata:
labels:
networking.knative.dev/ingress-provider: net-gateway-api
app.kubernetes.io/component: net-gateway-api
- app.kubernetes.io/version: "20241128-8c9f69b3"
+ app.kubernetes.io/version: "20241226-dbddc320"
app.kubernetes.io/name: knative-serving
spec:
replicas: 1
@@ -95,7 +95,7 @@ spec:
- name: controller
# This is the Go import path for the binary that is containerized
# and substituted here.
- image: gcr.io/knative-nightly/knative.dev/net-gateway-api/cmd/controller@sha256:9a131ae673fabd124da52472eccd3281355a40d2008cec4886d8e7a9f3bc694c
+ image: gcr.io/knative-nightly/knative.dev/net-gateway-api/cmd/controller@sha256:e1857063aaa239c4f0fd40d4e3383f20d2029a8fd947dbc43e71886e5dd6560d
resources:
requests:
cpu: 100m
@@ -152,7 +152,7 @@ metadata:
labels:
app.kubernetes.io/component: net-gateway-api
app.kubernetes.io/name: knative-serving
- app.kubernetes.io/version: "20241128-8c9f69b3"
+ app.kubernetes.io/version: "20241226-dbddc320"
networking.knative.dev/ingress-provider: gateway-api
spec:
selector:
@@ -166,14 +166,14 @@ spec:
role: net-gateway-api-webhook
app.kubernetes.io/component: net-gateway-api
app.kubernetes.io/name: knative-serving
- app.kubernetes.io/version: "20241128-8c9f69b3"
+ app.kubernetes.io/version: "20241226-dbddc320"
spec:
serviceAccountName: controller
containers:
- name: webhook
# This is the Go import path for the binary that is containerized
# and substituted here.
- image: gcr.io/knative-nightly/knative.dev/net-gateway-api/cmd/webhook@sha256:60109ead57c7892693656a8ef4a8bc81418544b6b763090625e4c6a7738f736b
+ image: gcr.io/knative-nightly/knative.dev/net-gateway-api/cmd/webhook@sha256:4aa9374a55221678c9d24f993afc9cae463348680ef0314419823d7036d6fc79
resources:
requests:
cpu: 20m
@@ -251,7 +251,7 @@ metadata:
labels:
app.kubernetes.io/component: net-gateway-api
app.kubernetes.io/name: knative-serving
- app.kubernetes.io/version: "20241128-8c9f69b3"
+ app.kubernetes.io/version: "20241226-dbddc320"
networking.knative.dev/ingress-provider: gateway-api
---
@@ -278,7 +278,7 @@ metadata:
role: net-gateway-api-webhook
app.kubernetes.io/component: net-gateway-api
app.kubernetes.io/name: knative-serving
- app.kubernetes.io/version: "20241128-8c9f69b3"
+ app.kubernetes.io/version: "20241226-dbddc320"
networking.knative.dev/ingress-provider: gateway-api
spec:
ports:
@@ -317,7 +317,7 @@ metadata:
labels:
app.kubernetes.io/component: net-gateway-api
app.kubernetes.io/name: knative-serving
- app.kubernetes.io/version: "20241128-8c9f69b3"
+ app.kubernetes.io/version: "20241226-dbddc320"
networking.knative.dev/ingress-provider: gateway-api
webhooks:
- admissionReviewVersions:
@@ -359,7 +359,7 @@ metadata:
networking.knative.dev/ingress-provider: net-gateway-api
app.kubernetes.io/component: net-gateway-api
app.kubernetes.io/name: knative-serving
- app.kubernetes.io/version: "20241128-8c9f69b3"
+ app.kubernetes.io/version: "20241226-dbddc320"
data:
_example: |
################################