Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement GEP-820: remove extension points from route match types #829

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions apis/v1alpha2/httproute_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -453,17 +453,6 @@ type HTTPRouteMatch struct {
//
// +optional
Method *HTTPMethod `json:"method,omitempty"`

// ExtensionRef is an optional, implementation-specific extension to the
// "match" behavior. For example, resource "myroutematcher" in group
// "networking.example.net". If the referent cannot be found, the rule is
// not included in the route. The controller must ensure the "ResolvedRefs"
// condition on the Route status is set to `status: False`.
//
// Support: Custom
//
// +optional
ExtensionRef *LocalObjectReference `json:"extensionRef,omitempty"`
}

// HTTPRouteFilter defines additional processing steps that must be completed
Expand Down
46 changes: 0 additions & 46 deletions apis/v1alpha2/tcproute_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,37 +57,6 @@ type TCPRouteStatus struct {

// TCPRouteRule is the configuration for a given rule.
type TCPRouteRule struct {
// Matches define conditions used for matching the rule against incoming TCP
// connections. Each match is independent, i.e. this rule will be matched if
// **any** one of the matches is satisfied. If unspecified (i.e. empty),
// this Rule will match all requests for the associated Listener.
//
// Each client request MUST map to a maximum of one route rule. If a request
// matches multiple rules, matching precedence MUST be determined in order
// of the following criteria, continuing on ties:
//
// * The most specific match specified by ExtensionRef. Each implementation
// that supports ExtensionRef may have different ways of determining the
// specificity of the referenced extension.
//
// 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. For example, a Route with
// a creation timestamp of "2020-09-08 01:02:03" is given precedence over
// a Route with a creation timestamp of "2020-09-08 01:02:04".
// * The Route appearing first in alphabetical order by
// "<namespace>/<name>". For example, foo/bar is given precedence over
// foo/baz.
//
// 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.
//
// +optional
// +kubebuilder:validation:MaxItems=8
Matches []TCPRouteMatch `json:"matches,omitempty"`

// BackendRefs defines the backend(s) where matching requests should be
// sent. If unspecified or invalid (refers to a non-existent resource or a
// Service with no endpoints), the underlying implementation MUST actively
Expand All @@ -105,21 +74,6 @@ type TCPRouteRule struct {
BackendRefs []BackendRef `json:"backendRefs,omitempty"`
}

// TCPRouteMatch defines the predicate used to match connections to a
// given action.
type TCPRouteMatch struct {
// ExtensionRef is an optional, implementation-specific extension to the
// "match" behavior. For example, resource "mytcproutematcher" in group
// "networking.example.net". If the referent cannot be found, the rule MUST
// not be included in the route. The controller must ensure the
// "ResolvedRefs" condition on the Route status is set to `status: False`.
//
// Support: Custom
//
// +optional
ExtensionRef *LocalObjectReference `json:"extensionRef,omitempty"`
}

// +kubebuilder:object:root=true

// TCPRouteList contains a list of TCPRoute
Expand Down
49 changes: 0 additions & 49 deletions apis/v1alpha2/tlsroute_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,40 +90,6 @@ type TLSRouteStatus struct {

// TLSRouteRule is the configuration for a given rule.
type TLSRouteRule struct {
// Matches define conditions used for matching the rule against incoming TLS
// connections. Each match is independent, i.e. this rule will be matched if
// **any** one of the matches is satisfied. If unspecified (i.e. empty),
// this Rule will match all requests for the associated Listener.
//
// Each client request MUST map to a maximum of one route rule. If a request
// matches multiple rules, matching precedence MUST be determined in order
// of the following criteria, continuing on ties:
//
// * The longest matching SNI.
// * The longest matching precise SNI (without a wildcard). This means that
// "b.example.com" should be given precedence over "*.example.com".
// * The most specific match specified by ExtensionRef. Each implementation
// that supports ExtensionRef may have different ways of determining the
// specificity of the referenced extension.
//
// 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. For example, a Route with
// a creation timestamp of "2020-09-08 01:02:03" is given precedence over
// a Route with a creation timestamp of "2020-09-08 01:02:04".
// * The Route appearing first in alphabetical order by
// "<namespace>/<name>". For example, foo/bar is given precedence over
// foo/baz.
//
// 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.
//
// +optional
// +kubebuilder:validation:MaxItems=8
Matches []TLSRouteMatch `json:"matches,omitempty"`

// BackendRefs defines the backend(s) where matching requests should be
// sent. If unspecified or invalid (refers to a non-existent resource or
// a Service with no endpoints), the rule performs no forwarding; if no
Expand All @@ -144,21 +110,6 @@ type TLSRouteRule struct {
BackendRefs []BackendRef `json:"backendRefs,omitempty"`
}

// TLSRouteMatch defines the predicate used to match connections to a
// given action.
type TLSRouteMatch struct {
// ExtensionRef is an optional, implementation-specific extension to the
// "match" behavior. For example, resource "mytcproutematcher" in group
// "networking.example.net". If the referent cannot be found, the rule MUST
// not be included in the route. The controller must ensure the
// "ResolvedRefs" condition on the Route status is set to `status: False`.
//
// Support: Custom
//
// +optional
ExtensionRef *LocalObjectReference `json:"extensionRef,omitempty"`
}

// +kubebuilder:object:root=true

// TLSRouteList contains a list of TLSRoute
Expand Down
50 changes: 2 additions & 48 deletions apis/v1alpha2/udproute_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,43 +57,12 @@ type UDPRouteStatus struct {

// UDPRouteRule is the configuration for a given rule.
type UDPRouteRule struct {
// Matches define conditions used for matching the rule against incoming UDP
// connections. Each match is independent, i.e. this rule will be matched if
// **any** one of the matches is satisfied. If unspecified (i.e. empty),
// this Rule will match all requests for the associated Listener.
//
// Each client request MUST map to a maximum of one route rule. If a request
// matches multiple rules, matching precedence MUST be determined in order
// of the following criteria, continuing on ties:
//
// * The most specific match specified by ExtensionRef. Each implementation
// that supports ExtensionRef may have different ways of determining the
// specificity of the referenced extension.
//
// 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. For example, a Route with
// a creation timestamp of "2020-09-08 01:02:03" is given precedence over
// a Route with a creation timestamp of "2020-09-08 01:02:04".
// * The Route appearing first in alphabetical order by
// "<namespace>/<name>". For example, foo/bar is given precedence over
// foo/baz.
//
// 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.
//
// +optional
// +kubebuilder:validation:MaxItems=8
Matches []UDPRouteMatch `json:"matches,omitempty"`

// BackendRefs defines the backend(s) where matching requests should be
// sent. If unspecified or invalid (refers to a non-existent resource or a
// Service with no endpoints), the underlying implementation MUST actively
// reject connection attempts to this backend. Connection rejections must
// reject connection attempts to this backend. Packet drops must
// respect weight; if an invalid backend is requested to have 80% of
// connections, then 80% of connections must be rejected instead.
// the packets, then 80% of packets must be dropped instead.
//
// Support: Core for Kubernetes Service
// Support: Custom for any other resource
Expand All @@ -105,21 +74,6 @@ type UDPRouteRule struct {
BackendRefs []BackendRef `json:"backendRefs,omitempty"`
}

// UDPRouteMatch defines the predicate used to match packets to a
// given action.
type UDPRouteMatch struct {
// ExtensionRef is an optional, implementation-specific extension to the
// "match" behavior. For example, resource "mytcproutematcher" in group
// "networking.example.net". If the referent cannot be found, the rule MUST
// not be included in the route. The controller must ensure the
// "ResolvedRefs" condition on the Route status is set to `status: False`.
//
// Support: Custom
//
// +optional
ExtensionRef *LocalObjectReference `json:"extensionRef,omitempty"`
}

// +kubebuilder:object:root=true

// UDPRouteList contains a list of UDPRoute
Expand Down
86 changes: 0 additions & 86 deletions apis/v1alpha2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 0 additions & 33 deletions config/crd/v1alpha2/gateway.networking.k8s.io_httproutes.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading