diff --git a/apis/v1alpha2/zz_generated.deepcopy.go b/apis/v1alpha2/zz_generated.deepcopy.go index 302f2e80eb..846c6d0bfc 100644 --- a/apis/v1alpha2/zz_generated.deepcopy.go +++ b/apis/v1alpha2/zz_generated.deepcopy.go @@ -26,6 +26,55 @@ import ( "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AddressMatch) DeepCopyInto(out *AddressMatch) { + *out = *in + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(AddressType) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AddressMatch. +func (in *AddressMatch) DeepCopy() *AddressMatch { + if in == nil { + return nil + } + out := new(AddressMatch) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AddressRouteMatches) DeepCopyInto(out *AddressRouteMatches) { + *out = *in + if in.SourceAddresses != nil { + in, out := &in.SourceAddresses, &out.SourceAddresses + *out = make([]AddressMatch, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.DestinationAddresses != nil { + in, out := &in.DestinationAddresses, &out.DestinationAddresses + *out = make([]AddressMatch, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AddressRouteMatches. +func (in *AddressRouteMatches) DeepCopy() *AddressRouteMatches { + if in == nil { + return nil + } + out := new(AddressRouteMatches) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AllowedRoutes) DeepCopyInto(out *AllowedRoutes) { *out = *in @@ -1317,6 +1366,13 @@ func (in *TCPRouteList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TCPRouteRule) DeepCopyInto(out *TCPRouteRule) { *out = *in + if in.Matches != nil { + in, out := &in.Matches, &out.Matches + *out = make([]AddressRouteMatches, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } if in.BackendRefs != nil { in, out := &in.BackendRefs, &out.BackendRefs *out = make([]BackendRef, len(*in)) @@ -1562,6 +1618,13 @@ func (in *UDPRouteList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *UDPRouteRule) DeepCopyInto(out *UDPRouteRule) { *out = *in + if in.Matches != nil { + in, out := &in.Matches, &out.Matches + *out = make([]AddressRouteMatches, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } if in.BackendRefs != nil { in, out := &in.BackendRefs, &out.BackendRefs *out = make([]BackendRef, len(*in)) diff --git a/config/crd/experimental/gateway.networking.k8s.io_tcproutes.yaml b/config/crd/experimental/gateway.networking.k8s.io_tcproutes.yaml index 3bea659623..e3f3b52322 100644 --- a/config/crd/experimental/gateway.networking.k8s.io_tcproutes.yaml +++ b/config/crd/experimental/gateway.networking.k8s.io_tcproutes.yaml @@ -218,6 +218,94 @@ spec: maxItems: 16 minItems: 1 type: array + matches: + description: "Matches are rules for routing traffic to backends + based on addresses. \n " + items: + description: AddressRouteMatches defines AddressMatch rules + for inbound traffic according to source and/or destination + address of a packet or connection. + properties: + destinationAddresses: + description: "DestinationAddresses indicates the destination + network addresses which are valid for routing traffic. + \n Support: Core" + items: + description: AddressMatch defines matching rules for + network addresses by type. + properties: + type: + description: "Type of the address, either IPAddress + or NamedAddress. \n If NamedAddress is used this + is a custom and specific value for each implementation + to handle (and add validation for) according to + their own needs. \n For IPAddress the implementor + may expect either IPv4 or IPv6. \n Support: Core + (IPAddress) Support: Custom (NamedAddress)" + enum: + - IPAddress + - Hostname + - NamedAddress + type: string + value: + description: "Value of the address. The validity + of the values will depend on the type and support + by the controller. \n If implementations support + proxy-protocol (see: https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt) + they must respect the connection metadata from + proxy-protocol in the match logic implemented + for these address values. \n Examples: `1.2.3.4`, + `128::1`, `my-named-address`. \n Support: Core" + maxLength: 253 + minLength: 1 + type: string + required: + - value + type: object + type: array + sourceAddresses: + description: "SourceAddresses indicates the originating + (source) network addresses which are valid for routing + traffic. \n Support: Core" + items: + description: AddressMatch defines matching rules for + network addresses by type. + properties: + type: + description: "Type of the address, either IPAddress + or NamedAddress. \n If NamedAddress is used this + is a custom and specific value for each implementation + to handle (and add validation for) according to + their own needs. \n For IPAddress the implementor + may expect either IPv4 or IPv6. \n Support: Core + (IPAddress) Support: Custom (NamedAddress)" + enum: + - IPAddress + - Hostname + - NamedAddress + type: string + value: + description: "Value of the address. The validity + of the values will depend on the type and support + by the controller. \n If implementations support + proxy-protocol (see: https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt) + they must respect the connection metadata from + proxy-protocol in the match logic implemented + for these address values. \n Examples: `1.2.3.4`, + `128::1`, `my-named-address`. \n Support: Core" + maxLength: 253 + minLength: 1 + type: string + required: + - value + type: object + type: array + required: + - destinationAddresses + - sourceAddresses + type: object + maxItems: 16 + type: array type: object maxItems: 16 minItems: 1 diff --git a/config/crd/experimental/gateway.networking.k8s.io_udproutes.yaml b/config/crd/experimental/gateway.networking.k8s.io_udproutes.yaml index 5c6e5a1bd0..60a82ec1b9 100644 --- a/config/crd/experimental/gateway.networking.k8s.io_udproutes.yaml +++ b/config/crd/experimental/gateway.networking.k8s.io_udproutes.yaml @@ -218,6 +218,94 @@ spec: maxItems: 16 minItems: 1 type: array + matches: + description: "Matches add rules for filtering traffic to backends + based on addresses. \n " + items: + description: AddressRouteMatches defines AddressMatch rules + for inbound traffic according to source and/or destination + address of a packet or connection. + properties: + destinationAddresses: + description: "DestinationAddresses indicates the destination + network addresses which are valid for routing traffic. + \n Support: Core" + items: + description: AddressMatch defines matching rules for + network addresses by type. + properties: + type: + description: "Type of the address, either IPAddress + or NamedAddress. \n If NamedAddress is used this + is a custom and specific value for each implementation + to handle (and add validation for) according to + their own needs. \n For IPAddress the implementor + may expect either IPv4 or IPv6. \n Support: Core + (IPAddress) Support: Custom (NamedAddress)" + enum: + - IPAddress + - Hostname + - NamedAddress + type: string + value: + description: "Value of the address. The validity + of the values will depend on the type and support + by the controller. \n If implementations support + proxy-protocol (see: https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt) + they must respect the connection metadata from + proxy-protocol in the match logic implemented + for these address values. \n Examples: `1.2.3.4`, + `128::1`, `my-named-address`. \n Support: Core" + maxLength: 253 + minLength: 1 + type: string + required: + - value + type: object + type: array + sourceAddresses: + description: "SourceAddresses indicates the originating + (source) network addresses which are valid for routing + traffic. \n Support: Core" + items: + description: AddressMatch defines matching rules for + network addresses by type. + properties: + type: + description: "Type of the address, either IPAddress + or NamedAddress. \n If NamedAddress is used this + is a custom and specific value for each implementation + to handle (and add validation for) according to + their own needs. \n For IPAddress the implementor + may expect either IPv4 or IPv6. \n Support: Core + (IPAddress) Support: Custom (NamedAddress)" + enum: + - IPAddress + - Hostname + - NamedAddress + type: string + value: + description: "Value of the address. The validity + of the values will depend on the type and support + by the controller. \n If implementations support + proxy-protocol (see: https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt) + they must respect the connection metadata from + proxy-protocol in the match logic implemented + for these address values. \n Examples: `1.2.3.4`, + `128::1`, `my-named-address`. \n Support: Core" + maxLength: 253 + minLength: 1 + type: string + required: + - value + type: object + type: array + required: + - destinationAddresses + - sourceAddresses + type: object + maxItems: 16 + type: array type: object maxItems: 16 minItems: 1