diff --git a/apis/applyconfiguration/apis/v1/allowedroutes.go b/apis/applyconfiguration/apis/v1/allowedroutes.go
index 630e24ff2a..07702c8788 100644
--- a/apis/applyconfiguration/apis/v1/allowedroutes.go
+++ b/apis/applyconfiguration/apis/v1/allowedroutes.go
@@ -18,14 +18,14 @@ limitations under the License.
package v1
-// AllowedRoutesApplyConfiguration represents an declarative configuration of the AllowedRoutes type for use
+// AllowedRoutesApplyConfiguration represents a declarative configuration of the AllowedRoutes type for use
// with apply.
type AllowedRoutesApplyConfiguration struct {
Namespaces *RouteNamespacesApplyConfiguration `json:"namespaces,omitempty"`
Kinds []RouteGroupKindApplyConfiguration `json:"kinds,omitempty"`
}
-// AllowedRoutesApplyConfiguration constructs an declarative configuration of the AllowedRoutes type for use with
+// AllowedRoutesApplyConfiguration constructs a declarative configuration of the AllowedRoutes type for use with
// apply.
func AllowedRoutes() *AllowedRoutesApplyConfiguration {
return &AllowedRoutesApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/backendobjectreference.go b/apis/applyconfiguration/apis/v1/backendobjectreference.go
index 49487ef722..a8d9c663de 100644
--- a/apis/applyconfiguration/apis/v1/backendobjectreference.go
+++ b/apis/applyconfiguration/apis/v1/backendobjectreference.go
@@ -22,7 +22,7 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// BackendObjectReferenceApplyConfiguration represents an declarative configuration of the BackendObjectReference type for use
+// BackendObjectReferenceApplyConfiguration represents a declarative configuration of the BackendObjectReference type for use
// with apply.
type BackendObjectReferenceApplyConfiguration struct {
Group *v1.Group `json:"group,omitempty"`
@@ -32,7 +32,7 @@ type BackendObjectReferenceApplyConfiguration struct {
Port *v1.PortNumber `json:"port,omitempty"`
}
-// BackendObjectReferenceApplyConfiguration constructs an declarative configuration of the BackendObjectReference type for use with
+// BackendObjectReferenceApplyConfiguration constructs a declarative configuration of the BackendObjectReference type for use with
// apply.
func BackendObjectReference() *BackendObjectReferenceApplyConfiguration {
return &BackendObjectReferenceApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/backendref.go b/apis/applyconfiguration/apis/v1/backendref.go
index cbbc24c250..c30007dc86 100644
--- a/apis/applyconfiguration/apis/v1/backendref.go
+++ b/apis/applyconfiguration/apis/v1/backendref.go
@@ -22,14 +22,14 @@ import (
apisv1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// BackendRefApplyConfiguration represents an declarative configuration of the BackendRef type for use
+// BackendRefApplyConfiguration represents a declarative configuration of the BackendRef type for use
// with apply.
type BackendRefApplyConfiguration struct {
BackendObjectReferenceApplyConfiguration `json:",inline"`
Weight *int32 `json:"weight,omitempty"`
}
-// BackendRefApplyConfiguration constructs an declarative configuration of the BackendRef type for use with
+// BackendRefApplyConfiguration constructs a declarative configuration of the BackendRef type for use with
// apply.
func BackendRef() *BackendRefApplyConfiguration {
return &BackendRefApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/commonroutespec.go b/apis/applyconfiguration/apis/v1/commonroutespec.go
index faa727cceb..00dcfe71e2 100644
--- a/apis/applyconfiguration/apis/v1/commonroutespec.go
+++ b/apis/applyconfiguration/apis/v1/commonroutespec.go
@@ -18,13 +18,13 @@ limitations under the License.
package v1
-// CommonRouteSpecApplyConfiguration represents an declarative configuration of the CommonRouteSpec type for use
+// CommonRouteSpecApplyConfiguration represents a declarative configuration of the CommonRouteSpec type for use
// with apply.
type CommonRouteSpecApplyConfiguration struct {
ParentRefs []ParentReferenceApplyConfiguration `json:"parentRefs,omitempty"`
}
-// CommonRouteSpecApplyConfiguration constructs an declarative configuration of the CommonRouteSpec type for use with
+// CommonRouteSpecApplyConfiguration constructs a declarative configuration of the CommonRouteSpec type for use with
// apply.
func CommonRouteSpec() *CommonRouteSpecApplyConfiguration {
return &CommonRouteSpecApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/cookieconfig.go b/apis/applyconfiguration/apis/v1/cookieconfig.go
index 7702c69a56..9280ddce51 100644
--- a/apis/applyconfiguration/apis/v1/cookieconfig.go
+++ b/apis/applyconfiguration/apis/v1/cookieconfig.go
@@ -22,13 +22,13 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// CookieConfigApplyConfiguration represents an declarative configuration of the CookieConfig type for use
+// CookieConfigApplyConfiguration represents a declarative configuration of the CookieConfig type for use
// with apply.
type CookieConfigApplyConfiguration struct {
LifetimeType *v1.CookieLifetimeType `json:"lifetimeType,omitempty"`
}
-// CookieConfigApplyConfiguration constructs an declarative configuration of the CookieConfig type for use with
+// CookieConfigApplyConfiguration constructs a declarative configuration of the CookieConfig type for use with
// apply.
func CookieConfig() *CookieConfigApplyConfiguration {
return &CookieConfigApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/fraction.go b/apis/applyconfiguration/apis/v1/fraction.go
index 5d828f6178..2c81976000 100644
--- a/apis/applyconfiguration/apis/v1/fraction.go
+++ b/apis/applyconfiguration/apis/v1/fraction.go
@@ -18,14 +18,14 @@ limitations under the License.
package v1
-// FractionApplyConfiguration represents an declarative configuration of the Fraction type for use
+// FractionApplyConfiguration represents a declarative configuration of the Fraction type for use
// with apply.
type FractionApplyConfiguration struct {
Numerator *int32 `json:"numerator,omitempty"`
Denominator *int32 `json:"denominator,omitempty"`
}
-// FractionApplyConfiguration constructs an declarative configuration of the Fraction type for use with
+// FractionApplyConfiguration constructs a declarative configuration of the Fraction type for use with
// apply.
func Fraction() *FractionApplyConfiguration {
return &FractionApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/frontendtlsvalidation.go b/apis/applyconfiguration/apis/v1/frontendtlsvalidation.go
index 7fafdf8cea..5342400ccf 100644
--- a/apis/applyconfiguration/apis/v1/frontendtlsvalidation.go
+++ b/apis/applyconfiguration/apis/v1/frontendtlsvalidation.go
@@ -18,13 +18,13 @@ limitations under the License.
package v1
-// FrontendTLSValidationApplyConfiguration represents an declarative configuration of the FrontendTLSValidation type for use
+// FrontendTLSValidationApplyConfiguration represents a declarative configuration of the FrontendTLSValidation type for use
// with apply.
type FrontendTLSValidationApplyConfiguration struct {
CACertificateRefs []ObjectReferenceApplyConfiguration `json:"caCertificateRefs,omitempty"`
}
-// FrontendTLSValidationApplyConfiguration constructs an declarative configuration of the FrontendTLSValidation type for use with
+// FrontendTLSValidationApplyConfiguration constructs a declarative configuration of the FrontendTLSValidation type for use with
// apply.
func FrontendTLSValidation() *FrontendTLSValidationApplyConfiguration {
return &FrontendTLSValidationApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/gateway.go b/apis/applyconfiguration/apis/v1/gateway.go
index befe0daff9..8e8f27e6fb 100644
--- a/apis/applyconfiguration/apis/v1/gateway.go
+++ b/apis/applyconfiguration/apis/v1/gateway.go
@@ -23,12 +23,11 @@ import (
types "k8s.io/apimachinery/pkg/types"
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
-
internal "sigs.k8s.io/gateway-api/apis/applyconfiguration/internal"
gatewayapiapisv1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// GatewayApplyConfiguration represents an declarative configuration of the Gateway type for use
+// GatewayApplyConfiguration represents a declarative configuration of the Gateway type for use
// with apply.
type GatewayApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
@@ -37,7 +36,7 @@ type GatewayApplyConfiguration struct {
Status *GatewayStatusApplyConfiguration `json:"status,omitempty"`
}
-// Gateway constructs an declarative configuration of the Gateway type for use with
+// Gateway constructs a declarative configuration of the Gateway type for use with
// apply.
func Gateway(name, namespace string) *GatewayApplyConfiguration {
b := &GatewayApplyConfiguration{}
@@ -257,3 +256,9 @@ func (b *GatewayApplyConfiguration) WithStatus(value *GatewayStatusApplyConfigur
b.Status = value
return b
}
+
+// GetName retrieves the value of the Name field in the declarative configuration.
+func (b *GatewayApplyConfiguration) GetName() *string {
+ b.ensureObjectMetaApplyConfigurationExists()
+ return b.Name
+}
diff --git a/apis/applyconfiguration/apis/v1/gatewayaddress.go b/apis/applyconfiguration/apis/v1/gatewayaddress.go
index e810a109d8..28821a7a01 100644
--- a/apis/applyconfiguration/apis/v1/gatewayaddress.go
+++ b/apis/applyconfiguration/apis/v1/gatewayaddress.go
@@ -22,14 +22,14 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// GatewayAddressApplyConfiguration represents an declarative configuration of the GatewayAddress type for use
+// GatewayAddressApplyConfiguration represents a declarative configuration of the GatewayAddress type for use
// with apply.
type GatewayAddressApplyConfiguration struct {
Type *v1.AddressType `json:"type,omitempty"`
Value *string `json:"value,omitempty"`
}
-// GatewayAddressApplyConfiguration constructs an declarative configuration of the GatewayAddress type for use with
+// GatewayAddressApplyConfiguration constructs a declarative configuration of the GatewayAddress type for use with
// apply.
func GatewayAddress() *GatewayAddressApplyConfiguration {
return &GatewayAddressApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/gatewaybackendtls.go b/apis/applyconfiguration/apis/v1/gatewaybackendtls.go
index e1ef627077..eee2550713 100644
--- a/apis/applyconfiguration/apis/v1/gatewaybackendtls.go
+++ b/apis/applyconfiguration/apis/v1/gatewaybackendtls.go
@@ -18,13 +18,13 @@ limitations under the License.
package v1
-// GatewayBackendTLSApplyConfiguration represents an declarative configuration of the GatewayBackendTLS type for use
+// GatewayBackendTLSApplyConfiguration represents a declarative configuration of the GatewayBackendTLS type for use
// with apply.
type GatewayBackendTLSApplyConfiguration struct {
ClientCertificateRef *SecretObjectReferenceApplyConfiguration `json:"clientCertificateRef,omitempty"`
}
-// GatewayBackendTLSApplyConfiguration constructs an declarative configuration of the GatewayBackendTLS type for use with
+// GatewayBackendTLSApplyConfiguration constructs a declarative configuration of the GatewayBackendTLS type for use with
// apply.
func GatewayBackendTLS() *GatewayBackendTLSApplyConfiguration {
return &GatewayBackendTLSApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/gatewayclass.go b/apis/applyconfiguration/apis/v1/gatewayclass.go
index 63ff9600e7..7d1cfcbc5f 100644
--- a/apis/applyconfiguration/apis/v1/gatewayclass.go
+++ b/apis/applyconfiguration/apis/v1/gatewayclass.go
@@ -23,12 +23,11 @@ import (
types "k8s.io/apimachinery/pkg/types"
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
-
internal "sigs.k8s.io/gateway-api/apis/applyconfiguration/internal"
gatewayapiapisv1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// GatewayClassApplyConfiguration represents an declarative configuration of the GatewayClass type for use
+// GatewayClassApplyConfiguration represents a declarative configuration of the GatewayClass type for use
// with apply.
type GatewayClassApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
@@ -37,7 +36,7 @@ type GatewayClassApplyConfiguration struct {
Status *GatewayClassStatusApplyConfiguration `json:"status,omitempty"`
}
-// GatewayClass constructs an declarative configuration of the GatewayClass type for use with
+// GatewayClass constructs a declarative configuration of the GatewayClass type for use with
// apply.
func GatewayClass(name string) *GatewayClassApplyConfiguration {
b := &GatewayClassApplyConfiguration{}
@@ -255,3 +254,9 @@ func (b *GatewayClassApplyConfiguration) WithStatus(value *GatewayClassStatusApp
b.Status = value
return b
}
+
+// GetName retrieves the value of the Name field in the declarative configuration.
+func (b *GatewayClassApplyConfiguration) GetName() *string {
+ b.ensureObjectMetaApplyConfigurationExists()
+ return b.Name
+}
diff --git a/apis/applyconfiguration/apis/v1/gatewayclassspec.go b/apis/applyconfiguration/apis/v1/gatewayclassspec.go
index 460724ff72..8591cd2138 100644
--- a/apis/applyconfiguration/apis/v1/gatewayclassspec.go
+++ b/apis/applyconfiguration/apis/v1/gatewayclassspec.go
@@ -22,7 +22,7 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// GatewayClassSpecApplyConfiguration represents an declarative configuration of the GatewayClassSpec type for use
+// GatewayClassSpecApplyConfiguration represents a declarative configuration of the GatewayClassSpec type for use
// with apply.
type GatewayClassSpecApplyConfiguration struct {
ControllerName *v1.GatewayController `json:"controllerName,omitempty"`
@@ -30,7 +30,7 @@ type GatewayClassSpecApplyConfiguration struct {
Description *string `json:"description,omitempty"`
}
-// GatewayClassSpecApplyConfiguration constructs an declarative configuration of the GatewayClassSpec type for use with
+// GatewayClassSpecApplyConfiguration constructs a declarative configuration of the GatewayClassSpec type for use with
// apply.
func GatewayClassSpec() *GatewayClassSpecApplyConfiguration {
return &GatewayClassSpecApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/gatewayclassstatus.go b/apis/applyconfiguration/apis/v1/gatewayclassstatus.go
index 79059ff2b3..fb3fa8df15 100644
--- a/apis/applyconfiguration/apis/v1/gatewayclassstatus.go
+++ b/apis/applyconfiguration/apis/v1/gatewayclassstatus.go
@@ -22,14 +22,14 @@ import (
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
-// GatewayClassStatusApplyConfiguration represents an declarative configuration of the GatewayClassStatus type for use
+// GatewayClassStatusApplyConfiguration represents a declarative configuration of the GatewayClassStatus type for use
// with apply.
type GatewayClassStatusApplyConfiguration struct {
Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"`
SupportedFeatures []SupportedFeatureApplyConfiguration `json:"supportedFeatures,omitempty"`
}
-// GatewayClassStatusApplyConfiguration constructs an declarative configuration of the GatewayClassStatus type for use with
+// GatewayClassStatusApplyConfiguration constructs a declarative configuration of the GatewayClassStatus type for use with
// apply.
func GatewayClassStatus() *GatewayClassStatusApplyConfiguration {
return &GatewayClassStatusApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/gatewayinfrastructure.go b/apis/applyconfiguration/apis/v1/gatewayinfrastructure.go
index 7c55b1b70c..0bed1ad25c 100644
--- a/apis/applyconfiguration/apis/v1/gatewayinfrastructure.go
+++ b/apis/applyconfiguration/apis/v1/gatewayinfrastructure.go
@@ -22,7 +22,7 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// GatewayInfrastructureApplyConfiguration represents an declarative configuration of the GatewayInfrastructure type for use
+// GatewayInfrastructureApplyConfiguration represents a declarative configuration of the GatewayInfrastructure type for use
// with apply.
type GatewayInfrastructureApplyConfiguration struct {
Labels map[v1.LabelKey]v1.LabelValue `json:"labels,omitempty"`
@@ -30,7 +30,7 @@ type GatewayInfrastructureApplyConfiguration struct {
ParametersRef *LocalParametersReferenceApplyConfiguration `json:"parametersRef,omitempty"`
}
-// GatewayInfrastructureApplyConfiguration constructs an declarative configuration of the GatewayInfrastructure type for use with
+// GatewayInfrastructureApplyConfiguration constructs a declarative configuration of the GatewayInfrastructure type for use with
// apply.
func GatewayInfrastructure() *GatewayInfrastructureApplyConfiguration {
return &GatewayInfrastructureApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/gatewayspec.go b/apis/applyconfiguration/apis/v1/gatewayspec.go
index a86b68fae0..89ff6b48b5 100644
--- a/apis/applyconfiguration/apis/v1/gatewayspec.go
+++ b/apis/applyconfiguration/apis/v1/gatewayspec.go
@@ -22,7 +22,7 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// GatewaySpecApplyConfiguration represents an declarative configuration of the GatewaySpec type for use
+// GatewaySpecApplyConfiguration represents a declarative configuration of the GatewaySpec type for use
// with apply.
type GatewaySpecApplyConfiguration struct {
GatewayClassName *v1.ObjectName `json:"gatewayClassName,omitempty"`
@@ -32,7 +32,7 @@ type GatewaySpecApplyConfiguration struct {
BackendTLS *GatewayBackendTLSApplyConfiguration `json:"backendTLS,omitempty"`
}
-// GatewaySpecApplyConfiguration constructs an declarative configuration of the GatewaySpec type for use with
+// GatewaySpecApplyConfiguration constructs a declarative configuration of the GatewaySpec type for use with
// apply.
func GatewaySpec() *GatewaySpecApplyConfiguration {
return &GatewaySpecApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/gatewaystatus.go b/apis/applyconfiguration/apis/v1/gatewaystatus.go
index 3bb277d608..3e96cd2907 100644
--- a/apis/applyconfiguration/apis/v1/gatewaystatus.go
+++ b/apis/applyconfiguration/apis/v1/gatewaystatus.go
@@ -22,7 +22,7 @@ import (
metav1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
-// GatewayStatusApplyConfiguration represents an declarative configuration of the GatewayStatus type for use
+// GatewayStatusApplyConfiguration represents a declarative configuration of the GatewayStatus type for use
// with apply.
type GatewayStatusApplyConfiguration struct {
Addresses []GatewayStatusAddressApplyConfiguration `json:"addresses,omitempty"`
@@ -30,7 +30,7 @@ type GatewayStatusApplyConfiguration struct {
Listeners []ListenerStatusApplyConfiguration `json:"listeners,omitempty"`
}
-// GatewayStatusApplyConfiguration constructs an declarative configuration of the GatewayStatus type for use with
+// GatewayStatusApplyConfiguration constructs a declarative configuration of the GatewayStatus type for use with
// apply.
func GatewayStatus() *GatewayStatusApplyConfiguration {
return &GatewayStatusApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/gatewaystatusaddress.go b/apis/applyconfiguration/apis/v1/gatewaystatusaddress.go
index b21251e107..a40b54415a 100644
--- a/apis/applyconfiguration/apis/v1/gatewaystatusaddress.go
+++ b/apis/applyconfiguration/apis/v1/gatewaystatusaddress.go
@@ -22,14 +22,14 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// GatewayStatusAddressApplyConfiguration represents an declarative configuration of the GatewayStatusAddress type for use
+// GatewayStatusAddressApplyConfiguration represents a declarative configuration of the GatewayStatusAddress type for use
// with apply.
type GatewayStatusAddressApplyConfiguration struct {
Type *v1.AddressType `json:"type,omitempty"`
Value *string `json:"value,omitempty"`
}
-// GatewayStatusAddressApplyConfiguration constructs an declarative configuration of the GatewayStatusAddress type for use with
+// GatewayStatusAddressApplyConfiguration constructs a declarative configuration of the GatewayStatusAddress type for use with
// apply.
func GatewayStatusAddress() *GatewayStatusAddressApplyConfiguration {
return &GatewayStatusAddressApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/gatewaytlsconfig.go b/apis/applyconfiguration/apis/v1/gatewaytlsconfig.go
index 7062430197..57c76b2e89 100644
--- a/apis/applyconfiguration/apis/v1/gatewaytlsconfig.go
+++ b/apis/applyconfiguration/apis/v1/gatewaytlsconfig.go
@@ -22,7 +22,7 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// GatewayTLSConfigApplyConfiguration represents an declarative configuration of the GatewayTLSConfig type for use
+// GatewayTLSConfigApplyConfiguration represents a declarative configuration of the GatewayTLSConfig type for use
// with apply.
type GatewayTLSConfigApplyConfiguration struct {
Mode *v1.TLSModeType `json:"mode,omitempty"`
@@ -31,7 +31,7 @@ type GatewayTLSConfigApplyConfiguration struct {
Options map[v1.AnnotationKey]v1.AnnotationValue `json:"options,omitempty"`
}
-// GatewayTLSConfigApplyConfiguration constructs an declarative configuration of the GatewayTLSConfig type for use with
+// GatewayTLSConfigApplyConfiguration constructs a declarative configuration of the GatewayTLSConfig type for use with
// apply.
func GatewayTLSConfig() *GatewayTLSConfigApplyConfiguration {
return &GatewayTLSConfigApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/grpcbackendref.go b/apis/applyconfiguration/apis/v1/grpcbackendref.go
index d3d457bb65..ed8bd4edec 100644
--- a/apis/applyconfiguration/apis/v1/grpcbackendref.go
+++ b/apis/applyconfiguration/apis/v1/grpcbackendref.go
@@ -22,14 +22,14 @@ import (
apisv1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// GRPCBackendRefApplyConfiguration represents an declarative configuration of the GRPCBackendRef type for use
+// GRPCBackendRefApplyConfiguration represents a declarative configuration of the GRPCBackendRef type for use
// with apply.
type GRPCBackendRefApplyConfiguration struct {
BackendRefApplyConfiguration `json:",inline"`
Filters []GRPCRouteFilterApplyConfiguration `json:"filters,omitempty"`
}
-// GRPCBackendRefApplyConfiguration constructs an declarative configuration of the GRPCBackendRef type for use with
+// GRPCBackendRefApplyConfiguration constructs a declarative configuration of the GRPCBackendRef type for use with
// apply.
func GRPCBackendRef() *GRPCBackendRefApplyConfiguration {
return &GRPCBackendRefApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/grpcheadermatch.go b/apis/applyconfiguration/apis/v1/grpcheadermatch.go
index 59789809c2..868f404874 100644
--- a/apis/applyconfiguration/apis/v1/grpcheadermatch.go
+++ b/apis/applyconfiguration/apis/v1/grpcheadermatch.go
@@ -22,7 +22,7 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// GRPCHeaderMatchApplyConfiguration represents an declarative configuration of the GRPCHeaderMatch type for use
+// GRPCHeaderMatchApplyConfiguration represents a declarative configuration of the GRPCHeaderMatch type for use
// with apply.
type GRPCHeaderMatchApplyConfiguration struct {
Type *v1.GRPCHeaderMatchType `json:"type,omitempty"`
@@ -30,7 +30,7 @@ type GRPCHeaderMatchApplyConfiguration struct {
Value *string `json:"value,omitempty"`
}
-// GRPCHeaderMatchApplyConfiguration constructs an declarative configuration of the GRPCHeaderMatch type for use with
+// GRPCHeaderMatchApplyConfiguration constructs a declarative configuration of the GRPCHeaderMatch type for use with
// apply.
func GRPCHeaderMatch() *GRPCHeaderMatchApplyConfiguration {
return &GRPCHeaderMatchApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/grpcmethodmatch.go b/apis/applyconfiguration/apis/v1/grpcmethodmatch.go
index 7eefe9beb2..26e0804506 100644
--- a/apis/applyconfiguration/apis/v1/grpcmethodmatch.go
+++ b/apis/applyconfiguration/apis/v1/grpcmethodmatch.go
@@ -22,7 +22,7 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// GRPCMethodMatchApplyConfiguration represents an declarative configuration of the GRPCMethodMatch type for use
+// GRPCMethodMatchApplyConfiguration represents a declarative configuration of the GRPCMethodMatch type for use
// with apply.
type GRPCMethodMatchApplyConfiguration struct {
Type *v1.GRPCMethodMatchType `json:"type,omitempty"`
@@ -30,7 +30,7 @@ type GRPCMethodMatchApplyConfiguration struct {
Method *string `json:"method,omitempty"`
}
-// GRPCMethodMatchApplyConfiguration constructs an declarative configuration of the GRPCMethodMatch type for use with
+// GRPCMethodMatchApplyConfiguration constructs a declarative configuration of the GRPCMethodMatch type for use with
// apply.
func GRPCMethodMatch() *GRPCMethodMatchApplyConfiguration {
return &GRPCMethodMatchApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/grpcroute.go b/apis/applyconfiguration/apis/v1/grpcroute.go
index f44879a857..3c3b376dbf 100644
--- a/apis/applyconfiguration/apis/v1/grpcroute.go
+++ b/apis/applyconfiguration/apis/v1/grpcroute.go
@@ -23,12 +23,11 @@ import (
types "k8s.io/apimachinery/pkg/types"
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
-
internal "sigs.k8s.io/gateway-api/apis/applyconfiguration/internal"
gatewayapiapisv1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// GRPCRouteApplyConfiguration represents an declarative configuration of the GRPCRoute type for use
+// GRPCRouteApplyConfiguration represents a declarative configuration of the GRPCRoute type for use
// with apply.
type GRPCRouteApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
@@ -37,7 +36,7 @@ type GRPCRouteApplyConfiguration struct {
Status *GRPCRouteStatusApplyConfiguration `json:"status,omitempty"`
}
-// GRPCRoute constructs an declarative configuration of the GRPCRoute type for use with
+// GRPCRoute constructs a declarative configuration of the GRPCRoute type for use with
// apply.
func GRPCRoute(name, namespace string) *GRPCRouteApplyConfiguration {
b := &GRPCRouteApplyConfiguration{}
@@ -257,3 +256,9 @@ func (b *GRPCRouteApplyConfiguration) WithStatus(value *GRPCRouteStatusApplyConf
b.Status = value
return b
}
+
+// GetName retrieves the value of the Name field in the declarative configuration.
+func (b *GRPCRouteApplyConfiguration) GetName() *string {
+ b.ensureObjectMetaApplyConfigurationExists()
+ return b.Name
+}
diff --git a/apis/applyconfiguration/apis/v1/grpcroutefilter.go b/apis/applyconfiguration/apis/v1/grpcroutefilter.go
index f7292af6d3..80f94c947e 100644
--- a/apis/applyconfiguration/apis/v1/grpcroutefilter.go
+++ b/apis/applyconfiguration/apis/v1/grpcroutefilter.go
@@ -22,7 +22,7 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// GRPCRouteFilterApplyConfiguration represents an declarative configuration of the GRPCRouteFilter type for use
+// GRPCRouteFilterApplyConfiguration represents a declarative configuration of the GRPCRouteFilter type for use
// with apply.
type GRPCRouteFilterApplyConfiguration struct {
Type *v1.GRPCRouteFilterType `json:"type,omitempty"`
@@ -32,7 +32,7 @@ type GRPCRouteFilterApplyConfiguration struct {
ExtensionRef *LocalObjectReferenceApplyConfiguration `json:"extensionRef,omitempty"`
}
-// GRPCRouteFilterApplyConfiguration constructs an declarative configuration of the GRPCRouteFilter type for use with
+// GRPCRouteFilterApplyConfiguration constructs a declarative configuration of the GRPCRouteFilter type for use with
// apply.
func GRPCRouteFilter() *GRPCRouteFilterApplyConfiguration {
return &GRPCRouteFilterApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/grpcroutematch.go b/apis/applyconfiguration/apis/v1/grpcroutematch.go
index cddaef383b..1c068fd5c7 100644
--- a/apis/applyconfiguration/apis/v1/grpcroutematch.go
+++ b/apis/applyconfiguration/apis/v1/grpcroutematch.go
@@ -18,14 +18,14 @@ limitations under the License.
package v1
-// GRPCRouteMatchApplyConfiguration represents an declarative configuration of the GRPCRouteMatch type for use
+// GRPCRouteMatchApplyConfiguration represents a declarative configuration of the GRPCRouteMatch type for use
// with apply.
type GRPCRouteMatchApplyConfiguration struct {
Method *GRPCMethodMatchApplyConfiguration `json:"method,omitempty"`
Headers []GRPCHeaderMatchApplyConfiguration `json:"headers,omitempty"`
}
-// GRPCRouteMatchApplyConfiguration constructs an declarative configuration of the GRPCRouteMatch type for use with
+// GRPCRouteMatchApplyConfiguration constructs a declarative configuration of the GRPCRouteMatch type for use with
// apply.
func GRPCRouteMatch() *GRPCRouteMatchApplyConfiguration {
return &GRPCRouteMatchApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/grpcrouterule.go b/apis/applyconfiguration/apis/v1/grpcrouterule.go
index 6281e3aaaf..447a9ccc2e 100644
--- a/apis/applyconfiguration/apis/v1/grpcrouterule.go
+++ b/apis/applyconfiguration/apis/v1/grpcrouterule.go
@@ -22,7 +22,7 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// GRPCRouteRuleApplyConfiguration represents an declarative configuration of the GRPCRouteRule type for use
+// GRPCRouteRuleApplyConfiguration represents a declarative configuration of the GRPCRouteRule type for use
// with apply.
type GRPCRouteRuleApplyConfiguration struct {
Name *v1.SectionName `json:"name,omitempty"`
@@ -32,7 +32,7 @@ type GRPCRouteRuleApplyConfiguration struct {
SessionPersistence *SessionPersistenceApplyConfiguration `json:"sessionPersistence,omitempty"`
}
-// GRPCRouteRuleApplyConfiguration constructs an declarative configuration of the GRPCRouteRule type for use with
+// GRPCRouteRuleApplyConfiguration constructs a declarative configuration of the GRPCRouteRule type for use with
// apply.
func GRPCRouteRule() *GRPCRouteRuleApplyConfiguration {
return &GRPCRouteRuleApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/grpcroutespec.go b/apis/applyconfiguration/apis/v1/grpcroutespec.go
index 666f502d1f..70c1e63741 100644
--- a/apis/applyconfiguration/apis/v1/grpcroutespec.go
+++ b/apis/applyconfiguration/apis/v1/grpcroutespec.go
@@ -22,7 +22,7 @@ import (
apisv1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// GRPCRouteSpecApplyConfiguration represents an declarative configuration of the GRPCRouteSpec type for use
+// GRPCRouteSpecApplyConfiguration represents a declarative configuration of the GRPCRouteSpec type for use
// with apply.
type GRPCRouteSpecApplyConfiguration struct {
CommonRouteSpecApplyConfiguration `json:",inline"`
@@ -30,7 +30,7 @@ type GRPCRouteSpecApplyConfiguration struct {
Rules []GRPCRouteRuleApplyConfiguration `json:"rules,omitempty"`
}
-// GRPCRouteSpecApplyConfiguration constructs an declarative configuration of the GRPCRouteSpec type for use with
+// GRPCRouteSpecApplyConfiguration constructs a declarative configuration of the GRPCRouteSpec type for use with
// apply.
func GRPCRouteSpec() *GRPCRouteSpecApplyConfiguration {
return &GRPCRouteSpecApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/grpcroutestatus.go b/apis/applyconfiguration/apis/v1/grpcroutestatus.go
index 3a5473b8b0..3ed9c24801 100644
--- a/apis/applyconfiguration/apis/v1/grpcroutestatus.go
+++ b/apis/applyconfiguration/apis/v1/grpcroutestatus.go
@@ -18,13 +18,13 @@ limitations under the License.
package v1
-// GRPCRouteStatusApplyConfiguration represents an declarative configuration of the GRPCRouteStatus type for use
+// GRPCRouteStatusApplyConfiguration represents a declarative configuration of the GRPCRouteStatus type for use
// with apply.
type GRPCRouteStatusApplyConfiguration struct {
RouteStatusApplyConfiguration `json:",inline"`
}
-// GRPCRouteStatusApplyConfiguration constructs an declarative configuration of the GRPCRouteStatus type for use with
+// GRPCRouteStatusApplyConfiguration constructs a declarative configuration of the GRPCRouteStatus type for use with
// apply.
func GRPCRouteStatus() *GRPCRouteStatusApplyConfiguration {
return &GRPCRouteStatusApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/httpbackendref.go b/apis/applyconfiguration/apis/v1/httpbackendref.go
index 4041d9bc66..3110537f60 100644
--- a/apis/applyconfiguration/apis/v1/httpbackendref.go
+++ b/apis/applyconfiguration/apis/v1/httpbackendref.go
@@ -22,14 +22,14 @@ import (
apisv1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// HTTPBackendRefApplyConfiguration represents an declarative configuration of the HTTPBackendRef type for use
+// HTTPBackendRefApplyConfiguration represents a declarative configuration of the HTTPBackendRef type for use
// with apply.
type HTTPBackendRefApplyConfiguration struct {
BackendRefApplyConfiguration `json:",inline"`
Filters []HTTPRouteFilterApplyConfiguration `json:"filters,omitempty"`
}
-// HTTPBackendRefApplyConfiguration constructs an declarative configuration of the HTTPBackendRef type for use with
+// HTTPBackendRefApplyConfiguration constructs a declarative configuration of the HTTPBackendRef type for use with
// apply.
func HTTPBackendRef() *HTTPBackendRefApplyConfiguration {
return &HTTPBackendRefApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/httpheader.go b/apis/applyconfiguration/apis/v1/httpheader.go
index a1c9cc915e..9a4bfc8b32 100644
--- a/apis/applyconfiguration/apis/v1/httpheader.go
+++ b/apis/applyconfiguration/apis/v1/httpheader.go
@@ -22,14 +22,14 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// HTTPHeaderApplyConfiguration represents an declarative configuration of the HTTPHeader type for use
+// HTTPHeaderApplyConfiguration represents a declarative configuration of the HTTPHeader type for use
// with apply.
type HTTPHeaderApplyConfiguration struct {
Name *v1.HTTPHeaderName `json:"name,omitempty"`
Value *string `json:"value,omitempty"`
}
-// HTTPHeaderApplyConfiguration constructs an declarative configuration of the HTTPHeader type for use with
+// HTTPHeaderApplyConfiguration constructs a declarative configuration of the HTTPHeader type for use with
// apply.
func HTTPHeader() *HTTPHeaderApplyConfiguration {
return &HTTPHeaderApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/httpheaderfilter.go b/apis/applyconfiguration/apis/v1/httpheaderfilter.go
index f6cc5f24c3..45db46ccca 100644
--- a/apis/applyconfiguration/apis/v1/httpheaderfilter.go
+++ b/apis/applyconfiguration/apis/v1/httpheaderfilter.go
@@ -18,7 +18,7 @@ limitations under the License.
package v1
-// HTTPHeaderFilterApplyConfiguration represents an declarative configuration of the HTTPHeaderFilter type for use
+// HTTPHeaderFilterApplyConfiguration represents a declarative configuration of the HTTPHeaderFilter type for use
// with apply.
type HTTPHeaderFilterApplyConfiguration struct {
Set []HTTPHeaderApplyConfiguration `json:"set,omitempty"`
@@ -26,7 +26,7 @@ type HTTPHeaderFilterApplyConfiguration struct {
Remove []string `json:"remove,omitempty"`
}
-// HTTPHeaderFilterApplyConfiguration constructs an declarative configuration of the HTTPHeaderFilter type for use with
+// HTTPHeaderFilterApplyConfiguration constructs a declarative configuration of the HTTPHeaderFilter type for use with
// apply.
func HTTPHeaderFilter() *HTTPHeaderFilterApplyConfiguration {
return &HTTPHeaderFilterApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/httpheadermatch.go b/apis/applyconfiguration/apis/v1/httpheadermatch.go
index 96abbb4f19..e2ce954a23 100644
--- a/apis/applyconfiguration/apis/v1/httpheadermatch.go
+++ b/apis/applyconfiguration/apis/v1/httpheadermatch.go
@@ -22,7 +22,7 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// HTTPHeaderMatchApplyConfiguration represents an declarative configuration of the HTTPHeaderMatch type for use
+// HTTPHeaderMatchApplyConfiguration represents a declarative configuration of the HTTPHeaderMatch type for use
// with apply.
type HTTPHeaderMatchApplyConfiguration struct {
Type *v1.HeaderMatchType `json:"type,omitempty"`
@@ -30,7 +30,7 @@ type HTTPHeaderMatchApplyConfiguration struct {
Value *string `json:"value,omitempty"`
}
-// HTTPHeaderMatchApplyConfiguration constructs an declarative configuration of the HTTPHeaderMatch type for use with
+// HTTPHeaderMatchApplyConfiguration constructs a declarative configuration of the HTTPHeaderMatch type for use with
// apply.
func HTTPHeaderMatch() *HTTPHeaderMatchApplyConfiguration {
return &HTTPHeaderMatchApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/httppathmatch.go b/apis/applyconfiguration/apis/v1/httppathmatch.go
index 985121b31b..ca21e6dfcc 100644
--- a/apis/applyconfiguration/apis/v1/httppathmatch.go
+++ b/apis/applyconfiguration/apis/v1/httppathmatch.go
@@ -22,14 +22,14 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// HTTPPathMatchApplyConfiguration represents an declarative configuration of the HTTPPathMatch type for use
+// HTTPPathMatchApplyConfiguration represents a declarative configuration of the HTTPPathMatch type for use
// with apply.
type HTTPPathMatchApplyConfiguration struct {
Type *v1.PathMatchType `json:"type,omitempty"`
Value *string `json:"value,omitempty"`
}
-// HTTPPathMatchApplyConfiguration constructs an declarative configuration of the HTTPPathMatch type for use with
+// HTTPPathMatchApplyConfiguration constructs a declarative configuration of the HTTPPathMatch type for use with
// apply.
func HTTPPathMatch() *HTTPPathMatchApplyConfiguration {
return &HTTPPathMatchApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/httppathmodifier.go b/apis/applyconfiguration/apis/v1/httppathmodifier.go
index e675cadb0e..888f3c7f1f 100644
--- a/apis/applyconfiguration/apis/v1/httppathmodifier.go
+++ b/apis/applyconfiguration/apis/v1/httppathmodifier.go
@@ -22,7 +22,7 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// HTTPPathModifierApplyConfiguration represents an declarative configuration of the HTTPPathModifier type for use
+// HTTPPathModifierApplyConfiguration represents a declarative configuration of the HTTPPathModifier type for use
// with apply.
type HTTPPathModifierApplyConfiguration struct {
Type *v1.HTTPPathModifierType `json:"type,omitempty"`
@@ -30,7 +30,7 @@ type HTTPPathModifierApplyConfiguration struct {
ReplacePrefixMatch *string `json:"replacePrefixMatch,omitempty"`
}
-// HTTPPathModifierApplyConfiguration constructs an declarative configuration of the HTTPPathModifier type for use with
+// HTTPPathModifierApplyConfiguration constructs a declarative configuration of the HTTPPathModifier type for use with
// apply.
func HTTPPathModifier() *HTTPPathModifierApplyConfiguration {
return &HTTPPathModifierApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/httpqueryparammatch.go b/apis/applyconfiguration/apis/v1/httpqueryparammatch.go
index 3bc97e21b9..ccbdfe941f 100644
--- a/apis/applyconfiguration/apis/v1/httpqueryparammatch.go
+++ b/apis/applyconfiguration/apis/v1/httpqueryparammatch.go
@@ -22,7 +22,7 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// HTTPQueryParamMatchApplyConfiguration represents an declarative configuration of the HTTPQueryParamMatch type for use
+// HTTPQueryParamMatchApplyConfiguration represents a declarative configuration of the HTTPQueryParamMatch type for use
// with apply.
type HTTPQueryParamMatchApplyConfiguration struct {
Type *v1.QueryParamMatchType `json:"type,omitempty"`
@@ -30,7 +30,7 @@ type HTTPQueryParamMatchApplyConfiguration struct {
Value *string `json:"value,omitempty"`
}
-// HTTPQueryParamMatchApplyConfiguration constructs an declarative configuration of the HTTPQueryParamMatch type for use with
+// HTTPQueryParamMatchApplyConfiguration constructs a declarative configuration of the HTTPQueryParamMatch type for use with
// apply.
func HTTPQueryParamMatch() *HTTPQueryParamMatchApplyConfiguration {
return &HTTPQueryParamMatchApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/httprequestmirrorfilter.go b/apis/applyconfiguration/apis/v1/httprequestmirrorfilter.go
index 55c2246b34..1885cccda0 100644
--- a/apis/applyconfiguration/apis/v1/httprequestmirrorfilter.go
+++ b/apis/applyconfiguration/apis/v1/httprequestmirrorfilter.go
@@ -18,7 +18,7 @@ limitations under the License.
package v1
-// HTTPRequestMirrorFilterApplyConfiguration represents an declarative configuration of the HTTPRequestMirrorFilter type for use
+// HTTPRequestMirrorFilterApplyConfiguration represents a declarative configuration of the HTTPRequestMirrorFilter type for use
// with apply.
type HTTPRequestMirrorFilterApplyConfiguration struct {
BackendRef *BackendObjectReferenceApplyConfiguration `json:"backendRef,omitempty"`
@@ -26,7 +26,7 @@ type HTTPRequestMirrorFilterApplyConfiguration struct {
Fraction *FractionApplyConfiguration `json:"fraction,omitempty"`
}
-// HTTPRequestMirrorFilterApplyConfiguration constructs an declarative configuration of the HTTPRequestMirrorFilter type for use with
+// HTTPRequestMirrorFilterApplyConfiguration constructs a declarative configuration of the HTTPRequestMirrorFilter type for use with
// apply.
func HTTPRequestMirrorFilter() *HTTPRequestMirrorFilterApplyConfiguration {
return &HTTPRequestMirrorFilterApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/httprequestredirectfilter.go b/apis/applyconfiguration/apis/v1/httprequestredirectfilter.go
index c4a08c60ce..3a0c860070 100644
--- a/apis/applyconfiguration/apis/v1/httprequestredirectfilter.go
+++ b/apis/applyconfiguration/apis/v1/httprequestredirectfilter.go
@@ -22,7 +22,7 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// HTTPRequestRedirectFilterApplyConfiguration represents an declarative configuration of the HTTPRequestRedirectFilter type for use
+// HTTPRequestRedirectFilterApplyConfiguration represents a declarative configuration of the HTTPRequestRedirectFilter type for use
// with apply.
type HTTPRequestRedirectFilterApplyConfiguration struct {
Scheme *string `json:"scheme,omitempty"`
@@ -32,7 +32,7 @@ type HTTPRequestRedirectFilterApplyConfiguration struct {
StatusCode *int `json:"statusCode,omitempty"`
}
-// HTTPRequestRedirectFilterApplyConfiguration constructs an declarative configuration of the HTTPRequestRedirectFilter type for use with
+// HTTPRequestRedirectFilterApplyConfiguration constructs a declarative configuration of the HTTPRequestRedirectFilter type for use with
// apply.
func HTTPRequestRedirectFilter() *HTTPRequestRedirectFilterApplyConfiguration {
return &HTTPRequestRedirectFilterApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/httproute.go b/apis/applyconfiguration/apis/v1/httproute.go
index 26d94544a4..0fabf88cda 100644
--- a/apis/applyconfiguration/apis/v1/httproute.go
+++ b/apis/applyconfiguration/apis/v1/httproute.go
@@ -23,12 +23,11 @@ import (
types "k8s.io/apimachinery/pkg/types"
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
-
internal "sigs.k8s.io/gateway-api/apis/applyconfiguration/internal"
gatewayapiapisv1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// HTTPRouteApplyConfiguration represents an declarative configuration of the HTTPRoute type for use
+// HTTPRouteApplyConfiguration represents a declarative configuration of the HTTPRoute type for use
// with apply.
type HTTPRouteApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
@@ -37,7 +36,7 @@ type HTTPRouteApplyConfiguration struct {
Status *HTTPRouteStatusApplyConfiguration `json:"status,omitempty"`
}
-// HTTPRoute constructs an declarative configuration of the HTTPRoute type for use with
+// HTTPRoute constructs a declarative configuration of the HTTPRoute type for use with
// apply.
func HTTPRoute(name, namespace string) *HTTPRouteApplyConfiguration {
b := &HTTPRouteApplyConfiguration{}
@@ -257,3 +256,9 @@ func (b *HTTPRouteApplyConfiguration) WithStatus(value *HTTPRouteStatusApplyConf
b.Status = value
return b
}
+
+// GetName retrieves the value of the Name field in the declarative configuration.
+func (b *HTTPRouteApplyConfiguration) GetName() *string {
+ b.ensureObjectMetaApplyConfigurationExists()
+ return b.Name
+}
diff --git a/apis/applyconfiguration/apis/v1/httproutefilter.go b/apis/applyconfiguration/apis/v1/httproutefilter.go
index 9943ebd43b..a1c9b2e604 100644
--- a/apis/applyconfiguration/apis/v1/httproutefilter.go
+++ b/apis/applyconfiguration/apis/v1/httproutefilter.go
@@ -22,7 +22,7 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// HTTPRouteFilterApplyConfiguration represents an declarative configuration of the HTTPRouteFilter type for use
+// HTTPRouteFilterApplyConfiguration represents a declarative configuration of the HTTPRouteFilter type for use
// with apply.
type HTTPRouteFilterApplyConfiguration struct {
Type *v1.HTTPRouteFilterType `json:"type,omitempty"`
@@ -34,7 +34,7 @@ type HTTPRouteFilterApplyConfiguration struct {
ExtensionRef *LocalObjectReferenceApplyConfiguration `json:"extensionRef,omitempty"`
}
-// HTTPRouteFilterApplyConfiguration constructs an declarative configuration of the HTTPRouteFilter type for use with
+// HTTPRouteFilterApplyConfiguration constructs a declarative configuration of the HTTPRouteFilter type for use with
// apply.
func HTTPRouteFilter() *HTTPRouteFilterApplyConfiguration {
return &HTTPRouteFilterApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/httproutematch.go b/apis/applyconfiguration/apis/v1/httproutematch.go
index cfc1e0fbe0..c1d34d121a 100644
--- a/apis/applyconfiguration/apis/v1/httproutematch.go
+++ b/apis/applyconfiguration/apis/v1/httproutematch.go
@@ -22,7 +22,7 @@ import (
apisv1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// HTTPRouteMatchApplyConfiguration represents an declarative configuration of the HTTPRouteMatch type for use
+// HTTPRouteMatchApplyConfiguration represents a declarative configuration of the HTTPRouteMatch type for use
// with apply.
type HTTPRouteMatchApplyConfiguration struct {
Path *HTTPPathMatchApplyConfiguration `json:"path,omitempty"`
@@ -31,7 +31,7 @@ type HTTPRouteMatchApplyConfiguration struct {
Method *apisv1.HTTPMethod `json:"method,omitempty"`
}
-// HTTPRouteMatchApplyConfiguration constructs an declarative configuration of the HTTPRouteMatch type for use with
+// HTTPRouteMatchApplyConfiguration constructs a declarative configuration of the HTTPRouteMatch type for use with
// apply.
func HTTPRouteMatch() *HTTPRouteMatchApplyConfiguration {
return &HTTPRouteMatchApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/httprouteretry.go b/apis/applyconfiguration/apis/v1/httprouteretry.go
index dc55873c61..7528bccee8 100644
--- a/apis/applyconfiguration/apis/v1/httprouteretry.go
+++ b/apis/applyconfiguration/apis/v1/httprouteretry.go
@@ -22,7 +22,7 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// HTTPRouteRetryApplyConfiguration represents an declarative configuration of the HTTPRouteRetry type for use
+// HTTPRouteRetryApplyConfiguration represents a declarative configuration of the HTTPRouteRetry type for use
// with apply.
type HTTPRouteRetryApplyConfiguration struct {
Codes []v1.HTTPRouteRetryStatusCode `json:"codes,omitempty"`
@@ -30,7 +30,7 @@ type HTTPRouteRetryApplyConfiguration struct {
Backoff *v1.Duration `json:"backoff,omitempty"`
}
-// HTTPRouteRetryApplyConfiguration constructs an declarative configuration of the HTTPRouteRetry type for use with
+// HTTPRouteRetryApplyConfiguration constructs a declarative configuration of the HTTPRouteRetry type for use with
// apply.
func HTTPRouteRetry() *HTTPRouteRetryApplyConfiguration {
return &HTTPRouteRetryApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/httprouterule.go b/apis/applyconfiguration/apis/v1/httprouterule.go
index 16158ec35e..b7ac89a7a8 100644
--- a/apis/applyconfiguration/apis/v1/httprouterule.go
+++ b/apis/applyconfiguration/apis/v1/httprouterule.go
@@ -22,7 +22,7 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// HTTPRouteRuleApplyConfiguration represents an declarative configuration of the HTTPRouteRule type for use
+// HTTPRouteRuleApplyConfiguration represents a declarative configuration of the HTTPRouteRule type for use
// with apply.
type HTTPRouteRuleApplyConfiguration struct {
Name *v1.SectionName `json:"name,omitempty"`
@@ -34,7 +34,7 @@ type HTTPRouteRuleApplyConfiguration struct {
SessionPersistence *SessionPersistenceApplyConfiguration `json:"sessionPersistence,omitempty"`
}
-// HTTPRouteRuleApplyConfiguration constructs an declarative configuration of the HTTPRouteRule type for use with
+// HTTPRouteRuleApplyConfiguration constructs a declarative configuration of the HTTPRouteRule type for use with
// apply.
func HTTPRouteRule() *HTTPRouteRuleApplyConfiguration {
return &HTTPRouteRuleApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/httproutespec.go b/apis/applyconfiguration/apis/v1/httproutespec.go
index 21c9dfd86d..e12516149a 100644
--- a/apis/applyconfiguration/apis/v1/httproutespec.go
+++ b/apis/applyconfiguration/apis/v1/httproutespec.go
@@ -22,7 +22,7 @@ import (
apisv1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// HTTPRouteSpecApplyConfiguration represents an declarative configuration of the HTTPRouteSpec type for use
+// HTTPRouteSpecApplyConfiguration represents a declarative configuration of the HTTPRouteSpec type for use
// with apply.
type HTTPRouteSpecApplyConfiguration struct {
CommonRouteSpecApplyConfiguration `json:",inline"`
@@ -30,7 +30,7 @@ type HTTPRouteSpecApplyConfiguration struct {
Rules []HTTPRouteRuleApplyConfiguration `json:"rules,omitempty"`
}
-// HTTPRouteSpecApplyConfiguration constructs an declarative configuration of the HTTPRouteSpec type for use with
+// HTTPRouteSpecApplyConfiguration constructs a declarative configuration of the HTTPRouteSpec type for use with
// apply.
func HTTPRouteSpec() *HTTPRouteSpecApplyConfiguration {
return &HTTPRouteSpecApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/httproutestatus.go b/apis/applyconfiguration/apis/v1/httproutestatus.go
index 5d87f89ec5..d7fce10d1e 100644
--- a/apis/applyconfiguration/apis/v1/httproutestatus.go
+++ b/apis/applyconfiguration/apis/v1/httproutestatus.go
@@ -18,13 +18,13 @@ limitations under the License.
package v1
-// HTTPRouteStatusApplyConfiguration represents an declarative configuration of the HTTPRouteStatus type for use
+// HTTPRouteStatusApplyConfiguration represents a declarative configuration of the HTTPRouteStatus type for use
// with apply.
type HTTPRouteStatusApplyConfiguration struct {
RouteStatusApplyConfiguration `json:",inline"`
}
-// HTTPRouteStatusApplyConfiguration constructs an declarative configuration of the HTTPRouteStatus type for use with
+// HTTPRouteStatusApplyConfiguration constructs a declarative configuration of the HTTPRouteStatus type for use with
// apply.
func HTTPRouteStatus() *HTTPRouteStatusApplyConfiguration {
return &HTTPRouteStatusApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/httproutetimeouts.go b/apis/applyconfiguration/apis/v1/httproutetimeouts.go
index 4594ff17d3..98a1a9909a 100644
--- a/apis/applyconfiguration/apis/v1/httproutetimeouts.go
+++ b/apis/applyconfiguration/apis/v1/httproutetimeouts.go
@@ -22,14 +22,14 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// HTTPRouteTimeoutsApplyConfiguration represents an declarative configuration of the HTTPRouteTimeouts type for use
+// HTTPRouteTimeoutsApplyConfiguration represents a declarative configuration of the HTTPRouteTimeouts type for use
// with apply.
type HTTPRouteTimeoutsApplyConfiguration struct {
Request *v1.Duration `json:"request,omitempty"`
BackendRequest *v1.Duration `json:"backendRequest,omitempty"`
}
-// HTTPRouteTimeoutsApplyConfiguration constructs an declarative configuration of the HTTPRouteTimeouts type for use with
+// HTTPRouteTimeoutsApplyConfiguration constructs a declarative configuration of the HTTPRouteTimeouts type for use with
// apply.
func HTTPRouteTimeouts() *HTTPRouteTimeoutsApplyConfiguration {
return &HTTPRouteTimeoutsApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/httpurlrewritefilter.go b/apis/applyconfiguration/apis/v1/httpurlrewritefilter.go
index cf8e0130cb..9761c24c28 100644
--- a/apis/applyconfiguration/apis/v1/httpurlrewritefilter.go
+++ b/apis/applyconfiguration/apis/v1/httpurlrewritefilter.go
@@ -22,14 +22,14 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// HTTPURLRewriteFilterApplyConfiguration represents an declarative configuration of the HTTPURLRewriteFilter type for use
+// HTTPURLRewriteFilterApplyConfiguration represents a declarative configuration of the HTTPURLRewriteFilter type for use
// with apply.
type HTTPURLRewriteFilterApplyConfiguration struct {
Hostname *v1.PreciseHostname `json:"hostname,omitempty"`
Path *HTTPPathModifierApplyConfiguration `json:"path,omitempty"`
}
-// HTTPURLRewriteFilterApplyConfiguration constructs an declarative configuration of the HTTPURLRewriteFilter type for use with
+// HTTPURLRewriteFilterApplyConfiguration constructs a declarative configuration of the HTTPURLRewriteFilter type for use with
// apply.
func HTTPURLRewriteFilter() *HTTPURLRewriteFilterApplyConfiguration {
return &HTTPURLRewriteFilterApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/listener.go b/apis/applyconfiguration/apis/v1/listener.go
index b65c09030c..5301fa46de 100644
--- a/apis/applyconfiguration/apis/v1/listener.go
+++ b/apis/applyconfiguration/apis/v1/listener.go
@@ -22,7 +22,7 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// ListenerApplyConfiguration represents an declarative configuration of the Listener type for use
+// ListenerApplyConfiguration represents a declarative configuration of the Listener type for use
// with apply.
type ListenerApplyConfiguration struct {
Name *v1.SectionName `json:"name,omitempty"`
@@ -33,7 +33,7 @@ type ListenerApplyConfiguration struct {
AllowedRoutes *AllowedRoutesApplyConfiguration `json:"allowedRoutes,omitempty"`
}
-// ListenerApplyConfiguration constructs an declarative configuration of the Listener type for use with
+// ListenerApplyConfiguration constructs a declarative configuration of the Listener type for use with
// apply.
func Listener() *ListenerApplyConfiguration {
return &ListenerApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/listenerstatus.go b/apis/applyconfiguration/apis/v1/listenerstatus.go
index 4e4054ec9f..88a877c6dc 100644
--- a/apis/applyconfiguration/apis/v1/listenerstatus.go
+++ b/apis/applyconfiguration/apis/v1/listenerstatus.go
@@ -20,11 +20,10 @@ package v1
import (
metav1 "k8s.io/client-go/applyconfigurations/meta/v1"
-
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// ListenerStatusApplyConfiguration represents an declarative configuration of the ListenerStatus type for use
+// ListenerStatusApplyConfiguration represents a declarative configuration of the ListenerStatus type for use
// with apply.
type ListenerStatusApplyConfiguration struct {
Name *v1.SectionName `json:"name,omitempty"`
@@ -33,7 +32,7 @@ type ListenerStatusApplyConfiguration struct {
Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"`
}
-// ListenerStatusApplyConfiguration constructs an declarative configuration of the ListenerStatus type for use with
+// ListenerStatusApplyConfiguration constructs a declarative configuration of the ListenerStatus type for use with
// apply.
func ListenerStatus() *ListenerStatusApplyConfiguration {
return &ListenerStatusApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/localobjectreference.go b/apis/applyconfiguration/apis/v1/localobjectreference.go
index 1bb4b9a816..7d7c7a121b 100644
--- a/apis/applyconfiguration/apis/v1/localobjectreference.go
+++ b/apis/applyconfiguration/apis/v1/localobjectreference.go
@@ -22,7 +22,7 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// LocalObjectReferenceApplyConfiguration represents an declarative configuration of the LocalObjectReference type for use
+// LocalObjectReferenceApplyConfiguration represents a declarative configuration of the LocalObjectReference type for use
// with apply.
type LocalObjectReferenceApplyConfiguration struct {
Group *v1.Group `json:"group,omitempty"`
@@ -30,7 +30,7 @@ type LocalObjectReferenceApplyConfiguration struct {
Name *v1.ObjectName `json:"name,omitempty"`
}
-// LocalObjectReferenceApplyConfiguration constructs an declarative configuration of the LocalObjectReference type for use with
+// LocalObjectReferenceApplyConfiguration constructs a declarative configuration of the LocalObjectReference type for use with
// apply.
func LocalObjectReference() *LocalObjectReferenceApplyConfiguration {
return &LocalObjectReferenceApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/localparametersreference.go b/apis/applyconfiguration/apis/v1/localparametersreference.go
index d15c55b776..cde618b044 100644
--- a/apis/applyconfiguration/apis/v1/localparametersreference.go
+++ b/apis/applyconfiguration/apis/v1/localparametersreference.go
@@ -22,7 +22,7 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// LocalParametersReferenceApplyConfiguration represents an declarative configuration of the LocalParametersReference type for use
+// LocalParametersReferenceApplyConfiguration represents a declarative configuration of the LocalParametersReference type for use
// with apply.
type LocalParametersReferenceApplyConfiguration struct {
Group *v1.Group `json:"group,omitempty"`
@@ -30,7 +30,7 @@ type LocalParametersReferenceApplyConfiguration struct {
Name *string `json:"name,omitempty"`
}
-// LocalParametersReferenceApplyConfiguration constructs an declarative configuration of the LocalParametersReference type for use with
+// LocalParametersReferenceApplyConfiguration constructs a declarative configuration of the LocalParametersReference type for use with
// apply.
func LocalParametersReference() *LocalParametersReferenceApplyConfiguration {
return &LocalParametersReferenceApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/objectreference.go b/apis/applyconfiguration/apis/v1/objectreference.go
index 4580fe61a9..b35f2eaf02 100644
--- a/apis/applyconfiguration/apis/v1/objectreference.go
+++ b/apis/applyconfiguration/apis/v1/objectreference.go
@@ -22,7 +22,7 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// ObjectReferenceApplyConfiguration represents an declarative configuration of the ObjectReference type for use
+// ObjectReferenceApplyConfiguration represents a declarative configuration of the ObjectReference type for use
// with apply.
type ObjectReferenceApplyConfiguration struct {
Group *v1.Group `json:"group,omitempty"`
@@ -31,7 +31,7 @@ type ObjectReferenceApplyConfiguration struct {
Namespace *v1.Namespace `json:"namespace,omitempty"`
}
-// ObjectReferenceApplyConfiguration constructs an declarative configuration of the ObjectReference type for use with
+// ObjectReferenceApplyConfiguration constructs a declarative configuration of the ObjectReference type for use with
// apply.
func ObjectReference() *ObjectReferenceApplyConfiguration {
return &ObjectReferenceApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/parametersreference.go b/apis/applyconfiguration/apis/v1/parametersreference.go
index b7a3ae27dc..2f245e5373 100644
--- a/apis/applyconfiguration/apis/v1/parametersreference.go
+++ b/apis/applyconfiguration/apis/v1/parametersreference.go
@@ -22,7 +22,7 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// ParametersReferenceApplyConfiguration represents an declarative configuration of the ParametersReference type for use
+// ParametersReferenceApplyConfiguration represents a declarative configuration of the ParametersReference type for use
// with apply.
type ParametersReferenceApplyConfiguration struct {
Group *v1.Group `json:"group,omitempty"`
@@ -31,7 +31,7 @@ type ParametersReferenceApplyConfiguration struct {
Namespace *v1.Namespace `json:"namespace,omitempty"`
}
-// ParametersReferenceApplyConfiguration constructs an declarative configuration of the ParametersReference type for use with
+// ParametersReferenceApplyConfiguration constructs a declarative configuration of the ParametersReference type for use with
// apply.
func ParametersReference() *ParametersReferenceApplyConfiguration {
return &ParametersReferenceApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/parentreference.go b/apis/applyconfiguration/apis/v1/parentreference.go
index 2c39a83441..612dd2afab 100644
--- a/apis/applyconfiguration/apis/v1/parentreference.go
+++ b/apis/applyconfiguration/apis/v1/parentreference.go
@@ -22,7 +22,7 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// ParentReferenceApplyConfiguration represents an declarative configuration of the ParentReference type for use
+// ParentReferenceApplyConfiguration represents a declarative configuration of the ParentReference type for use
// with apply.
type ParentReferenceApplyConfiguration struct {
Group *v1.Group `json:"group,omitempty"`
@@ -33,7 +33,7 @@ type ParentReferenceApplyConfiguration struct {
Port *v1.PortNumber `json:"port,omitempty"`
}
-// ParentReferenceApplyConfiguration constructs an declarative configuration of the ParentReference type for use with
+// ParentReferenceApplyConfiguration constructs a declarative configuration of the ParentReference type for use with
// apply.
func ParentReference() *ParentReferenceApplyConfiguration {
return &ParentReferenceApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/routegroupkind.go b/apis/applyconfiguration/apis/v1/routegroupkind.go
index 84a9b57a2e..470ae4074f 100644
--- a/apis/applyconfiguration/apis/v1/routegroupkind.go
+++ b/apis/applyconfiguration/apis/v1/routegroupkind.go
@@ -22,14 +22,14 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// RouteGroupKindApplyConfiguration represents an declarative configuration of the RouteGroupKind type for use
+// RouteGroupKindApplyConfiguration represents a declarative configuration of the RouteGroupKind type for use
// with apply.
type RouteGroupKindApplyConfiguration struct {
Group *v1.Group `json:"group,omitempty"`
Kind *v1.Kind `json:"kind,omitempty"`
}
-// RouteGroupKindApplyConfiguration constructs an declarative configuration of the RouteGroupKind type for use with
+// RouteGroupKindApplyConfiguration constructs a declarative configuration of the RouteGroupKind type for use with
// apply.
func RouteGroupKind() *RouteGroupKindApplyConfiguration {
return &RouteGroupKindApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/routenamespaces.go b/apis/applyconfiguration/apis/v1/routenamespaces.go
index 9b60a56130..33a172897c 100644
--- a/apis/applyconfiguration/apis/v1/routenamespaces.go
+++ b/apis/applyconfiguration/apis/v1/routenamespaces.go
@@ -23,14 +23,14 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// RouteNamespacesApplyConfiguration represents an declarative configuration of the RouteNamespaces type for use
+// RouteNamespacesApplyConfiguration represents a declarative configuration of the RouteNamespaces type for use
// with apply.
type RouteNamespacesApplyConfiguration struct {
From *v1.FromNamespaces `json:"from,omitempty"`
Selector *metav1.LabelSelectorApplyConfiguration `json:"selector,omitempty"`
}
-// RouteNamespacesApplyConfiguration constructs an declarative configuration of the RouteNamespaces type for use with
+// RouteNamespacesApplyConfiguration constructs a declarative configuration of the RouteNamespaces type for use with
// apply.
func RouteNamespaces() *RouteNamespacesApplyConfiguration {
return &RouteNamespacesApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/routeparentstatus.go b/apis/applyconfiguration/apis/v1/routeparentstatus.go
index 1237133547..f52901e544 100644
--- a/apis/applyconfiguration/apis/v1/routeparentstatus.go
+++ b/apis/applyconfiguration/apis/v1/routeparentstatus.go
@@ -20,11 +20,10 @@ package v1
import (
metav1 "k8s.io/client-go/applyconfigurations/meta/v1"
-
apisv1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// RouteParentStatusApplyConfiguration represents an declarative configuration of the RouteParentStatus type for use
+// RouteParentStatusApplyConfiguration represents a declarative configuration of the RouteParentStatus type for use
// with apply.
type RouteParentStatusApplyConfiguration struct {
ParentRef *ParentReferenceApplyConfiguration `json:"parentRef,omitempty"`
@@ -32,7 +31,7 @@ type RouteParentStatusApplyConfiguration struct {
Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"`
}
-// RouteParentStatusApplyConfiguration constructs an declarative configuration of the RouteParentStatus type for use with
+// RouteParentStatusApplyConfiguration constructs a declarative configuration of the RouteParentStatus type for use with
// apply.
func RouteParentStatus() *RouteParentStatusApplyConfiguration {
return &RouteParentStatusApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/routestatus.go b/apis/applyconfiguration/apis/v1/routestatus.go
index 5ef84f8028..0502272abb 100644
--- a/apis/applyconfiguration/apis/v1/routestatus.go
+++ b/apis/applyconfiguration/apis/v1/routestatus.go
@@ -18,13 +18,13 @@ limitations under the License.
package v1
-// RouteStatusApplyConfiguration represents an declarative configuration of the RouteStatus type for use
+// RouteStatusApplyConfiguration represents a declarative configuration of the RouteStatus type for use
// with apply.
type RouteStatusApplyConfiguration struct {
Parents []RouteParentStatusApplyConfiguration `json:"parents,omitempty"`
}
-// RouteStatusApplyConfiguration constructs an declarative configuration of the RouteStatus type for use with
+// RouteStatusApplyConfiguration constructs a declarative configuration of the RouteStatus type for use with
// apply.
func RouteStatus() *RouteStatusApplyConfiguration {
return &RouteStatusApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/secretobjectreference.go b/apis/applyconfiguration/apis/v1/secretobjectreference.go
index 771fdb0ab3..654f898232 100644
--- a/apis/applyconfiguration/apis/v1/secretobjectreference.go
+++ b/apis/applyconfiguration/apis/v1/secretobjectreference.go
@@ -22,7 +22,7 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// SecretObjectReferenceApplyConfiguration represents an declarative configuration of the SecretObjectReference type for use
+// SecretObjectReferenceApplyConfiguration represents a declarative configuration of the SecretObjectReference type for use
// with apply.
type SecretObjectReferenceApplyConfiguration struct {
Group *v1.Group `json:"group,omitempty"`
@@ -31,7 +31,7 @@ type SecretObjectReferenceApplyConfiguration struct {
Namespace *v1.Namespace `json:"namespace,omitempty"`
}
-// SecretObjectReferenceApplyConfiguration constructs an declarative configuration of the SecretObjectReference type for use with
+// SecretObjectReferenceApplyConfiguration constructs a declarative configuration of the SecretObjectReference type for use with
// apply.
func SecretObjectReference() *SecretObjectReferenceApplyConfiguration {
return &SecretObjectReferenceApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/sessionpersistence.go b/apis/applyconfiguration/apis/v1/sessionpersistence.go
index 7b9de44e3b..b20b07ce86 100644
--- a/apis/applyconfiguration/apis/v1/sessionpersistence.go
+++ b/apis/applyconfiguration/apis/v1/sessionpersistence.go
@@ -22,7 +22,7 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// SessionPersistenceApplyConfiguration represents an declarative configuration of the SessionPersistence type for use
+// SessionPersistenceApplyConfiguration represents a declarative configuration of the SessionPersistence type for use
// with apply.
type SessionPersistenceApplyConfiguration struct {
SessionName *string `json:"sessionName,omitempty"`
@@ -32,7 +32,7 @@ type SessionPersistenceApplyConfiguration struct {
CookieConfig *CookieConfigApplyConfiguration `json:"cookieConfig,omitempty"`
}
-// SessionPersistenceApplyConfiguration constructs an declarative configuration of the SessionPersistence type for use with
+// SessionPersistenceApplyConfiguration constructs a declarative configuration of the SessionPersistence type for use with
// apply.
func SessionPersistence() *SessionPersistenceApplyConfiguration {
return &SessionPersistenceApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1/supportedfeature.go b/apis/applyconfiguration/apis/v1/supportedfeature.go
index daa8f6b19a..90de05d24d 100644
--- a/apis/applyconfiguration/apis/v1/supportedfeature.go
+++ b/apis/applyconfiguration/apis/v1/supportedfeature.go
@@ -22,13 +22,13 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// SupportedFeatureApplyConfiguration represents an declarative configuration of the SupportedFeature type for use
+// SupportedFeatureApplyConfiguration represents a declarative configuration of the SupportedFeature type for use
// with apply.
type SupportedFeatureApplyConfiguration struct {
Name *v1.FeatureName `json:"name,omitempty"`
}
-// SupportedFeatureApplyConfiguration constructs an declarative configuration of the SupportedFeature type for use with
+// SupportedFeatureApplyConfiguration constructs a declarative configuration of the SupportedFeature type for use with
// apply.
func SupportedFeature() *SupportedFeatureApplyConfiguration {
return &SupportedFeatureApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1alpha2/backendlbpolicy.go b/apis/applyconfiguration/apis/v1alpha2/backendlbpolicy.go
index 835bf3c9d4..e63c8cd653 100644
--- a/apis/applyconfiguration/apis/v1alpha2/backendlbpolicy.go
+++ b/apis/applyconfiguration/apis/v1alpha2/backendlbpolicy.go
@@ -23,12 +23,11 @@ import (
types "k8s.io/apimachinery/pkg/types"
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
-
internal "sigs.k8s.io/gateway-api/apis/applyconfiguration/internal"
apisv1alpha2 "sigs.k8s.io/gateway-api/apis/v1alpha2"
)
-// BackendLBPolicyApplyConfiguration represents an declarative configuration of the BackendLBPolicy type for use
+// BackendLBPolicyApplyConfiguration represents a declarative configuration of the BackendLBPolicy type for use
// with apply.
type BackendLBPolicyApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
@@ -37,7 +36,7 @@ type BackendLBPolicyApplyConfiguration struct {
Status *PolicyStatusApplyConfiguration `json:"status,omitempty"`
}
-// BackendLBPolicy constructs an declarative configuration of the BackendLBPolicy type for use with
+// BackendLBPolicy constructs a declarative configuration of the BackendLBPolicy type for use with
// apply.
func BackendLBPolicy(name, namespace string) *BackendLBPolicyApplyConfiguration {
b := &BackendLBPolicyApplyConfiguration{}
@@ -257,3 +256,9 @@ func (b *BackendLBPolicyApplyConfiguration) WithStatus(value *PolicyStatusApplyC
b.Status = value
return b
}
+
+// GetName retrieves the value of the Name field in the declarative configuration.
+func (b *BackendLBPolicyApplyConfiguration) GetName() *string {
+ b.ensureObjectMetaApplyConfigurationExists()
+ return b.Name
+}
diff --git a/apis/applyconfiguration/apis/v1alpha2/backendlbpolicyspec.go b/apis/applyconfiguration/apis/v1alpha2/backendlbpolicyspec.go
index c233994c63..b443579a6b 100644
--- a/apis/applyconfiguration/apis/v1alpha2/backendlbpolicyspec.go
+++ b/apis/applyconfiguration/apis/v1alpha2/backendlbpolicyspec.go
@@ -22,14 +22,14 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/applyconfiguration/apis/v1"
)
-// BackendLBPolicySpecApplyConfiguration represents an declarative configuration of the BackendLBPolicySpec type for use
+// BackendLBPolicySpecApplyConfiguration represents a declarative configuration of the BackendLBPolicySpec type for use
// with apply.
type BackendLBPolicySpecApplyConfiguration struct {
TargetRefs []LocalPolicyTargetReferenceApplyConfiguration `json:"targetRefs,omitempty"`
SessionPersistence *v1.SessionPersistenceApplyConfiguration `json:"sessionPersistence,omitempty"`
}
-// BackendLBPolicySpecApplyConfiguration constructs an declarative configuration of the BackendLBPolicySpec type for use with
+// BackendLBPolicySpecApplyConfiguration constructs a declarative configuration of the BackendLBPolicySpec type for use with
// apply.
func BackendLBPolicySpec() *BackendLBPolicySpecApplyConfiguration {
return &BackendLBPolicySpecApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1alpha2/grpcroute.go b/apis/applyconfiguration/apis/v1alpha2/grpcroute.go
index cc095e08c1..7e6f806b2c 100644
--- a/apis/applyconfiguration/apis/v1alpha2/grpcroute.go
+++ b/apis/applyconfiguration/apis/v1alpha2/grpcroute.go
@@ -28,7 +28,7 @@ import (
v1alpha2 "sigs.k8s.io/gateway-api/apis/v1alpha2"
)
-// GRPCRouteApplyConfiguration represents an declarative configuration of the GRPCRoute type for use
+// GRPCRouteApplyConfiguration represents a declarative configuration of the GRPCRoute type for use
// with apply.
type GRPCRouteApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
@@ -37,7 +37,7 @@ type GRPCRouteApplyConfiguration struct {
Status *apisv1.GRPCRouteStatusApplyConfiguration `json:"status,omitempty"`
}
-// GRPCRoute constructs an declarative configuration of the GRPCRoute type for use with
+// GRPCRoute constructs a declarative configuration of the GRPCRoute type for use with
// apply.
func GRPCRoute(name, namespace string) *GRPCRouteApplyConfiguration {
b := &GRPCRouteApplyConfiguration{}
@@ -257,3 +257,9 @@ func (b *GRPCRouteApplyConfiguration) WithStatus(value *apisv1.GRPCRouteStatusAp
b.Status = value
return b
}
+
+// GetName retrieves the value of the Name field in the declarative configuration.
+func (b *GRPCRouteApplyConfiguration) GetName() *string {
+ b.ensureObjectMetaApplyConfigurationExists()
+ return b.Name
+}
diff --git a/apis/applyconfiguration/apis/v1alpha2/localpolicytargetreference.go b/apis/applyconfiguration/apis/v1alpha2/localpolicytargetreference.go
index b4999d79cf..9560a9a49c 100644
--- a/apis/applyconfiguration/apis/v1alpha2/localpolicytargetreference.go
+++ b/apis/applyconfiguration/apis/v1alpha2/localpolicytargetreference.go
@@ -22,7 +22,7 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// LocalPolicyTargetReferenceApplyConfiguration represents an declarative configuration of the LocalPolicyTargetReference type for use
+// LocalPolicyTargetReferenceApplyConfiguration represents a declarative configuration of the LocalPolicyTargetReference type for use
// with apply.
type LocalPolicyTargetReferenceApplyConfiguration struct {
Group *v1.Group `json:"group,omitempty"`
@@ -30,7 +30,7 @@ type LocalPolicyTargetReferenceApplyConfiguration struct {
Name *v1.ObjectName `json:"name,omitempty"`
}
-// LocalPolicyTargetReferenceApplyConfiguration constructs an declarative configuration of the LocalPolicyTargetReference type for use with
+// LocalPolicyTargetReferenceApplyConfiguration constructs a declarative configuration of the LocalPolicyTargetReference type for use with
// apply.
func LocalPolicyTargetReference() *LocalPolicyTargetReferenceApplyConfiguration {
return &LocalPolicyTargetReferenceApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1alpha2/localpolicytargetreferencewithsectionname.go b/apis/applyconfiguration/apis/v1alpha2/localpolicytargetreferencewithsectionname.go
index 259da87bc3..72577d01c2 100644
--- a/apis/applyconfiguration/apis/v1alpha2/localpolicytargetreferencewithsectionname.go
+++ b/apis/applyconfiguration/apis/v1alpha2/localpolicytargetreferencewithsectionname.go
@@ -22,14 +22,14 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// LocalPolicyTargetReferenceWithSectionNameApplyConfiguration represents an declarative configuration of the LocalPolicyTargetReferenceWithSectionName type for use
+// LocalPolicyTargetReferenceWithSectionNameApplyConfiguration represents a declarative configuration of the LocalPolicyTargetReferenceWithSectionName type for use
// with apply.
type LocalPolicyTargetReferenceWithSectionNameApplyConfiguration struct {
LocalPolicyTargetReferenceApplyConfiguration `json:",inline"`
SectionName *v1.SectionName `json:"sectionName,omitempty"`
}
-// LocalPolicyTargetReferenceWithSectionNameApplyConfiguration constructs an declarative configuration of the LocalPolicyTargetReferenceWithSectionName type for use with
+// LocalPolicyTargetReferenceWithSectionNameApplyConfiguration constructs a declarative configuration of the LocalPolicyTargetReferenceWithSectionName type for use with
// apply.
func LocalPolicyTargetReferenceWithSectionName() *LocalPolicyTargetReferenceWithSectionNameApplyConfiguration {
return &LocalPolicyTargetReferenceWithSectionNameApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1alpha2/policyancestorstatus.go b/apis/applyconfiguration/apis/v1alpha2/policyancestorstatus.go
index f43e15e4bf..d59b5c78ae 100644
--- a/apis/applyconfiguration/apis/v1alpha2/policyancestorstatus.go
+++ b/apis/applyconfiguration/apis/v1alpha2/policyancestorstatus.go
@@ -24,7 +24,7 @@ import (
apisv1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// PolicyAncestorStatusApplyConfiguration represents an declarative configuration of the PolicyAncestorStatus type for use
+// PolicyAncestorStatusApplyConfiguration represents a declarative configuration of the PolicyAncestorStatus type for use
// with apply.
type PolicyAncestorStatusApplyConfiguration struct {
AncestorRef *v1.ParentReferenceApplyConfiguration `json:"ancestorRef,omitempty"`
@@ -32,7 +32,7 @@ type PolicyAncestorStatusApplyConfiguration struct {
Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"`
}
-// PolicyAncestorStatusApplyConfiguration constructs an declarative configuration of the PolicyAncestorStatus type for use with
+// PolicyAncestorStatusApplyConfiguration constructs a declarative configuration of the PolicyAncestorStatus type for use with
// apply.
func PolicyAncestorStatus() *PolicyAncestorStatusApplyConfiguration {
return &PolicyAncestorStatusApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1alpha2/policystatus.go b/apis/applyconfiguration/apis/v1alpha2/policystatus.go
index 86063588f5..b7b158b29a 100644
--- a/apis/applyconfiguration/apis/v1alpha2/policystatus.go
+++ b/apis/applyconfiguration/apis/v1alpha2/policystatus.go
@@ -18,13 +18,13 @@ limitations under the License.
package v1alpha2
-// PolicyStatusApplyConfiguration represents an declarative configuration of the PolicyStatus type for use
+// PolicyStatusApplyConfiguration represents a declarative configuration of the PolicyStatus type for use
// with apply.
type PolicyStatusApplyConfiguration struct {
Ancestors []PolicyAncestorStatusApplyConfiguration `json:"ancestors,omitempty"`
}
-// PolicyStatusApplyConfiguration constructs an declarative configuration of the PolicyStatus type for use with
+// PolicyStatusApplyConfiguration constructs a declarative configuration of the PolicyStatus type for use with
// apply.
func PolicyStatus() *PolicyStatusApplyConfiguration {
return &PolicyStatusApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1alpha2/referencegrant.go b/apis/applyconfiguration/apis/v1alpha2/referencegrant.go
index f7a7f4d1ad..e25a74a63e 100644
--- a/apis/applyconfiguration/apis/v1alpha2/referencegrant.go
+++ b/apis/applyconfiguration/apis/v1alpha2/referencegrant.go
@@ -28,7 +28,7 @@ import (
v1alpha2 "sigs.k8s.io/gateway-api/apis/v1alpha2"
)
-// ReferenceGrantApplyConfiguration represents an declarative configuration of the ReferenceGrant type for use
+// ReferenceGrantApplyConfiguration represents a declarative configuration of the ReferenceGrant type for use
// with apply.
type ReferenceGrantApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
@@ -36,7 +36,7 @@ type ReferenceGrantApplyConfiguration struct {
Spec *v1beta1.ReferenceGrantSpecApplyConfiguration `json:"spec,omitempty"`
}
-// ReferenceGrant constructs an declarative configuration of the ReferenceGrant type for use with
+// ReferenceGrant constructs a declarative configuration of the ReferenceGrant type for use with
// apply.
func ReferenceGrant(name, namespace string) *ReferenceGrantApplyConfiguration {
b := &ReferenceGrantApplyConfiguration{}
@@ -248,3 +248,9 @@ func (b *ReferenceGrantApplyConfiguration) WithSpec(value *v1beta1.ReferenceGran
b.Spec = value
return b
}
+
+// GetName retrieves the value of the Name field in the declarative configuration.
+func (b *ReferenceGrantApplyConfiguration) GetName() *string {
+ b.ensureObjectMetaApplyConfigurationExists()
+ return b.Name
+}
diff --git a/apis/applyconfiguration/apis/v1alpha2/tcproute.go b/apis/applyconfiguration/apis/v1alpha2/tcproute.go
index ed6cfbfd41..1edbd0d753 100644
--- a/apis/applyconfiguration/apis/v1alpha2/tcproute.go
+++ b/apis/applyconfiguration/apis/v1alpha2/tcproute.go
@@ -23,12 +23,11 @@ import (
types "k8s.io/apimachinery/pkg/types"
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
-
internal "sigs.k8s.io/gateway-api/apis/applyconfiguration/internal"
apisv1alpha2 "sigs.k8s.io/gateway-api/apis/v1alpha2"
)
-// TCPRouteApplyConfiguration represents an declarative configuration of the TCPRoute type for use
+// TCPRouteApplyConfiguration represents a declarative configuration of the TCPRoute type for use
// with apply.
type TCPRouteApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
@@ -37,7 +36,7 @@ type TCPRouteApplyConfiguration struct {
Status *TCPRouteStatusApplyConfiguration `json:"status,omitempty"`
}
-// TCPRoute constructs an declarative configuration of the TCPRoute type for use with
+// TCPRoute constructs a declarative configuration of the TCPRoute type for use with
// apply.
func TCPRoute(name, namespace string) *TCPRouteApplyConfiguration {
b := &TCPRouteApplyConfiguration{}
@@ -257,3 +256,9 @@ func (b *TCPRouteApplyConfiguration) WithStatus(value *TCPRouteStatusApplyConfig
b.Status = value
return b
}
+
+// GetName retrieves the value of the Name field in the declarative configuration.
+func (b *TCPRouteApplyConfiguration) GetName() *string {
+ b.ensureObjectMetaApplyConfigurationExists()
+ return b.Name
+}
diff --git a/apis/applyconfiguration/apis/v1alpha2/tcprouterule.go b/apis/applyconfiguration/apis/v1alpha2/tcprouterule.go
index 711556120c..450d89992d 100644
--- a/apis/applyconfiguration/apis/v1alpha2/tcprouterule.go
+++ b/apis/applyconfiguration/apis/v1alpha2/tcprouterule.go
@@ -23,14 +23,14 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// TCPRouteRuleApplyConfiguration represents an declarative configuration of the TCPRouteRule type for use
+// TCPRouteRuleApplyConfiguration represents a declarative configuration of the TCPRouteRule type for use
// with apply.
type TCPRouteRuleApplyConfiguration struct {
Name *v1.SectionName `json:"name,omitempty"`
BackendRefs []apisv1.BackendRefApplyConfiguration `json:"backendRefs,omitempty"`
}
-// TCPRouteRuleApplyConfiguration constructs an declarative configuration of the TCPRouteRule type for use with
+// TCPRouteRuleApplyConfiguration constructs a declarative configuration of the TCPRouteRule type for use with
// apply.
func TCPRouteRule() *TCPRouteRuleApplyConfiguration {
return &TCPRouteRuleApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1alpha2/tcproutespec.go b/apis/applyconfiguration/apis/v1alpha2/tcproutespec.go
index 62fdffc7c7..375a7f4b16 100644
--- a/apis/applyconfiguration/apis/v1alpha2/tcproutespec.go
+++ b/apis/applyconfiguration/apis/v1alpha2/tcproutespec.go
@@ -22,14 +22,14 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/applyconfiguration/apis/v1"
)
-// TCPRouteSpecApplyConfiguration represents an declarative configuration of the TCPRouteSpec type for use
+// TCPRouteSpecApplyConfiguration represents a declarative configuration of the TCPRouteSpec type for use
// with apply.
type TCPRouteSpecApplyConfiguration struct {
v1.CommonRouteSpecApplyConfiguration `json:",inline"`
Rules []TCPRouteRuleApplyConfiguration `json:"rules,omitempty"`
}
-// TCPRouteSpecApplyConfiguration constructs an declarative configuration of the TCPRouteSpec type for use with
+// TCPRouteSpecApplyConfiguration constructs a declarative configuration of the TCPRouteSpec type for use with
// apply.
func TCPRouteSpec() *TCPRouteSpecApplyConfiguration {
return &TCPRouteSpecApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1alpha2/tcproutestatus.go b/apis/applyconfiguration/apis/v1alpha2/tcproutestatus.go
index 74be49a173..a32ffd2bfd 100644
--- a/apis/applyconfiguration/apis/v1alpha2/tcproutestatus.go
+++ b/apis/applyconfiguration/apis/v1alpha2/tcproutestatus.go
@@ -22,13 +22,13 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/applyconfiguration/apis/v1"
)
-// TCPRouteStatusApplyConfiguration represents an declarative configuration of the TCPRouteStatus type for use
+// TCPRouteStatusApplyConfiguration represents a declarative configuration of the TCPRouteStatus type for use
// with apply.
type TCPRouteStatusApplyConfiguration struct {
v1.RouteStatusApplyConfiguration `json:",inline"`
}
-// TCPRouteStatusApplyConfiguration constructs an declarative configuration of the TCPRouteStatus type for use with
+// TCPRouteStatusApplyConfiguration constructs a declarative configuration of the TCPRouteStatus type for use with
// apply.
func TCPRouteStatus() *TCPRouteStatusApplyConfiguration {
return &TCPRouteStatusApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1alpha2/tlsroute.go b/apis/applyconfiguration/apis/v1alpha2/tlsroute.go
index 8a22aa8d66..5cfdd67395 100644
--- a/apis/applyconfiguration/apis/v1alpha2/tlsroute.go
+++ b/apis/applyconfiguration/apis/v1alpha2/tlsroute.go
@@ -23,12 +23,11 @@ import (
types "k8s.io/apimachinery/pkg/types"
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
-
internal "sigs.k8s.io/gateway-api/apis/applyconfiguration/internal"
apisv1alpha2 "sigs.k8s.io/gateway-api/apis/v1alpha2"
)
-// TLSRouteApplyConfiguration represents an declarative configuration of the TLSRoute type for use
+// TLSRouteApplyConfiguration represents a declarative configuration of the TLSRoute type for use
// with apply.
type TLSRouteApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
@@ -37,7 +36,7 @@ type TLSRouteApplyConfiguration struct {
Status *TLSRouteStatusApplyConfiguration `json:"status,omitempty"`
}
-// TLSRoute constructs an declarative configuration of the TLSRoute type for use with
+// TLSRoute constructs a declarative configuration of the TLSRoute type for use with
// apply.
func TLSRoute(name, namespace string) *TLSRouteApplyConfiguration {
b := &TLSRouteApplyConfiguration{}
@@ -257,3 +256,9 @@ func (b *TLSRouteApplyConfiguration) WithStatus(value *TLSRouteStatusApplyConfig
b.Status = value
return b
}
+
+// GetName retrieves the value of the Name field in the declarative configuration.
+func (b *TLSRouteApplyConfiguration) GetName() *string {
+ b.ensureObjectMetaApplyConfigurationExists()
+ return b.Name
+}
diff --git a/apis/applyconfiguration/apis/v1alpha2/tlsrouterule.go b/apis/applyconfiguration/apis/v1alpha2/tlsrouterule.go
index d57b6d91f5..e7124fc866 100644
--- a/apis/applyconfiguration/apis/v1alpha2/tlsrouterule.go
+++ b/apis/applyconfiguration/apis/v1alpha2/tlsrouterule.go
@@ -23,14 +23,14 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// TLSRouteRuleApplyConfiguration represents an declarative configuration of the TLSRouteRule type for use
+// TLSRouteRuleApplyConfiguration represents a declarative configuration of the TLSRouteRule type for use
// with apply.
type TLSRouteRuleApplyConfiguration struct {
Name *v1.SectionName `json:"name,omitempty"`
BackendRefs []apisv1.BackendRefApplyConfiguration `json:"backendRefs,omitempty"`
}
-// TLSRouteRuleApplyConfiguration constructs an declarative configuration of the TLSRouteRule type for use with
+// TLSRouteRuleApplyConfiguration constructs a declarative configuration of the TLSRouteRule type for use with
// apply.
func TLSRouteRule() *TLSRouteRuleApplyConfiguration {
return &TLSRouteRuleApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1alpha2/tlsroutespec.go b/apis/applyconfiguration/apis/v1alpha2/tlsroutespec.go
index 0de333f9ff..a8e3745ff2 100644
--- a/apis/applyconfiguration/apis/v1alpha2/tlsroutespec.go
+++ b/apis/applyconfiguration/apis/v1alpha2/tlsroutespec.go
@@ -20,11 +20,10 @@ package v1alpha2
import (
v1 "sigs.k8s.io/gateway-api/apis/applyconfiguration/apis/v1"
-
apisv1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// TLSRouteSpecApplyConfiguration represents an declarative configuration of the TLSRouteSpec type for use
+// TLSRouteSpecApplyConfiguration represents a declarative configuration of the TLSRouteSpec type for use
// with apply.
type TLSRouteSpecApplyConfiguration struct {
v1.CommonRouteSpecApplyConfiguration `json:",inline"`
@@ -32,7 +31,7 @@ type TLSRouteSpecApplyConfiguration struct {
Rules []TLSRouteRuleApplyConfiguration `json:"rules,omitempty"`
}
-// TLSRouteSpecApplyConfiguration constructs an declarative configuration of the TLSRouteSpec type for use with
+// TLSRouteSpecApplyConfiguration constructs a declarative configuration of the TLSRouteSpec type for use with
// apply.
func TLSRouteSpec() *TLSRouteSpecApplyConfiguration {
return &TLSRouteSpecApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1alpha2/tlsroutestatus.go b/apis/applyconfiguration/apis/v1alpha2/tlsroutestatus.go
index f8677962c2..4f0cb40826 100644
--- a/apis/applyconfiguration/apis/v1alpha2/tlsroutestatus.go
+++ b/apis/applyconfiguration/apis/v1alpha2/tlsroutestatus.go
@@ -22,13 +22,13 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/applyconfiguration/apis/v1"
)
-// TLSRouteStatusApplyConfiguration represents an declarative configuration of the TLSRouteStatus type for use
+// TLSRouteStatusApplyConfiguration represents a declarative configuration of the TLSRouteStatus type for use
// with apply.
type TLSRouteStatusApplyConfiguration struct {
v1.RouteStatusApplyConfiguration `json:",inline"`
}
-// TLSRouteStatusApplyConfiguration constructs an declarative configuration of the TLSRouteStatus type for use with
+// TLSRouteStatusApplyConfiguration constructs a declarative configuration of the TLSRouteStatus type for use with
// apply.
func TLSRouteStatus() *TLSRouteStatusApplyConfiguration {
return &TLSRouteStatusApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1alpha2/udproute.go b/apis/applyconfiguration/apis/v1alpha2/udproute.go
index ba4d21f60f..377e85d87e 100644
--- a/apis/applyconfiguration/apis/v1alpha2/udproute.go
+++ b/apis/applyconfiguration/apis/v1alpha2/udproute.go
@@ -23,12 +23,11 @@ import (
types "k8s.io/apimachinery/pkg/types"
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
-
internal "sigs.k8s.io/gateway-api/apis/applyconfiguration/internal"
apisv1alpha2 "sigs.k8s.io/gateway-api/apis/v1alpha2"
)
-// UDPRouteApplyConfiguration represents an declarative configuration of the UDPRoute type for use
+// UDPRouteApplyConfiguration represents a declarative configuration of the UDPRoute type for use
// with apply.
type UDPRouteApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
@@ -37,7 +36,7 @@ type UDPRouteApplyConfiguration struct {
Status *UDPRouteStatusApplyConfiguration `json:"status,omitempty"`
}
-// UDPRoute constructs an declarative configuration of the UDPRoute type for use with
+// UDPRoute constructs a declarative configuration of the UDPRoute type for use with
// apply.
func UDPRoute(name, namespace string) *UDPRouteApplyConfiguration {
b := &UDPRouteApplyConfiguration{}
@@ -257,3 +256,9 @@ func (b *UDPRouteApplyConfiguration) WithStatus(value *UDPRouteStatusApplyConfig
b.Status = value
return b
}
+
+// GetName retrieves the value of the Name field in the declarative configuration.
+func (b *UDPRouteApplyConfiguration) GetName() *string {
+ b.ensureObjectMetaApplyConfigurationExists()
+ return b.Name
+}
diff --git a/apis/applyconfiguration/apis/v1alpha2/udprouterule.go b/apis/applyconfiguration/apis/v1alpha2/udprouterule.go
index 0fdf1bf95d..fd6171a2c7 100644
--- a/apis/applyconfiguration/apis/v1alpha2/udprouterule.go
+++ b/apis/applyconfiguration/apis/v1alpha2/udprouterule.go
@@ -23,14 +23,14 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// UDPRouteRuleApplyConfiguration represents an declarative configuration of the UDPRouteRule type for use
+// UDPRouteRuleApplyConfiguration represents a declarative configuration of the UDPRouteRule type for use
// with apply.
type UDPRouteRuleApplyConfiguration struct {
Name *v1.SectionName `json:"name,omitempty"`
BackendRefs []apisv1.BackendRefApplyConfiguration `json:"backendRefs,omitempty"`
}
-// UDPRouteRuleApplyConfiguration constructs an declarative configuration of the UDPRouteRule type for use with
+// UDPRouteRuleApplyConfiguration constructs a declarative configuration of the UDPRouteRule type for use with
// apply.
func UDPRouteRule() *UDPRouteRuleApplyConfiguration {
return &UDPRouteRuleApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1alpha2/udproutespec.go b/apis/applyconfiguration/apis/v1alpha2/udproutespec.go
index e73fb75d30..eed193696b 100644
--- a/apis/applyconfiguration/apis/v1alpha2/udproutespec.go
+++ b/apis/applyconfiguration/apis/v1alpha2/udproutespec.go
@@ -22,14 +22,14 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/applyconfiguration/apis/v1"
)
-// UDPRouteSpecApplyConfiguration represents an declarative configuration of the UDPRouteSpec type for use
+// UDPRouteSpecApplyConfiguration represents a declarative configuration of the UDPRouteSpec type for use
// with apply.
type UDPRouteSpecApplyConfiguration struct {
v1.CommonRouteSpecApplyConfiguration `json:",inline"`
Rules []UDPRouteRuleApplyConfiguration `json:"rules,omitempty"`
}
-// UDPRouteSpecApplyConfiguration constructs an declarative configuration of the UDPRouteSpec type for use with
+// UDPRouteSpecApplyConfiguration constructs a declarative configuration of the UDPRouteSpec type for use with
// apply.
func UDPRouteSpec() *UDPRouteSpecApplyConfiguration {
return &UDPRouteSpecApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1alpha2/udproutestatus.go b/apis/applyconfiguration/apis/v1alpha2/udproutestatus.go
index 453004a652..57abcf15a2 100644
--- a/apis/applyconfiguration/apis/v1alpha2/udproutestatus.go
+++ b/apis/applyconfiguration/apis/v1alpha2/udproutestatus.go
@@ -22,13 +22,13 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/applyconfiguration/apis/v1"
)
-// UDPRouteStatusApplyConfiguration represents an declarative configuration of the UDPRouteStatus type for use
+// UDPRouteStatusApplyConfiguration represents a declarative configuration of the UDPRouteStatus type for use
// with apply.
type UDPRouteStatusApplyConfiguration struct {
v1.RouteStatusApplyConfiguration `json:",inline"`
}
-// UDPRouteStatusApplyConfiguration constructs an declarative configuration of the UDPRouteStatus type for use with
+// UDPRouteStatusApplyConfiguration constructs a declarative configuration of the UDPRouteStatus type for use with
// apply.
func UDPRouteStatus() *UDPRouteStatusApplyConfiguration {
return &UDPRouteStatusApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1alpha3/backendtlspolicy.go b/apis/applyconfiguration/apis/v1alpha3/backendtlspolicy.go
index 5d8f6dfa63..5cbf6a8d9e 100644
--- a/apis/applyconfiguration/apis/v1alpha3/backendtlspolicy.go
+++ b/apis/applyconfiguration/apis/v1alpha3/backendtlspolicy.go
@@ -24,12 +24,11 @@ import (
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
v1alpha2 "sigs.k8s.io/gateway-api/apis/applyconfiguration/apis/v1alpha2"
-
internal "sigs.k8s.io/gateway-api/apis/applyconfiguration/internal"
apisv1alpha3 "sigs.k8s.io/gateway-api/apis/v1alpha3"
)
-// BackendTLSPolicyApplyConfiguration represents an declarative configuration of the BackendTLSPolicy type for use
+// BackendTLSPolicyApplyConfiguration represents a declarative configuration of the BackendTLSPolicy type for use
// with apply.
type BackendTLSPolicyApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
@@ -38,7 +37,7 @@ type BackendTLSPolicyApplyConfiguration struct {
Status *v1alpha2.PolicyStatusApplyConfiguration `json:"status,omitempty"`
}
-// BackendTLSPolicy constructs an declarative configuration of the BackendTLSPolicy type for use with
+// BackendTLSPolicy constructs a declarative configuration of the BackendTLSPolicy type for use with
// apply.
func BackendTLSPolicy(name, namespace string) *BackendTLSPolicyApplyConfiguration {
b := &BackendTLSPolicyApplyConfiguration{}
@@ -258,3 +257,9 @@ func (b *BackendTLSPolicyApplyConfiguration) WithStatus(value *v1alpha2.PolicySt
b.Status = value
return b
}
+
+// GetName retrieves the value of the Name field in the declarative configuration.
+func (b *BackendTLSPolicyApplyConfiguration) GetName() *string {
+ b.ensureObjectMetaApplyConfigurationExists()
+ return b.Name
+}
diff --git a/apis/applyconfiguration/apis/v1alpha3/backendtlspolicyspec.go b/apis/applyconfiguration/apis/v1alpha3/backendtlspolicyspec.go
index 6082fe08c5..5290a35fa0 100644
--- a/apis/applyconfiguration/apis/v1alpha3/backendtlspolicyspec.go
+++ b/apis/applyconfiguration/apis/v1alpha3/backendtlspolicyspec.go
@@ -20,11 +20,10 @@ package v1alpha3
import (
v1alpha2 "sigs.k8s.io/gateway-api/apis/applyconfiguration/apis/v1alpha2"
-
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// BackendTLSPolicySpecApplyConfiguration represents an declarative configuration of the BackendTLSPolicySpec type for use
+// BackendTLSPolicySpecApplyConfiguration represents a declarative configuration of the BackendTLSPolicySpec type for use
// with apply.
type BackendTLSPolicySpecApplyConfiguration struct {
TargetRefs []v1alpha2.LocalPolicyTargetReferenceWithSectionNameApplyConfiguration `json:"targetRefs,omitempty"`
@@ -32,7 +31,7 @@ type BackendTLSPolicySpecApplyConfiguration struct {
Options map[v1.AnnotationKey]v1.AnnotationValue `json:"options,omitempty"`
}
-// BackendTLSPolicySpecApplyConfiguration constructs an declarative configuration of the BackendTLSPolicySpec type for use with
+// BackendTLSPolicySpecApplyConfiguration constructs a declarative configuration of the BackendTLSPolicySpec type for use with
// apply.
func BackendTLSPolicySpec() *BackendTLSPolicySpecApplyConfiguration {
return &BackendTLSPolicySpecApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1alpha3/backendtlspolicyvalidation.go b/apis/applyconfiguration/apis/v1alpha3/backendtlspolicyvalidation.go
index 24316c5268..1245e2853c 100644
--- a/apis/applyconfiguration/apis/v1alpha3/backendtlspolicyvalidation.go
+++ b/apis/applyconfiguration/apis/v1alpha3/backendtlspolicyvalidation.go
@@ -20,12 +20,11 @@ package v1alpha3
import (
v1 "sigs.k8s.io/gateway-api/apis/applyconfiguration/apis/v1"
-
apisv1 "sigs.k8s.io/gateway-api/apis/v1"
v1alpha3 "sigs.k8s.io/gateway-api/apis/v1alpha3"
)
-// BackendTLSPolicyValidationApplyConfiguration represents an declarative configuration of the BackendTLSPolicyValidation type for use
+// BackendTLSPolicyValidationApplyConfiguration represents a declarative configuration of the BackendTLSPolicyValidation type for use
// with apply.
type BackendTLSPolicyValidationApplyConfiguration struct {
CACertificateRefs []v1.LocalObjectReferenceApplyConfiguration `json:"caCertificateRefs,omitempty"`
@@ -34,7 +33,7 @@ type BackendTLSPolicyValidationApplyConfiguration struct {
SubjectAltNames []SubjectAltNameApplyConfiguration `json:"subjectAltNames,omitempty"`
}
-// BackendTLSPolicyValidationApplyConfiguration constructs an declarative configuration of the BackendTLSPolicyValidation type for use with
+// BackendTLSPolicyValidationApplyConfiguration constructs a declarative configuration of the BackendTLSPolicyValidation type for use with
// apply.
func BackendTLSPolicyValidation() *BackendTLSPolicyValidationApplyConfiguration {
return &BackendTLSPolicyValidationApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1alpha3/subjectaltname.go b/apis/applyconfiguration/apis/v1alpha3/subjectaltname.go
index 47486fbbc7..ae71ef3137 100644
--- a/apis/applyconfiguration/apis/v1alpha3/subjectaltname.go
+++ b/apis/applyconfiguration/apis/v1alpha3/subjectaltname.go
@@ -23,7 +23,7 @@ import (
v1alpha3 "sigs.k8s.io/gateway-api/apis/v1alpha3"
)
-// SubjectAltNameApplyConfiguration represents an declarative configuration of the SubjectAltName type for use
+// SubjectAltNameApplyConfiguration represents a declarative configuration of the SubjectAltName type for use
// with apply.
type SubjectAltNameApplyConfiguration struct {
Type *v1alpha3.SubjectAltNameType `json:"type,omitempty"`
@@ -31,7 +31,7 @@ type SubjectAltNameApplyConfiguration struct {
URI *v1.AbsoluteURI `json:"uri,omitempty"`
}
-// SubjectAltNameApplyConfiguration constructs an declarative configuration of the SubjectAltName type for use with
+// SubjectAltNameApplyConfiguration constructs a declarative configuration of the SubjectAltName type for use with
// apply.
func SubjectAltName() *SubjectAltNameApplyConfiguration {
return &SubjectAltNameApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1beta1/gateway.go b/apis/applyconfiguration/apis/v1beta1/gateway.go
index ced36f358a..8046345c75 100644
--- a/apis/applyconfiguration/apis/v1beta1/gateway.go
+++ b/apis/applyconfiguration/apis/v1beta1/gateway.go
@@ -28,7 +28,7 @@ import (
v1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1"
)
-// GatewayApplyConfiguration represents an declarative configuration of the Gateway type for use
+// GatewayApplyConfiguration represents a declarative configuration of the Gateway type for use
// with apply.
type GatewayApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
@@ -37,7 +37,7 @@ type GatewayApplyConfiguration struct {
Status *apisv1.GatewayStatusApplyConfiguration `json:"status,omitempty"`
}
-// Gateway constructs an declarative configuration of the Gateway type for use with
+// Gateway constructs a declarative configuration of the Gateway type for use with
// apply.
func Gateway(name, namespace string) *GatewayApplyConfiguration {
b := &GatewayApplyConfiguration{}
@@ -257,3 +257,9 @@ func (b *GatewayApplyConfiguration) WithStatus(value *apisv1.GatewayStatusApplyC
b.Status = value
return b
}
+
+// GetName retrieves the value of the Name field in the declarative configuration.
+func (b *GatewayApplyConfiguration) GetName() *string {
+ b.ensureObjectMetaApplyConfigurationExists()
+ return b.Name
+}
diff --git a/apis/applyconfiguration/apis/v1beta1/gatewayclass.go b/apis/applyconfiguration/apis/v1beta1/gatewayclass.go
index 6b3c5856c1..938c6ba0a4 100644
--- a/apis/applyconfiguration/apis/v1beta1/gatewayclass.go
+++ b/apis/applyconfiguration/apis/v1beta1/gatewayclass.go
@@ -28,7 +28,7 @@ import (
v1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1"
)
-// GatewayClassApplyConfiguration represents an declarative configuration of the GatewayClass type for use
+// GatewayClassApplyConfiguration represents a declarative configuration of the GatewayClass type for use
// with apply.
type GatewayClassApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
@@ -37,7 +37,7 @@ type GatewayClassApplyConfiguration struct {
Status *apisv1.GatewayClassStatusApplyConfiguration `json:"status,omitempty"`
}
-// GatewayClass constructs an declarative configuration of the GatewayClass type for use with
+// GatewayClass constructs a declarative configuration of the GatewayClass type for use with
// apply.
func GatewayClass(name string) *GatewayClassApplyConfiguration {
b := &GatewayClassApplyConfiguration{}
@@ -255,3 +255,9 @@ func (b *GatewayClassApplyConfiguration) WithStatus(value *apisv1.GatewayClassSt
b.Status = value
return b
}
+
+// GetName retrieves the value of the Name field in the declarative configuration.
+func (b *GatewayClassApplyConfiguration) GetName() *string {
+ b.ensureObjectMetaApplyConfigurationExists()
+ return b.Name
+}
diff --git a/apis/applyconfiguration/apis/v1beta1/httproute.go b/apis/applyconfiguration/apis/v1beta1/httproute.go
index 221b2fd180..84a40d9a32 100644
--- a/apis/applyconfiguration/apis/v1beta1/httproute.go
+++ b/apis/applyconfiguration/apis/v1beta1/httproute.go
@@ -28,7 +28,7 @@ import (
v1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1"
)
-// HTTPRouteApplyConfiguration represents an declarative configuration of the HTTPRoute type for use
+// HTTPRouteApplyConfiguration represents a declarative configuration of the HTTPRoute type for use
// with apply.
type HTTPRouteApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
@@ -37,7 +37,7 @@ type HTTPRouteApplyConfiguration struct {
Status *apisv1.HTTPRouteStatusApplyConfiguration `json:"status,omitempty"`
}
-// HTTPRoute constructs an declarative configuration of the HTTPRoute type for use with
+// HTTPRoute constructs a declarative configuration of the HTTPRoute type for use with
// apply.
func HTTPRoute(name, namespace string) *HTTPRouteApplyConfiguration {
b := &HTTPRouteApplyConfiguration{}
@@ -257,3 +257,9 @@ func (b *HTTPRouteApplyConfiguration) WithStatus(value *apisv1.HTTPRouteStatusAp
b.Status = value
return b
}
+
+// GetName retrieves the value of the Name field in the declarative configuration.
+func (b *HTTPRouteApplyConfiguration) GetName() *string {
+ b.ensureObjectMetaApplyConfigurationExists()
+ return b.Name
+}
diff --git a/apis/applyconfiguration/apis/v1beta1/referencegrant.go b/apis/applyconfiguration/apis/v1beta1/referencegrant.go
index 4c0c7dc51a..b6b8c2e507 100644
--- a/apis/applyconfiguration/apis/v1beta1/referencegrant.go
+++ b/apis/applyconfiguration/apis/v1beta1/referencegrant.go
@@ -23,12 +23,11 @@ import (
types "k8s.io/apimachinery/pkg/types"
managedfields "k8s.io/apimachinery/pkg/util/managedfields"
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
-
internal "sigs.k8s.io/gateway-api/apis/applyconfiguration/internal"
apisv1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1"
)
-// ReferenceGrantApplyConfiguration represents an declarative configuration of the ReferenceGrant type for use
+// ReferenceGrantApplyConfiguration represents a declarative configuration of the ReferenceGrant type for use
// with apply.
type ReferenceGrantApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
@@ -36,7 +35,7 @@ type ReferenceGrantApplyConfiguration struct {
Spec *ReferenceGrantSpecApplyConfiguration `json:"spec,omitempty"`
}
-// ReferenceGrant constructs an declarative configuration of the ReferenceGrant type for use with
+// ReferenceGrant constructs a declarative configuration of the ReferenceGrant type for use with
// apply.
func ReferenceGrant(name, namespace string) *ReferenceGrantApplyConfiguration {
b := &ReferenceGrantApplyConfiguration{}
@@ -248,3 +247,9 @@ func (b *ReferenceGrantApplyConfiguration) WithSpec(value *ReferenceGrantSpecApp
b.Spec = value
return b
}
+
+// GetName retrieves the value of the Name field in the declarative configuration.
+func (b *ReferenceGrantApplyConfiguration) GetName() *string {
+ b.ensureObjectMetaApplyConfigurationExists()
+ return b.Name
+}
diff --git a/apis/applyconfiguration/apis/v1beta1/referencegrantfrom.go b/apis/applyconfiguration/apis/v1beta1/referencegrantfrom.go
index fa494a5403..168c1c0308 100644
--- a/apis/applyconfiguration/apis/v1beta1/referencegrantfrom.go
+++ b/apis/applyconfiguration/apis/v1beta1/referencegrantfrom.go
@@ -22,7 +22,7 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// ReferenceGrantFromApplyConfiguration represents an declarative configuration of the ReferenceGrantFrom type for use
+// ReferenceGrantFromApplyConfiguration represents a declarative configuration of the ReferenceGrantFrom type for use
// with apply.
type ReferenceGrantFromApplyConfiguration struct {
Group *v1.Group `json:"group,omitempty"`
@@ -30,7 +30,7 @@ type ReferenceGrantFromApplyConfiguration struct {
Namespace *v1.Namespace `json:"namespace,omitempty"`
}
-// ReferenceGrantFromApplyConfiguration constructs an declarative configuration of the ReferenceGrantFrom type for use with
+// ReferenceGrantFromApplyConfiguration constructs a declarative configuration of the ReferenceGrantFrom type for use with
// apply.
func ReferenceGrantFrom() *ReferenceGrantFromApplyConfiguration {
return &ReferenceGrantFromApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1beta1/referencegrantspec.go b/apis/applyconfiguration/apis/v1beta1/referencegrantspec.go
index 9fc339fcd8..f70297fcb0 100644
--- a/apis/applyconfiguration/apis/v1beta1/referencegrantspec.go
+++ b/apis/applyconfiguration/apis/v1beta1/referencegrantspec.go
@@ -18,14 +18,14 @@ limitations under the License.
package v1beta1
-// ReferenceGrantSpecApplyConfiguration represents an declarative configuration of the ReferenceGrantSpec type for use
+// ReferenceGrantSpecApplyConfiguration represents a declarative configuration of the ReferenceGrantSpec type for use
// with apply.
type ReferenceGrantSpecApplyConfiguration struct {
From []ReferenceGrantFromApplyConfiguration `json:"from,omitempty"`
To []ReferenceGrantToApplyConfiguration `json:"to,omitempty"`
}
-// ReferenceGrantSpecApplyConfiguration constructs an declarative configuration of the ReferenceGrantSpec type for use with
+// ReferenceGrantSpecApplyConfiguration constructs a declarative configuration of the ReferenceGrantSpec type for use with
// apply.
func ReferenceGrantSpec() *ReferenceGrantSpecApplyConfiguration {
return &ReferenceGrantSpecApplyConfiguration{}
diff --git a/apis/applyconfiguration/apis/v1beta1/referencegrantto.go b/apis/applyconfiguration/apis/v1beta1/referencegrantto.go
index c1e0ba760d..c417945775 100644
--- a/apis/applyconfiguration/apis/v1beta1/referencegrantto.go
+++ b/apis/applyconfiguration/apis/v1beta1/referencegrantto.go
@@ -22,7 +22,7 @@ import (
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
-// ReferenceGrantToApplyConfiguration represents an declarative configuration of the ReferenceGrantTo type for use
+// ReferenceGrantToApplyConfiguration represents a declarative configuration of the ReferenceGrantTo type for use
// with apply.
type ReferenceGrantToApplyConfiguration struct {
Group *v1.Group `json:"group,omitempty"`
@@ -30,7 +30,7 @@ type ReferenceGrantToApplyConfiguration struct {
Name *v1.ObjectName `json:"name,omitempty"`
}
-// ReferenceGrantToApplyConfiguration constructs an declarative configuration of the ReferenceGrantTo type for use with
+// ReferenceGrantToApplyConfiguration constructs a declarative configuration of the ReferenceGrantTo type for use with
// apply.
func ReferenceGrantTo() *ReferenceGrantToApplyConfiguration {
return &ReferenceGrantToApplyConfiguration{}
diff --git a/apis/applyconfiguration/utils.go b/apis/applyconfiguration/utils.go
index 1bb42b5b4f..debd0d9f68 100644
--- a/apis/applyconfiguration/utils.go
+++ b/apis/applyconfiguration/utils.go
@@ -19,11 +19,14 @@ limitations under the License.
package applyconfiguration
import (
+ runtime "k8s.io/apimachinery/pkg/runtime"
schema "k8s.io/apimachinery/pkg/runtime/schema"
+ testing "k8s.io/client-go/testing"
apisv1 "sigs.k8s.io/gateway-api/apis/applyconfiguration/apis/v1"
apisv1alpha2 "sigs.k8s.io/gateway-api/apis/applyconfiguration/apis/v1alpha2"
apisv1alpha3 "sigs.k8s.io/gateway-api/apis/applyconfiguration/apis/v1alpha3"
apisv1beta1 "sigs.k8s.io/gateway-api/apis/applyconfiguration/apis/v1beta1"
+ internal "sigs.k8s.io/gateway-api/apis/applyconfiguration/internal"
v1 "sigs.k8s.io/gateway-api/apis/v1"
v1alpha2 "sigs.k8s.io/gateway-api/apis/v1alpha2"
v1alpha3 "sigs.k8s.io/gateway-api/apis/v1alpha3"
@@ -225,3 +228,7 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
}
return nil
}
+
+func NewTypeConverter(scheme *runtime.Scheme) *testing.TypeConverter {
+ return &testing.TypeConverter{Scheme: scheme, TypeResolver: internal.Parser()}
+}
diff --git a/config/crd/experimental/gateway.networking.k8s.io_backendlbpolicies.yaml b/config/crd/experimental/gateway.networking.k8s.io_backendlbpolicies.yaml
index 446ca46a9a..6e8de4d58a 100644
--- a/config/crd/experimental/gateway.networking.k8s.io_backendlbpolicies.yaml
+++ b/config/crd/experimental/gateway.networking.k8s.io_backendlbpolicies.yaml
@@ -58,7 +58,6 @@ spec:
SessionPersistence defines and configures session persistence
for the backend.
-
Support: Extended
properties:
absoluteTimeout:
@@ -67,7 +66,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
@@ -76,7 +74,6 @@ spec:
CookieConfig provides configuration settings that are specific
to cookie-based session persistence.
-
Support: Core
properties:
lifetimeType:
@@ -88,20 +85,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
@@ -114,7 +107,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
@@ -125,7 +117,6 @@ spec:
should avoid reusing session names to prevent unintended
consequences, such as rejection or unpredictable behavior.
-
Support: Implementation-specific
maxLength: 128
type: string
@@ -136,10 +127,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
@@ -209,27 +198,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
@@ -241,7 +225,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
@@ -250,28 +233,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:
@@ -288,7 +266,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])?)*$
@@ -298,14 +275,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
@@ -315,7 +289,6 @@ spec:
description: |-
Name is the name of the referent.
-
Support: Core
maxLength: 253
minLength: 1
@@ -325,7 +298,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:
@@ -333,12 +305,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
@@ -346,7 +316,6 @@ spec:
ParentRef of the Route.
-
Support: Core
maxLength: 63
minLength: 1
@@ -357,7 +326,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
@@ -367,18 +335,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,
@@ -387,7 +352,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
@@ -398,7 +362,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.
@@ -406,12 +369,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
@@ -421,7 +382,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
@@ -434,18 +394,8 @@ spec:
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: |-
@@ -487,12 +437,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
@@ -515,15 +460,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.
diff --git a/config/crd/experimental/gateway.networking.k8s.io_backendtlspolicies.yaml b/config/crd/experimental/gateway.networking.k8s.io_backendtlspolicies.yaml
index 8a589b7e95..06968b72af 100644
--- a/config/crd/experimental/gateway.networking.k8s.io_backendtlspolicies.yaml
+++ b/config/crd/experimental/gateway.networking.k8s.io_backendtlspolicies.yaml
@@ -68,13 +68,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
@@ -87,10 +85,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: |-
@@ -100,7 +96,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.
@@ -127,12 +122,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.
@@ -157,26 +150,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:
@@ -186,7 +174,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.
@@ -222,13 +209,11 @@ 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. 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
@@ -240,7 +225,6 @@ spec:
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.
@@ -250,7 +234,6 @@ spec:
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
@@ -260,7 +243,6 @@ spec:
description: |-
Type determines the format of the Subject Alternative Name. Always required.
-
Support: Core
enum:
- Hostname
@@ -273,7 +255,6 @@ spec:
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
@@ -306,7 +287,6 @@ spec:
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
@@ -314,7 +294,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
@@ -347,27 +326,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
@@ -379,7 +353,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
@@ -388,28 +361,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:
@@ -426,7 +394,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])?)*$
@@ -436,14 +403,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
@@ -453,7 +417,6 @@ spec:
description: |-
Name is the name of the referent.
-
Support: Core
maxLength: 253
minLength: 1
@@ -463,7 +426,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:
@@ -471,12 +433,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
@@ -484,7 +444,6 @@ spec:
ParentRef of the Route.
-
Support: Core
maxLength: 63
minLength: 1
@@ -495,7 +454,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
@@ -505,18 +463,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,
@@ -525,7 +480,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
@@ -536,7 +490,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.
@@ -544,12 +497,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
@@ -559,7 +510,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
@@ -572,18 +522,8 @@ spec:
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: |-
@@ -625,12 +565,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
@@ -653,15 +588,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.
diff --git a/config/crd/experimental/gateway.networking.k8s.io_gatewayclasses.yaml b/config/crd/experimental/gateway.networking.k8s.io_gatewayclasses.yaml
index 556008aa75..5f283dfb9d 100644
--- a/config/crd/experimental/gateway.networking.k8s.io_gatewayclasses.yaml
+++ b/config/crd/experimental/gateway.networking.k8s.io_gatewayclasses.yaml
@@ -41,7 +41,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
@@ -50,13 +49,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:
@@ -84,13 +81,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
@@ -109,23 +103,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, 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:
@@ -172,7 +162,6 @@ spec:
description: |-
Status defines the current state of GatewayClass.
-
Implementations MUST populate status on all GatewayClass resources which
specify their controller name.
properties:
@@ -187,20 +176,11 @@ 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: |-
@@ -241,12 +221,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
@@ -310,7 +285,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
@@ -319,13 +293,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:
@@ -353,13 +325,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
@@ -378,23 +347,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, 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:
@@ -441,7 +406,6 @@ spec:
description: |-
Status defines the current state of GatewayClass.
-
Implementations MUST populate status on all GatewayClass resources which
specify their controller name.
properties:
@@ -456,20 +420,11 @@ 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: |-
@@ -510,12 +465,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
diff --git a/config/crd/experimental/gateway.networking.k8s.io_gateways.yaml b/config/crd/experimental/gateway.networking.k8s.io_gateways.yaml
index f7dd6b9f22..5da0aadefd 100644
--- a/config/crd/experimental/gateway.networking.k8s.io_gateways.yaml
+++ b/config/crd/experimental/gateway.networking.k8s.io_gateways.yaml
@@ -67,27 +67,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.
@@ -118,7 +113,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
@@ -145,34 +139,27 @@ spec:
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: ""
@@ -199,13 +186,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
@@ -226,7 +211,6 @@ spec:
description: |-
Infrastructure defines infrastructure level attributes about this Gateway instance.
-
Support: Extended
properties:
annotations:
@@ -242,14 +226,11 @@ 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
@@ -271,10 +252,8 @@ spec:
* 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
@@ -285,18 +264,14 @@ spec:
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
@@ -313,15 +288,12 @@ spec:
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:
@@ -352,7 +324,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
@@ -360,42 +331,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
@@ -403,45 +364,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
@@ -451,7 +404,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
@@ -459,26 +411,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
@@ -486,11 +433,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: |-
@@ -506,12 +451,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
@@ -520,7 +463,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,
@@ -528,7 +470,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:
@@ -537,14 +478,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
@@ -574,7 +513,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:
@@ -583,13 +521,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
@@ -602,7 +538,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:
@@ -657,11 +592,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
@@ -669,19 +602,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
@@ -692,7 +622,6 @@ spec:
Name is the name of the Listener. This name MUST be unique within a
Gateway.
-
Support: Core
maxLength: 253
minLength: 1
@@ -703,7 +632,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
@@ -713,7 +641,6 @@ spec:
description: |-
Protocol specifies the network protocol this listener expects to receive.
-
Support: Core
maxLength: 255
minLength: 1
@@ -725,15 +652,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:
@@ -743,41 +667,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.
@@ -808,13 +724,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
@@ -833,10 +747,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: |-
@@ -845,21 +757,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
@@ -869,11 +777,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.
@@ -902,13 +808,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
@@ -929,7 +833,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
@@ -939,7 +842,6 @@ spec:
the ClientHello message of the TLS protocol. The certificateRefs field
is ignored in this mode.
-
Support: Core
enum:
- Terminate
@@ -960,13 +862,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
@@ -1029,16 +929,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.
@@ -1069,7 +966,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
@@ -1099,30 +995,19 @@ 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: |-
@@ -1163,12 +1048,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
@@ -1195,7 +1075,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
@@ -1208,7 +1087,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
@@ -1217,18 +1095,8 @@ spec:
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: |-
@@ -1270,12 +1138,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
@@ -1304,7 +1167,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
@@ -1397,27 +1259,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.
@@ -1448,7 +1305,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
@@ -1475,34 +1331,27 @@ spec:
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: ""
@@ -1529,13 +1378,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
@@ -1556,7 +1403,6 @@ spec:
description: |-
Infrastructure defines infrastructure level attributes about this Gateway instance.
-
Support: Extended
properties:
annotations:
@@ -1572,14 +1418,11 @@ 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
@@ -1601,10 +1444,8 @@ spec:
* 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
@@ -1615,18 +1456,14 @@ spec:
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
@@ -1643,15 +1480,12 @@ spec:
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:
@@ -1682,7 +1516,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
@@ -1690,42 +1523,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
@@ -1733,45 +1556,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
@@ -1781,7 +1596,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
@@ -1789,26 +1603,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
@@ -1816,11 +1625,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: |-
@@ -1836,12 +1643,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
@@ -1850,7 +1655,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,
@@ -1858,7 +1662,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:
@@ -1867,14 +1670,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
@@ -1904,7 +1705,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:
@@ -1913,13 +1713,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
@@ -1932,7 +1730,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:
@@ -1987,11 +1784,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
@@ -1999,19 +1794,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
@@ -2022,7 +1814,6 @@ spec:
Name is the name of the Listener. This name MUST be unique within a
Gateway.
-
Support: Core
maxLength: 253
minLength: 1
@@ -2033,7 +1824,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
@@ -2043,7 +1833,6 @@ spec:
description: |-
Protocol specifies the network protocol this listener expects to receive.
-
Support: Core
maxLength: 255
minLength: 1
@@ -2055,15 +1844,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:
@@ -2073,41 +1859,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.
@@ -2138,13 +1916,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
@@ -2163,10 +1939,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: |-
@@ -2175,21 +1949,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
@@ -2199,11 +1969,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.
@@ -2232,13 +2000,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
@@ -2259,7 +2025,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
@@ -2269,7 +2034,6 @@ spec:
the ClientHello message of the TLS protocol. The certificateRefs field
is ignored in this mode.
-
Support: Core
enum:
- Terminate
@@ -2290,13 +2054,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
@@ -2359,16 +2121,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.
@@ -2399,7 +2158,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
@@ -2429,30 +2187,19 @@ 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: |-
@@ -2493,12 +2240,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
@@ -2525,7 +2267,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
@@ -2538,7 +2279,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
@@ -2547,18 +2287,8 @@ spec:
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: |-
@@ -2600,12 +2330,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
@@ -2634,7 +2359,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
diff --git a/config/crd/experimental/gateway.networking.k8s.io_grpcroutes.yaml b/config/crd/experimental/gateway.networking.k8s.io_grpcroutes.yaml
index f0c6cbc77d..b214f2e84f 100644
--- a/config/crd/experimental/gateway.networking.k8s.io_grpcroutes.yaml
+++ b/config/crd/experimental/gateway.networking.k8s.io_grpcroutes.yaml
@@ -34,14 +34,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
@@ -49,7 +47,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
@@ -86,17 +83,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`.
@@ -106,58 +100,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.
@@ -180,21 +164,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
@@ -204,10 +183,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
@@ -215,14 +192,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,
@@ -230,12 +205,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
@@ -246,22 +219,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:
@@ -273,7 +242,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])?)*$
@@ -283,14 +251,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
@@ -300,7 +265,6 @@ spec:
description: |-
Name is the name of the referent.
-
Support: Core
maxLength: 253
minLength: 1
@@ -310,7 +274,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:
@@ -318,12 +281,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
@@ -331,7 +292,6 @@ spec:
ParentRef of the Route.
-
Support: Core
maxLength: 63
minLength: 1
@@ -342,7 +302,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
@@ -352,18 +311,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,
@@ -372,7 +328,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
@@ -383,7 +338,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.
@@ -391,12 +345,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
@@ -406,7 +358,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
@@ -444,7 +395,6 @@ spec:
description: |+
Rules are a list of GRPC matchers, filters and actions.
-
items:
description: |-
GRPCRouteRule defines the semantics for matching a gRPC request based on
@@ -456,71 +406,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:
@@ -528,7 +463,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:
@@ -547,10 +481,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:
@@ -582,7 +514,6 @@ spec:
RequestHeaderModifier defines a schema for a filter that modifies request
headers.
-
Support: Core
properties:
add:
@@ -591,18 +522,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
@@ -616,7 +544,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
@@ -648,18 +575,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
@@ -673,18 +597,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
@@ -698,7 +619,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
@@ -730,46 +650,37 @@ spec:
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:
@@ -786,20 +697,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
@@ -815,13 +722,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
@@ -850,11 +755,9 @@ spec:
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
@@ -878,11 +781,9 @@ spec:
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
@@ -899,7 +800,6 @@ spec:
ResponseHeaderModifier defines a schema for a filter that modifies response
headers.
-
Support: Extended
properties:
add:
@@ -908,18 +808,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
@@ -933,7 +830,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
@@ -965,18 +861,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
@@ -990,18 +883,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
@@ -1015,7 +905,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
@@ -1046,17 +935,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
@@ -1064,16 +950,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
@@ -1136,20 +1019,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
@@ -1165,13 +1044,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
@@ -1198,13 +1075,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
@@ -1224,32 +1099,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: |-
@@ -1267,10 +1136,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:
@@ -1302,7 +1169,6 @@ spec:
RequestHeaderModifier defines a schema for a filter that modifies request
headers.
-
Support: Core
properties:
add:
@@ -1311,18 +1177,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
@@ -1335,7 +1198,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
@@ -1367,18 +1229,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
@@ -1392,18 +1251,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
@@ -1416,7 +1272,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
@@ -1448,46 +1303,37 @@ spec:
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:
@@ -1504,20 +1350,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
@@ -1533,13 +1375,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
@@ -1568,11 +1408,9 @@ spec:
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
@@ -1596,11 +1434,9 @@ spec:
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
@@ -1617,7 +1453,6 @@ spec:
ResponseHeaderModifier defines a schema for a filter that modifies response
headers.
-
Support: Extended
properties:
add:
@@ -1626,18 +1461,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
@@ -1650,7 +1482,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
@@ -1682,18 +1513,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
@@ -1707,18 +1535,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
@@ -1731,7 +1556,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
@@ -1762,17 +1586,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
@@ -1780,16 +1601,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
@@ -1843,10 +1661,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:
@@ -1858,44 +1674,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.
@@ -1905,11 +1712,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:
@@ -1919,7 +1724,6 @@ spec:
- name: "version"
value "v1"
-
```
properties:
headers:
@@ -1936,7 +1740,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
@@ -1979,7 +1782,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
@@ -1988,7 +1790,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
@@ -1998,10 +1799,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
@@ -2030,7 +1829,6 @@ spec:
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
@@ -2041,10 +1839,8 @@ spec:
SessionPersistence defines and configures session persistence
for the route rule.
-
Support: Extended
-
properties:
absoluteTimeout:
description: |-
@@ -2052,7 +1848,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
@@ -2061,7 +1856,6 @@ spec:
CookieConfig provides configuration settings that are specific
to cookie-based session persistence.
-
Support: Core
properties:
lifetimeType:
@@ -2073,20 +1867,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
@@ -2099,7 +1889,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
@@ -2110,7 +1899,6 @@ spec:
should avoid reusing session names to prevent unintended
consequences, such as rejection or unpredictable behavior.
-
Support: Implementation-specific
maxLength: 128
type: string
@@ -2121,10 +1909,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
@@ -2176,13 +1962,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:
@@ -2196,38 +1980,24 @@ 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: |-
@@ -2269,12 +2039,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
@@ -2297,15 +2062,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.
@@ -2326,7 +2088,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])?)*$
@@ -2336,14 +2097,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
@@ -2353,7 +2111,6 @@ spec:
description: |-
Name is the name of the referent.
-
Support: Core
maxLength: 253
minLength: 1
@@ -2363,7 +2120,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:
@@ -2371,12 +2127,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
@@ -2384,7 +2138,6 @@ spec:
ParentRef of the Route.
-
Support: Core
maxLength: 63
minLength: 1
@@ -2395,7 +2148,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
@@ -2405,18 +2157,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,
@@ -2425,7 +2174,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
@@ -2436,7 +2184,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.
@@ -2444,12 +2191,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
@@ -2459,7 +2204,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
@@ -2494,14 +2238,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
@@ -2509,7 +2251,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
@@ -2546,17 +2287,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`.
@@ -2566,58 +2304,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.
@@ -2640,21 +2368,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
@@ -2664,10 +2387,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
@@ -2675,14 +2396,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,
@@ -2690,12 +2409,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
@@ -2706,22 +2423,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:
@@ -2733,7 +2446,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])?)*$
@@ -2743,14 +2455,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
@@ -2760,7 +2469,6 @@ spec:
description: |-
Name is the name of the referent.
-
Support: Core
maxLength: 253
minLength: 1
@@ -2770,7 +2478,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:
@@ -2778,12 +2485,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
@@ -2791,7 +2496,6 @@ spec:
ParentRef of the Route.
-
Support: Core
maxLength: 63
minLength: 1
@@ -2802,7 +2506,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
@@ -2812,18 +2515,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,
@@ -2832,7 +2532,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
@@ -2843,7 +2542,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.
@@ -2851,12 +2549,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
@@ -2866,7 +2562,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
@@ -2904,7 +2599,6 @@ spec:
description: |+
Rules are a list of GRPC matchers, filters and actions.
-
items:
description: |-
GRPCRouteRule defines the semantics for matching a gRPC request based on
@@ -2916,71 +2610,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:
@@ -2988,7 +2667,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:
@@ -3007,10 +2685,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:
@@ -3042,7 +2718,6 @@ spec:
RequestHeaderModifier defines a schema for a filter that modifies request
headers.
-
Support: Core
properties:
add:
@@ -3051,18 +2726,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
@@ -3076,7 +2748,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
@@ -3108,18 +2779,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
@@ -3133,18 +2801,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
@@ -3158,7 +2823,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
@@ -3190,46 +2854,37 @@ spec:
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:
@@ -3246,20 +2901,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
@@ -3275,13 +2926,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
@@ -3310,11 +2959,9 @@ spec:
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
@@ -3338,11 +2985,9 @@ spec:
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
@@ -3359,7 +3004,6 @@ spec:
ResponseHeaderModifier defines a schema for a filter that modifies response
headers.
-
Support: Extended
properties:
add:
@@ -3368,18 +3012,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
@@ -3393,7 +3034,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
@@ -3425,18 +3065,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
@@ -3450,18 +3087,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
@@ -3475,7 +3109,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
@@ -3506,17 +3139,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
@@ -3524,16 +3154,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
@@ -3596,20 +3223,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
@@ -3625,13 +3248,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
@@ -3658,13 +3279,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
@@ -3684,32 +3303,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: |-
@@ -3727,10 +3340,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:
@@ -3762,7 +3373,6 @@ spec:
RequestHeaderModifier defines a schema for a filter that modifies request
headers.
-
Support: Core
properties:
add:
@@ -3771,18 +3381,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
@@ -3795,7 +3402,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
@@ -3827,18 +3433,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
@@ -3852,18 +3455,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
@@ -3876,7 +3476,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
@@ -3908,46 +3507,37 @@ spec:
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:
@@ -3964,20 +3554,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
@@ -3993,13 +3579,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
@@ -4028,11 +3612,9 @@ spec:
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
@@ -4056,11 +3638,9 @@ spec:
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
@@ -4077,7 +3657,6 @@ spec:
ResponseHeaderModifier defines a schema for a filter that modifies response
headers.
-
Support: Extended
properties:
add:
@@ -4086,18 +3665,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
@@ -4110,7 +3686,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
@@ -4142,18 +3717,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
@@ -4167,18 +3739,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
@@ -4191,7 +3760,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
@@ -4222,17 +3790,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
@@ -4240,16 +3805,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
@@ -4303,10 +3865,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:
@@ -4318,44 +3878,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.
@@ -4365,11 +3916,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:
@@ -4379,7 +3928,6 @@ spec:
- name: "version"
value "v1"
-
```
properties:
headers:
@@ -4396,7 +3944,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
@@ -4439,7 +3986,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
@@ -4448,7 +3994,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
@@ -4458,10 +4003,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
@@ -4490,7 +4033,6 @@ spec:
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
@@ -4501,10 +4043,8 @@ spec:
SessionPersistence defines and configures session persistence
for the route rule.
-
Support: Extended
-
properties:
absoluteTimeout:
description: |-
@@ -4512,7 +4052,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
@@ -4521,7 +4060,6 @@ spec:
CookieConfig provides configuration settings that are specific
to cookie-based session persistence.
-
Support: Core
properties:
lifetimeType:
@@ -4533,20 +4071,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
@@ -4559,7 +4093,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
@@ -4570,7 +4103,6 @@ spec:
should avoid reusing session names to prevent unintended
consequences, such as rejection or unpredictable behavior.
-
Support: Implementation-specific
maxLength: 128
type: string
@@ -4581,10 +4113,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
@@ -4636,13 +4166,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:
@@ -4656,38 +4184,24 @@ 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: |-
@@ -4729,12 +4243,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
@@ -4757,15 +4266,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.
@@ -4786,7 +4292,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])?)*$
@@ -4796,14 +4301,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
@@ -4813,7 +4315,6 @@ spec:
description: |-
Name is the name of the referent.
-
Support: Core
maxLength: 253
minLength: 1
@@ -4823,7 +4324,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:
@@ -4831,12 +4331,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
@@ -4844,7 +4342,6 @@ spec:
ParentRef of the Route.
-
Support: Core
maxLength: 63
minLength: 1
@@ -4855,7 +4352,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
@@ -4865,18 +4361,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,
@@ -4885,7 +4378,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
@@ -4896,7 +4388,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.
@@ -4904,12 +4395,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
@@ -4919,7 +4408,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/config/crd/experimental/gateway.networking.k8s.io_httproutes.yaml b/config/crd/experimental/gateway.networking.k8s.io_httproutes.yaml
index e72d02c694..8722dfd1f8 100644
--- a/config/crd/experimental/gateway.networking.k8s.io_httproutes.yaml
+++ b/config/crd/experimental/gateway.networking.k8s.io_httproutes.yaml
@@ -62,21 +62,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`.
@@ -87,55 +83,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.
@@ -158,21 +144,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
@@ -182,10 +163,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
@@ -193,14 +172,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,
@@ -208,12 +185,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
@@ -224,22 +199,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:
@@ -251,7 +222,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])?)*$
@@ -261,14 +231,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
@@ -278,7 +245,6 @@ spec:
description: |-
Name is the name of the referent.
-
Support: Core
maxLength: 253
minLength: 1
@@ -288,7 +254,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:
@@ -296,12 +261,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
@@ -309,7 +272,6 @@ spec:
ParentRef of the Route.
-
Support: Core
maxLength: 63
minLength: 1
@@ -320,7 +282,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
@@ -330,18 +291,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,
@@ -350,7 +308,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
@@ -361,7 +318,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.
@@ -369,12 +325,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
@@ -384,7 +338,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
@@ -427,7 +380,6 @@ spec:
description: |+
Rules are a list of HTTP matchers, filters and actions.
-
items:
description: |-
HTTPRouteRule defines semantics for matching an HTTP request based on
@@ -439,80 +391,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:
@@ -520,7 +455,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:
@@ -539,10 +473,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:
@@ -574,7 +506,6 @@ spec:
RequestHeaderModifier defines a schema for a filter that modifies request
headers.
-
Support: Core
properties:
add:
@@ -583,18 +514,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
@@ -608,7 +536,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
@@ -640,18 +567,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
@@ -665,18 +589,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
@@ -690,7 +611,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
@@ -722,46 +642,37 @@ spec:
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:
@@ -778,20 +689,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
@@ -807,13 +714,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
@@ -842,11 +747,9 @@ spec:
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
@@ -870,11 +773,9 @@ spec:
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
@@ -891,7 +792,6 @@ spec:
RequestRedirect defines a schema for a filter that responds to the
request with an HTTP redirection.
-
Support: Core
properties:
hostname:
@@ -900,7 +800,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
@@ -912,7 +811,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:
@@ -928,32 +826,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:
@@ -961,11 +844,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`.
@@ -998,11 +879,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
@@ -1010,17 +889,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
@@ -1031,20 +907,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
@@ -1055,16 +927,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
@@ -1076,7 +945,6 @@ spec:
ResponseHeaderModifier defines a schema for a filter that modifies response
headers.
-
Support: Extended
properties:
add:
@@ -1085,18 +953,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
@@ -1110,7 +975,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
@@ -1142,18 +1006,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
@@ -1167,18 +1028,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
@@ -1192,7 +1050,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
@@ -1223,17 +1080,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
@@ -1242,20 +1096,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`.
@@ -1271,7 +1121,6 @@ spec:
description: |-
URLRewrite defines a schema for a filter that modifies a request during forwarding.
-
Support: Extended
properties:
hostname:
@@ -1279,7 +1128,6 @@ spec:
Hostname is the value to be used to replace the Host header value during
forwarding.
-
Support: Extended
maxLength: 253
minLength: 1
@@ -1289,7 +1137,6 @@ spec:
description: |-
Path defines a path rewrite.
-
Support: Extended
properties:
replaceFullPath:
@@ -1305,32 +1152,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:
@@ -1338,11 +1170,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`.
@@ -1455,20 +1285,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
@@ -1484,13 +1310,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
@@ -1517,13 +1341,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
@@ -1543,37 +1365,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
@@ -1582,7 +1397,6 @@ spec:
`False`, implementations may use the `IncompatibleFilters` reason to specify
this configuration error.
-
Support: Core
items:
description: |-
@@ -1600,10 +1414,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:
@@ -1635,7 +1447,6 @@ spec:
RequestHeaderModifier defines a schema for a filter that modifies request
headers.
-
Support: Core
properties:
add:
@@ -1644,18 +1455,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
@@ -1668,7 +1476,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
@@ -1700,18 +1507,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
@@ -1725,18 +1529,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
@@ -1749,7 +1550,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
@@ -1781,46 +1581,37 @@ spec:
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:
@@ -1837,20 +1628,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
@@ -1866,13 +1653,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
@@ -1901,11 +1686,9 @@ spec:
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
@@ -1929,11 +1712,9 @@ spec:
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
@@ -1950,7 +1731,6 @@ spec:
RequestRedirect defines a schema for a filter that responds to the
request with an HTTP redirection.
-
Support: Core
properties:
hostname:
@@ -1959,7 +1739,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
@@ -1971,7 +1750,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:
@@ -1987,32 +1765,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:
@@ -2020,11 +1783,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`.
@@ -2057,11 +1818,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
@@ -2069,17 +1828,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
@@ -2090,20 +1846,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
@@ -2114,16 +1866,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
@@ -2135,7 +1884,6 @@ spec:
ResponseHeaderModifier defines a schema for a filter that modifies response
headers.
-
Support: Extended
properties:
add:
@@ -2144,18 +1892,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
@@ -2168,7 +1913,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
@@ -2200,18 +1944,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
@@ -2225,18 +1966,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
@@ -2249,7 +1987,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
@@ -2280,17 +2017,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
@@ -2299,20 +2033,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`.
@@ -2328,7 +2058,6 @@ spec:
description: |-
URLRewrite defines a schema for a filter that modifies a request during forwarding.
-
Support: Extended
properties:
hostname:
@@ -2336,7 +2065,6 @@ spec:
Hostname is the value to be used to replace the Host header value during
forwarding.
-
Support: Extended
maxLength: 253
minLength: 1
@@ -2346,7 +2074,6 @@ spec:
description: |-
Path defines a path rewrite.
-
Support: Extended
properties:
replaceFullPath:
@@ -2362,32 +2089,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:
@@ -2395,11 +2107,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`.
@@ -2500,10 +2210,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:
@@ -2515,65 +2223,54 @@ 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
+ 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\n```"
+ \ value \"v1\"\n\n```"
properties:
headers:
description: |-
@@ -2590,14 +2287,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:
@@ -2612,13 +2307,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
@@ -2648,7 +2340,6 @@ spec:
When specified, this route will be matched only if the request has the
specified method.
-
Support: Extended
enum:
- GET
@@ -2674,10 +2365,8 @@ spec:
description: |-
Type specifies how to match against the path Value.
-
Support: Core (Exact, PathPrefix)
-
Support: Implementation-specific (RegularExpression)
enum:
- Exact
@@ -2742,7 +2431,6 @@ spec:
values are ANDed together, meaning, a request must match all the
specified query parameters to select the route.
-
Support: Extended
items:
description: |-
@@ -2755,12 +2443,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
@@ -2768,7 +2454,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
@@ -2780,13 +2465,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
@@ -2817,7 +2499,6 @@ spec:
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
@@ -2827,25 +2508,20 @@ spec:
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:
@@ -2853,20 +2529,17 @@ spec:
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
@@ -2874,24 +2547,20 @@ spec:
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
@@ -2900,31 +2569,25 @@ spec:
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
@@ -2936,10 +2599,8 @@ spec:
SessionPersistence defines and configures session persistence
for the route rule.
-
Support: Extended
-
properties:
absoluteTimeout:
description: |-
@@ -2947,7 +2608,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
@@ -2956,7 +2616,6 @@ spec:
CookieConfig provides configuration settings that are specific
to cookie-based session persistence.
-
Support: Core
properties:
lifetimeType:
@@ -2968,20 +2627,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
@@ -2994,7 +2649,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
@@ -3005,7 +2659,6 @@ spec:
should avoid reusing session names to prevent unintended
consequences, such as rejection or unpredictable behavior.
-
Support: Implementation-specific
maxLength: 128
type: string
@@ -3016,10 +2669,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
@@ -3035,7 +2686,6 @@ spec:
description: |-
Timeouts defines the timeouts that can be configured for an HTTP request.
-
Support: Extended
properties:
backendRequest:
@@ -3044,24 +2694,20 @@ 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.
-
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}$
type: string
@@ -3071,28 +2717,23 @@ 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.
-
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}$
type: string
@@ -3177,13 +2818,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:
@@ -3197,38 +2836,24 @@ 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: |-
@@ -3270,12 +2895,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
@@ -3298,15 +2918,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.
@@ -3327,7 +2944,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])?)*$
@@ -3337,14 +2953,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
@@ -3354,7 +2967,6 @@ spec:
description: |-
Name is the name of the referent.
-
Support: Core
maxLength: 253
minLength: 1
@@ -3364,7 +2976,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:
@@ -3372,12 +2983,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
@@ -3385,7 +2994,6 @@ spec:
ParentRef of the Route.
-
Support: Core
maxLength: 63
minLength: 1
@@ -3396,7 +3004,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
@@ -3406,18 +3013,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,
@@ -3426,7 +3030,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
@@ -3437,7 +3040,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.
@@ -3445,12 +3047,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
@@ -3460,7 +3060,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
@@ -3529,21 +3128,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`.
@@ -3554,55 +3149,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.
@@ -3625,21 +3210,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
@@ -3649,10 +3229,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
@@ -3660,14 +3238,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,
@@ -3675,12 +3251,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
@@ -3691,22 +3265,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:
@@ -3718,7 +3288,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])?)*$
@@ -3728,14 +3297,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
@@ -3745,7 +3311,6 @@ spec:
description: |-
Name is the name of the referent.
-
Support: Core
maxLength: 253
minLength: 1
@@ -3755,7 +3320,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:
@@ -3763,12 +3327,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
@@ -3776,7 +3338,6 @@ spec:
ParentRef of the Route.
-
Support: Core
maxLength: 63
minLength: 1
@@ -3787,7 +3348,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
@@ -3797,18 +3357,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,
@@ -3817,7 +3374,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
@@ -3828,7 +3384,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.
@@ -3836,12 +3391,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
@@ -3851,7 +3404,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
@@ -3894,7 +3446,6 @@ spec:
description: |+
Rules are a list of HTTP matchers, filters and actions.
-
items:
description: |-
HTTPRouteRule defines semantics for matching an HTTP request based on
@@ -3906,80 +3457,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:
@@ -3987,7 +3521,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:
@@ -4006,10 +3539,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:
@@ -4041,7 +3572,6 @@ spec:
RequestHeaderModifier defines a schema for a filter that modifies request
headers.
-
Support: Core
properties:
add:
@@ -4050,18 +3580,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
@@ -4075,7 +3602,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
@@ -4107,18 +3633,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
@@ -4132,18 +3655,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
@@ -4157,7 +3677,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
@@ -4189,46 +3708,37 @@ spec:
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:
@@ -4245,20 +3755,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
@@ -4274,13 +3780,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
@@ -4309,11 +3813,9 @@ spec:
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
@@ -4337,11 +3839,9 @@ spec:
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
@@ -4358,7 +3858,6 @@ spec:
RequestRedirect defines a schema for a filter that responds to the
request with an HTTP redirection.
-
Support: Core
properties:
hostname:
@@ -4367,7 +3866,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
@@ -4379,7 +3877,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:
@@ -4395,32 +3892,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:
@@ -4428,11 +3910,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`.
@@ -4465,11 +3945,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
@@ -4477,17 +3955,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
@@ -4498,20 +3973,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
@@ -4522,16 +3993,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
@@ -4543,7 +4011,6 @@ spec:
ResponseHeaderModifier defines a schema for a filter that modifies response
headers.
-
Support: Extended
properties:
add:
@@ -4552,18 +4019,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
@@ -4577,7 +4041,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
@@ -4609,18 +4072,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
@@ -4634,18 +4094,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
@@ -4659,7 +4116,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
@@ -4690,17 +4146,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
@@ -4709,20 +4162,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`.
@@ -4738,7 +4187,6 @@ spec:
description: |-
URLRewrite defines a schema for a filter that modifies a request during forwarding.
-
Support: Extended
properties:
hostname:
@@ -4746,7 +4194,6 @@ spec:
Hostname is the value to be used to replace the Host header value during
forwarding.
-
Support: Extended
maxLength: 253
minLength: 1
@@ -4756,7 +4203,6 @@ spec:
description: |-
Path defines a path rewrite.
-
Support: Extended
properties:
replaceFullPath:
@@ -4772,32 +4218,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:
@@ -4805,11 +4236,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`.
@@ -4922,20 +4351,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
@@ -4951,13 +4376,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
@@ -4984,13 +4407,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
@@ -5010,37 +4431,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
@@ -5049,7 +4463,6 @@ spec:
`False`, implementations may use the `IncompatibleFilters` reason to specify
this configuration error.
-
Support: Core
items:
description: |-
@@ -5067,10 +4480,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:
@@ -5102,7 +4513,6 @@ spec:
RequestHeaderModifier defines a schema for a filter that modifies request
headers.
-
Support: Core
properties:
add:
@@ -5111,18 +4521,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
@@ -5135,7 +4542,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
@@ -5167,18 +4573,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
@@ -5192,18 +4595,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
@@ -5216,7 +4616,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
@@ -5248,46 +4647,37 @@ spec:
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:
@@ -5304,20 +4694,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
@@ -5333,13 +4719,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
@@ -5368,11 +4752,9 @@ spec:
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
@@ -5396,11 +4778,9 @@ spec:
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
@@ -5417,7 +4797,6 @@ spec:
RequestRedirect defines a schema for a filter that responds to the
request with an HTTP redirection.
-
Support: Core
properties:
hostname:
@@ -5426,7 +4805,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
@@ -5438,7 +4816,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:
@@ -5454,32 +4831,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:
@@ -5487,11 +4849,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`.
@@ -5524,11 +4884,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
@@ -5536,17 +4894,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
@@ -5557,20 +4912,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
@@ -5581,16 +4932,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
@@ -5602,7 +4950,6 @@ spec:
ResponseHeaderModifier defines a schema for a filter that modifies response
headers.
-
Support: Extended
properties:
add:
@@ -5611,18 +4958,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
@@ -5635,7 +4979,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
@@ -5667,18 +5010,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
@@ -5692,18 +5032,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
@@ -5716,7 +5053,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
@@ -5747,17 +5083,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
@@ -5766,20 +5099,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`.
@@ -5795,7 +5124,6 @@ spec:
description: |-
URLRewrite defines a schema for a filter that modifies a request during forwarding.
-
Support: Extended
properties:
hostname:
@@ -5803,7 +5131,6 @@ spec:
Hostname is the value to be used to replace the Host header value during
forwarding.
-
Support: Extended
maxLength: 253
minLength: 1
@@ -5813,7 +5140,6 @@ spec:
description: |-
Path defines a path rewrite.
-
Support: Extended
properties:
replaceFullPath:
@@ -5829,32 +5155,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:
@@ -5862,11 +5173,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`.
@@ -5967,10 +5276,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:
@@ -5982,65 +5289,54 @@ 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
+ 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\n```"
+ \ value \"v1\"\n\n```"
properties:
headers:
description: |-
@@ -6057,14 +5353,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:
@@ -6079,13 +5373,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
@@ -6115,7 +5406,6 @@ spec:
When specified, this route will be matched only if the request has the
specified method.
-
Support: Extended
enum:
- GET
@@ -6141,10 +5431,8 @@ spec:
description: |-
Type specifies how to match against the path Value.
-
Support: Core (Exact, PathPrefix)
-
Support: Implementation-specific (RegularExpression)
enum:
- Exact
@@ -6209,7 +5497,6 @@ spec:
values are ANDed together, meaning, a request must match all the
specified query parameters to select the route.
-
Support: Extended
items:
description: |-
@@ -6222,12 +5509,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
@@ -6235,7 +5520,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
@@ -6247,13 +5531,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
@@ -6284,7 +5565,6 @@ spec:
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
@@ -6294,25 +5574,20 @@ spec:
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:
@@ -6320,20 +5595,17 @@ spec:
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
@@ -6341,24 +5613,20 @@ spec:
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
@@ -6367,31 +5635,25 @@ spec:
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
@@ -6403,10 +5665,8 @@ spec:
SessionPersistence defines and configures session persistence
for the route rule.
-
Support: Extended
-
properties:
absoluteTimeout:
description: |-
@@ -6414,7 +5674,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
@@ -6423,7 +5682,6 @@ spec:
CookieConfig provides configuration settings that are specific
to cookie-based session persistence.
-
Support: Core
properties:
lifetimeType:
@@ -6435,20 +5693,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
@@ -6461,7 +5715,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
@@ -6472,7 +5725,6 @@ spec:
should avoid reusing session names to prevent unintended
consequences, such as rejection or unpredictable behavior.
-
Support: Implementation-specific
maxLength: 128
type: string
@@ -6483,10 +5735,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
@@ -6502,7 +5752,6 @@ spec:
description: |-
Timeouts defines the timeouts that can be configured for an HTTP request.
-
Support: Extended
properties:
backendRequest:
@@ -6511,24 +5760,20 @@ 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.
-
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}$
type: string
@@ -6538,28 +5783,23 @@ 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.
-
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}$
type: string
@@ -6644,13 +5884,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:
@@ -6664,38 +5902,24 @@ 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: |-
@@ -6737,12 +5961,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
@@ -6765,15 +5984,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.
@@ -6794,7 +6010,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])?)*$
@@ -6804,14 +6019,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
@@ -6821,7 +6033,6 @@ spec:
description: |-
Name is the name of the referent.
-
Support: Core
maxLength: 253
minLength: 1
@@ -6831,7 +6042,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:
@@ -6839,12 +6049,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
@@ -6852,7 +6060,6 @@ spec:
ParentRef of the Route.
-
Support: Core
maxLength: 63
minLength: 1
@@ -6863,7 +6070,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
@@ -6873,18 +6079,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,
@@ -6893,7 +6096,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
@@ -6904,7 +6106,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.
@@ -6912,12 +6113,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
@@ -6927,7 +6126,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/config/crd/experimental/gateway.networking.k8s.io_referencegrants.yaml b/config/crd/experimental/gateway.networking.k8s.io_referencegrants.yaml
index 9ca8fdcd50..7000558195 100644
--- a/config/crd/experimental/gateway.networking.k8s.io_referencegrants.yaml
+++ b/config/crd/experimental/gateway.networking.k8s.io_referencegrants.yaml
@@ -35,12 +35,10 @@ 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.
-
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
@@ -48,7 +46,6 @@ spec:
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
@@ -82,7 +79,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
@@ -93,7 +89,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])?)*$
@@ -104,16 +99,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
@@ -127,7 +118,6 @@ spec:
description: |-
Namespace is the namespace of the referent.
-
Support: Core
maxLength: 63
minLength: 1
@@ -148,7 +138,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: |-
@@ -160,7 +149,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])?)*$
@@ -171,7 +159,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
@@ -213,16 +200,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
@@ -256,7 +240,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
@@ -267,7 +250,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])?)*$
@@ -278,16 +260,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
@@ -301,7 +279,6 @@ spec:
description: |-
Namespace is the namespace of the referent.
-
Support: Core
maxLength: 63
minLength: 1
@@ -322,7 +299,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: |-
@@ -334,7 +310,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])?)*$
@@ -345,7 +320,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
diff --git a/config/crd/experimental/gateway.networking.k8s.io_tcproutes.yaml b/config/crd/experimental/gateway.networking.k8s.io_tcproutes.yaml
index 81ae85c566..ec1f383aa9 100644
--- a/config/crd/experimental/gateway.networking.k8s.io_tcproutes.yaml
+++ b/config/crd/experimental/gateway.networking.k8s.io_tcproutes.yaml
@@ -63,21 +63,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
@@ -87,10 +82,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
@@ -98,14 +91,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,
@@ -113,12 +104,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
@@ -129,22 +118,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:
@@ -156,7 +141,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])?)*$
@@ -166,14 +150,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
@@ -183,7 +164,6 @@ spec:
description: |-
Name is the name of the referent.
-
Support: Core
maxLength: 253
minLength: 1
@@ -193,7 +173,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:
@@ -201,12 +180,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
@@ -214,7 +191,6 @@ spec:
ParentRef of the Route.
-
Support: Core
maxLength: 63
minLength: 1
@@ -225,7 +201,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
@@ -235,18 +210,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,
@@ -255,7 +227,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
@@ -266,7 +237,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.
@@ -274,12 +244,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
@@ -289,7 +257,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
@@ -327,7 +294,6 @@ spec:
description: |+
Rules are a list of TCP matchers and actions.
-
items:
description: TCPRouteRule is the configuration for a given rule.
properties:
@@ -340,53 +306,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.
@@ -405,20 +359,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
@@ -434,13 +384,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
@@ -467,13 +415,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
@@ -493,7 +439,6 @@ spec:
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
@@ -522,13 +467,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:
@@ -542,38 +485,24 @@ 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: |-
@@ -615,12 +544,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
@@ -643,15 +567,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.
@@ -672,7 +593,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])?)*$
@@ -682,14 +602,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
@@ -699,7 +616,6 @@ spec:
description: |-
Name is the name of the referent.
-
Support: Core
maxLength: 253
minLength: 1
@@ -709,7 +625,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:
@@ -717,12 +632,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
@@ -730,7 +643,6 @@ spec:
ParentRef of the Route.
-
Support: Core
maxLength: 63
minLength: 1
@@ -741,7 +653,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
@@ -751,18 +662,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,
@@ -771,7 +679,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
@@ -782,7 +689,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.
@@ -790,12 +696,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
@@ -805,7 +709,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/config/crd/experimental/gateway.networking.k8s.io_tlsroutes.yaml b/config/crd/experimental/gateway.networking.k8s.io_tlsroutes.yaml
index aadc14594c..68bd56dea5 100644
--- a/config/crd/experimental/gateway.networking.k8s.io_tlsroutes.yaml
+++ b/config/crd/experimental/gateway.networking.k8s.io_tlsroutes.yaml
@@ -30,7 +30,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:
@@ -60,17 +59,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`.
@@ -80,37 +76,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.
@@ -133,21 +123,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
@@ -157,10 +142,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
@@ -168,14 +151,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,
@@ -183,12 +164,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
@@ -199,22 +178,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:
@@ -226,7 +201,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])?)*$
@@ -236,14 +210,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
@@ -253,7 +224,6 @@ spec:
description: |-
Name is the name of the referent.
-
Support: Core
maxLength: 253
minLength: 1
@@ -263,7 +233,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:
@@ -271,12 +240,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
@@ -284,7 +251,6 @@ spec:
ParentRef of the Route.
-
Support: Core
maxLength: 63
minLength: 1
@@ -295,7 +261,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
@@ -305,18 +270,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,
@@ -325,7 +287,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
@@ -336,7 +297,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.
@@ -344,12 +304,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
@@ -359,7 +317,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
@@ -397,7 +354,6 @@ spec:
description: |+
Rules are a list of TLS matchers and actions.
-
items:
description: TLSRouteRule is the configuration for a given rule.
properties:
@@ -413,53 +369,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.
@@ -478,20 +422,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
@@ -507,13 +447,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
@@ -540,13 +478,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
@@ -566,7 +502,6 @@ spec:
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
@@ -595,13 +530,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:
@@ -615,38 +548,24 @@ 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: |-
@@ -688,12 +607,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
@@ -716,15 +630,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.
@@ -745,7 +656,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])?)*$
@@ -755,14 +665,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
@@ -772,7 +679,6 @@ spec:
description: |-
Name is the name of the referent.
-
Support: Core
maxLength: 253
minLength: 1
@@ -782,7 +688,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:
@@ -790,12 +695,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
@@ -803,7 +706,6 @@ spec:
ParentRef of the Route.
-
Support: Core
maxLength: 63
minLength: 1
@@ -814,7 +716,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
@@ -824,18 +725,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,
@@ -844,7 +742,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
@@ -855,7 +752,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.
@@ -863,12 +759,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
@@ -878,7 +772,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/config/crd/experimental/gateway.networking.k8s.io_udproutes.yaml b/config/crd/experimental/gateway.networking.k8s.io_udproutes.yaml
index 45e28da0bb..157ddd6c62 100644
--- a/config/crd/experimental/gateway.networking.k8s.io_udproutes.yaml
+++ b/config/crd/experimental/gateway.networking.k8s.io_udproutes.yaml
@@ -63,21 +63,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
@@ -87,10 +82,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
@@ -98,14 +91,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,
@@ -113,12 +104,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
@@ -129,22 +118,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:
@@ -156,7 +141,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])?)*$
@@ -166,14 +150,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
@@ -183,7 +164,6 @@ spec:
description: |-
Name is the name of the referent.
-
Support: Core
maxLength: 253
minLength: 1
@@ -193,7 +173,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:
@@ -201,12 +180,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
@@ -214,7 +191,6 @@ spec:
ParentRef of the Route.
-
Support: Core
maxLength: 63
minLength: 1
@@ -225,7 +201,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
@@ -235,18 +210,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,
@@ -255,7 +227,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
@@ -266,7 +237,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.
@@ -274,12 +244,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
@@ -289,7 +257,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
@@ -327,7 +294,6 @@ spec:
description: |+
Rules are a list of UDP matchers and actions.
-
items:
description: UDPRouteRule is the configuration for a given rule.
properties:
@@ -340,53 +306,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.
@@ -405,20 +359,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
@@ -434,13 +384,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
@@ -467,13 +415,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
@@ -493,7 +439,6 @@ spec:
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
@@ -522,13 +467,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:
@@ -542,38 +485,24 @@ 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: |-
@@ -615,12 +544,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
@@ -643,15 +567,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.
@@ -672,7 +593,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])?)*$
@@ -682,14 +602,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
@@ -699,7 +616,6 @@ spec:
description: |-
Name is the name of the referent.
-
Support: Core
maxLength: 253
minLength: 1
@@ -709,7 +625,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:
@@ -717,12 +632,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
@@ -730,7 +643,6 @@ spec:
ParentRef of the Route.
-
Support: Core
maxLength: 63
minLength: 1
@@ -741,7 +653,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
@@ -751,18 +662,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,
@@ -771,7 +679,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
@@ -782,7 +689,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.
@@ -790,12 +696,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
@@ -805,7 +709,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/config/crd/standard/gateway.networking.k8s.io_gatewayclasses.yaml b/config/crd/standard/gateway.networking.k8s.io_gatewayclasses.yaml
index f394528039..fcc7a9e905 100644
--- a/config/crd/standard/gateway.networking.k8s.io_gatewayclasses.yaml
+++ b/config/crd/standard/gateway.networking.k8s.io_gatewayclasses.yaml
@@ -41,7 +41,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
@@ -50,13 +49,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:
@@ -84,13 +81,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
@@ -109,23 +103,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, 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:
@@ -172,7 +162,6 @@ spec:
description: |-
Status defines the current state of GatewayClass.
-
Implementations MUST populate status on all GatewayClass resources which
specify their controller name.
properties:
@@ -187,20 +176,11 @@ 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: |-
@@ -241,12 +221,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
@@ -291,7 +266,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
@@ -300,13 +274,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:
@@ -334,13 +306,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
@@ -359,23 +328,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, 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:
@@ -422,7 +387,6 @@ spec:
description: |-
Status defines the current state of GatewayClass.
-
Implementations MUST populate status on all GatewayClass resources which
specify their controller name.
properties:
@@ -437,20 +401,11 @@ 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: |-
@@ -491,12 +446,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
diff --git a/config/crd/standard/gateway.networking.k8s.io_gateways.yaml b/config/crd/standard/gateway.networking.k8s.io_gateways.yaml
index ce4e083b01..1e80e4b158 100644
--- a/config/crd/standard/gateway.networking.k8s.io_gateways.yaml
+++ b/config/crd/standard/gateway.networking.k8s.io_gateways.yaml
@@ -67,27 +67,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.
@@ -118,7 +113,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
@@ -151,7 +145,6 @@ spec:
description: |-
Infrastructure defines infrastructure level attributes about this Gateway instance.
-
Support: Extended
properties:
annotations:
@@ -167,14 +160,11 @@ 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
@@ -196,10 +186,8 @@ spec:
* 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
@@ -210,18 +198,14 @@ spec:
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
@@ -238,15 +222,12 @@ spec:
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:
@@ -277,7 +258,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
@@ -285,42 +265,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
@@ -328,45 +298,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
@@ -376,7 +338,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
@@ -384,26 +345,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
@@ -411,11 +367,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: |-
@@ -431,12 +385,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
@@ -445,7 +397,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,
@@ -453,7 +404,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:
@@ -462,14 +412,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
@@ -499,7 +447,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:
@@ -508,13 +455,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
@@ -527,7 +472,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:
@@ -582,11 +526,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
@@ -594,19 +536,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
@@ -617,7 +556,6 @@ spec:
Name is the name of the Listener. This name MUST be unique within a
Gateway.
-
Support: Core
maxLength: 253
minLength: 1
@@ -628,7 +566,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
@@ -638,7 +575,6 @@ spec:
description: |-
Protocol specifies the network protocol this listener expects to receive.
-
Support: Core
maxLength: 255
minLength: 1
@@ -650,15 +586,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:
@@ -668,41 +601,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.
@@ -733,13 +658,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
@@ -756,7 +679,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
@@ -766,7 +688,6 @@ spec:
the ClientHello message of the TLS protocol. The certificateRefs field
is ignored in this mode.
-
Support: Core
enum:
- Terminate
@@ -787,13 +708,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
@@ -856,16 +775,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.
@@ -896,7 +812,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
@@ -926,30 +841,19 @@ 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: |-
@@ -990,12 +894,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
@@ -1022,7 +921,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
@@ -1035,7 +933,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
@@ -1044,18 +941,8 @@ spec:
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: |-
@@ -1097,12 +984,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
@@ -1131,7 +1013,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
@@ -1224,27 +1105,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.
@@ -1275,7 +1151,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
@@ -1308,7 +1183,6 @@ spec:
description: |-
Infrastructure defines infrastructure level attributes about this Gateway instance.
-
Support: Extended
properties:
annotations:
@@ -1324,14 +1198,11 @@ 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
@@ -1353,10 +1224,8 @@ spec:
* 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
@@ -1367,18 +1236,14 @@ spec:
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
@@ -1395,15 +1260,12 @@ spec:
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:
@@ -1434,7 +1296,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
@@ -1442,42 +1303,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
@@ -1485,45 +1336,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
@@ -1533,7 +1376,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
@@ -1541,26 +1383,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
@@ -1568,11 +1405,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: |-
@@ -1588,12 +1423,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
@@ -1602,7 +1435,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,
@@ -1610,7 +1442,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:
@@ -1619,14 +1450,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
@@ -1656,7 +1485,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:
@@ -1665,13 +1493,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
@@ -1684,7 +1510,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:
@@ -1739,11 +1564,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
@@ -1751,19 +1574,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
@@ -1774,7 +1594,6 @@ spec:
Name is the name of the Listener. This name MUST be unique within a
Gateway.
-
Support: Core
maxLength: 253
minLength: 1
@@ -1785,7 +1604,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
@@ -1795,7 +1613,6 @@ spec:
description: |-
Protocol specifies the network protocol this listener expects to receive.
-
Support: Core
maxLength: 255
minLength: 1
@@ -1807,15 +1624,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:
@@ -1825,41 +1639,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.
@@ -1890,13 +1696,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
@@ -1913,7 +1717,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
@@ -1923,7 +1726,6 @@ spec:
the ClientHello message of the TLS protocol. The certificateRefs field
is ignored in this mode.
-
Support: Core
enum:
- Terminate
@@ -1944,13 +1746,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
@@ -2013,16 +1813,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.
@@ -2053,7 +1850,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
@@ -2083,30 +1879,19 @@ 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: |-
@@ -2147,12 +1932,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
@@ -2179,7 +1959,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
@@ -2192,7 +1971,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
@@ -2201,18 +1979,8 @@ spec:
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: |-
@@ -2254,12 +2022,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
@@ -2288,7 +2051,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
diff --git a/config/crd/standard/gateway.networking.k8s.io_grpcroutes.yaml b/config/crd/standard/gateway.networking.k8s.io_grpcroutes.yaml
index d11f0b279b..1dab6e7c64 100644
--- a/config/crd/standard/gateway.networking.k8s.io_grpcroutes.yaml
+++ b/config/crd/standard/gateway.networking.k8s.io_grpcroutes.yaml
@@ -34,14 +34,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
@@ -49,7 +47,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
@@ -86,17 +83,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`.
@@ -106,58 +100,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.
@@ -180,21 +164,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
@@ -204,10 +183,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
@@ -215,14 +192,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,
@@ -234,23 +209,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:
@@ -262,7 +232,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])?)*$
@@ -272,14 +241,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
@@ -289,7 +255,6 @@ spec:
description: |-
Name is the name of the referent.
-
Support: Core
maxLength: 253
minLength: 1
@@ -299,7 +264,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:
@@ -308,8 +272,6 @@ spec:
-
-
Support: Core
maxLength: 63
minLength: 1
@@ -320,7 +282,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
@@ -331,13 +292,10 @@ spec:
-
-
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,
@@ -346,7 +304,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
@@ -357,7 +314,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.
@@ -365,12 +321,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
@@ -380,7 +334,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
@@ -415,7 +368,6 @@ spec:
description: |+
Rules are a list of GRPC matchers, filters and actions.
-
items:
description: |-
GRPCRouteRule defines the semantics for matching a gRPC request based on
@@ -427,71 +379,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:
@@ -499,7 +436,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:
@@ -518,10 +454,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:
@@ -553,7 +487,6 @@ spec:
RequestHeaderModifier defines a schema for a filter that modifies request
headers.
-
Support: Core
properties:
add:
@@ -562,18 +495,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
@@ -587,7 +517,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
@@ -619,18 +548,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
@@ -644,18 +570,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
@@ -669,7 +592,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
@@ -701,46 +623,37 @@ spec:
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:
@@ -757,20 +670,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
@@ -786,13 +695,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
@@ -824,7 +731,6 @@ spec:
ResponseHeaderModifier defines a schema for a filter that modifies response
headers.
-
Support: Extended
properties:
add:
@@ -833,18 +739,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
@@ -858,7 +761,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
@@ -890,18 +792,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
@@ -915,18 +814,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
@@ -940,7 +836,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
@@ -971,17 +866,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
@@ -989,16 +881,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
@@ -1061,20 +950,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
@@ -1090,13 +975,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
@@ -1123,13 +1006,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
@@ -1149,32 +1030,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: |-
@@ -1192,10 +1067,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:
@@ -1227,7 +1100,6 @@ spec:
RequestHeaderModifier defines a schema for a filter that modifies request
headers.
-
Support: Core
properties:
add:
@@ -1236,18 +1108,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
@@ -1260,7 +1129,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
@@ -1292,18 +1160,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
@@ -1317,18 +1182,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
@@ -1341,7 +1203,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
@@ -1373,46 +1234,37 @@ spec:
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:
@@ -1429,20 +1281,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
@@ -1458,13 +1306,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
@@ -1496,7 +1342,6 @@ spec:
ResponseHeaderModifier defines a schema for a filter that modifies response
headers.
-
Support: Extended
properties:
add:
@@ -1505,18 +1350,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
@@ -1529,7 +1371,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
@@ -1561,18 +1402,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
@@ -1586,18 +1424,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
@@ -1610,7 +1445,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
@@ -1641,17 +1475,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
@@ -1659,16 +1490,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
@@ -1722,10 +1550,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:
@@ -1737,44 +1563,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.
@@ -1784,11 +1601,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:
@@ -1798,7 +1613,6 @@ spec:
- name: "version"
value "v1"
-
```
properties:
headers:
@@ -1815,7 +1629,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
@@ -1858,7 +1671,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
@@ -1867,7 +1679,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
@@ -1877,10 +1688,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
@@ -1942,13 +1751,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:
@@ -1962,38 +1769,24 @@ 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: |-
@@ -2035,12 +1828,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
@@ -2063,15 +1851,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.
@@ -2092,7 +1877,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])?)*$
@@ -2102,14 +1886,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
@@ -2119,7 +1900,6 @@ spec:
description: |-
Name is the name of the referent.
-
Support: Core
maxLength: 253
minLength: 1
@@ -2129,7 +1909,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:
@@ -2138,8 +1917,6 @@ spec:
-
-
Support: Core
maxLength: 63
minLength: 1
@@ -2150,7 +1927,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
@@ -2161,13 +1937,10 @@ spec:
-
-
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,
@@ -2176,7 +1949,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
@@ -2187,7 +1959,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.
@@ -2195,12 +1966,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
@@ -2210,7 +1979,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
@@ -2245,14 +2013,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
@@ -2260,7 +2026,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
@@ -2297,17 +2062,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`.
@@ -2317,58 +2079,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.
@@ -2391,21 +2143,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
@@ -2415,10 +2162,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
@@ -2426,14 +2171,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,
@@ -2445,23 +2188,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:
@@ -2473,7 +2211,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])?)*$
@@ -2483,14 +2220,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
@@ -2500,7 +2234,6 @@ spec:
description: |-
Name is the name of the referent.
-
Support: Core
maxLength: 253
minLength: 1
@@ -2510,7 +2243,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:
@@ -2519,8 +2251,6 @@ spec:
-
-
Support: Core
maxLength: 63
minLength: 1
@@ -2531,7 +2261,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
@@ -2542,13 +2271,10 @@ spec:
-
-
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,
@@ -2557,7 +2283,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
@@ -2568,7 +2293,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.
@@ -2576,12 +2300,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
@@ -2591,7 +2313,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
@@ -2626,7 +2347,6 @@ spec:
description: |+
Rules are a list of GRPC matchers, filters and actions.
-
items:
description: |-
GRPCRouteRule defines the semantics for matching a gRPC request based on
@@ -2638,71 +2358,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:
@@ -2710,7 +2415,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:
@@ -2729,10 +2433,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:
@@ -2764,7 +2466,6 @@ spec:
RequestHeaderModifier defines a schema for a filter that modifies request
headers.
-
Support: Core
properties:
add:
@@ -2773,18 +2474,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
@@ -2798,7 +2496,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
@@ -2830,18 +2527,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
@@ -2855,18 +2549,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
@@ -2880,7 +2571,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
@@ -2912,46 +2602,37 @@ spec:
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:
@@ -2968,20 +2649,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
@@ -2997,13 +2674,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
@@ -3035,7 +2710,6 @@ spec:
ResponseHeaderModifier defines a schema for a filter that modifies response
headers.
-
Support: Extended
properties:
add:
@@ -3044,18 +2718,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
@@ -3069,7 +2740,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
@@ -3101,18 +2771,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
@@ -3126,18 +2793,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
@@ -3151,7 +2815,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
@@ -3182,17 +2845,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
@@ -3200,16 +2860,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
@@ -3272,20 +2929,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
@@ -3301,13 +2954,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
@@ -3334,13 +2985,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
@@ -3360,32 +3009,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: |-
@@ -3403,10 +3046,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:
@@ -3438,7 +3079,6 @@ spec:
RequestHeaderModifier defines a schema for a filter that modifies request
headers.
-
Support: Core
properties:
add:
@@ -3447,18 +3087,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
@@ -3471,7 +3108,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
@@ -3503,18 +3139,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
@@ -3528,18 +3161,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
@@ -3552,7 +3182,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
@@ -3584,46 +3213,37 @@ spec:
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:
@@ -3640,20 +3260,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
@@ -3669,13 +3285,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
@@ -3707,7 +3321,6 @@ spec:
ResponseHeaderModifier defines a schema for a filter that modifies response
headers.
-
Support: Extended
properties:
add:
@@ -3716,18 +3329,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
@@ -3740,7 +3350,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
@@ -3772,18 +3381,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
@@ -3797,18 +3403,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
@@ -3821,7 +3424,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
@@ -3852,17 +3454,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
@@ -3870,16 +3469,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
@@ -3933,10 +3529,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:
@@ -3948,44 +3542,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.
@@ -3995,11 +3580,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:
@@ -4009,7 +3592,6 @@ spec:
- name: "version"
value "v1"
-
```
properties:
headers:
@@ -4026,7 +3608,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
@@ -4069,7 +3650,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
@@ -4078,7 +3658,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
@@ -4088,10 +3667,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
@@ -4153,13 +3730,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:
@@ -4173,38 +3748,24 @@ 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: |-
@@ -4246,12 +3807,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
@@ -4274,15 +3830,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.
@@ -4303,7 +3856,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])?)*$
@@ -4313,14 +3865,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
@@ -4330,7 +3879,6 @@ spec:
description: |-
Name is the name of the referent.
-
Support: Core
maxLength: 253
minLength: 1
@@ -4340,7 +3888,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:
@@ -4349,8 +3896,6 @@ spec:
-
-
Support: Core
maxLength: 63
minLength: 1
@@ -4361,7 +3906,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
@@ -4372,13 +3916,10 @@ spec:
-
-
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,
@@ -4387,7 +3928,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
@@ -4398,7 +3938,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.
@@ -4406,12 +3945,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
@@ -4421,7 +3958,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/config/crd/standard/gateway.networking.k8s.io_httproutes.yaml b/config/crd/standard/gateway.networking.k8s.io_httproutes.yaml
index 88aacdec03..21f8b30c08 100644
--- a/config/crd/standard/gateway.networking.k8s.io_httproutes.yaml
+++ b/config/crd/standard/gateway.networking.k8s.io_httproutes.yaml
@@ -62,21 +62,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`.
@@ -87,55 +83,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.
@@ -158,21 +144,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
@@ -182,10 +163,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
@@ -193,14 +172,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,
@@ -212,23 +189,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:
@@ -240,7 +212,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])?)*$
@@ -250,14 +221,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
@@ -267,7 +235,6 @@ spec:
description: |-
Name is the name of the referent.
-
Support: Core
maxLength: 253
minLength: 1
@@ -277,7 +244,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:
@@ -286,8 +252,6 @@ spec:
-
-
Support: Core
maxLength: 63
minLength: 1
@@ -298,7 +262,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
@@ -309,13 +272,10 @@ spec:
-
-
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,
@@ -324,7 +284,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
@@ -335,7 +294,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.
@@ -343,12 +301,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
@@ -358,7 +314,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
@@ -398,7 +353,6 @@ spec:
description: |+
Rules are a list of HTTP matchers, filters and actions.
-
items:
description: |-
HTTPRouteRule defines semantics for matching an HTTP request based on
@@ -410,80 +364,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:
@@ -491,7 +428,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:
@@ -510,10 +446,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:
@@ -545,7 +479,6 @@ spec:
RequestHeaderModifier defines a schema for a filter that modifies request
headers.
-
Support: Core
properties:
add:
@@ -554,18 +487,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
@@ -579,7 +509,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
@@ -611,18 +540,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
@@ -636,18 +562,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
@@ -661,7 +584,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
@@ -693,46 +615,37 @@ spec:
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:
@@ -749,20 +662,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
@@ -778,13 +687,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
@@ -816,7 +723,6 @@ spec:
RequestRedirect defines a schema for a filter that responds to the
request with an HTTP redirection.
-
Support: Core
properties:
hostname:
@@ -825,7 +731,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
@@ -837,7 +742,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:
@@ -853,32 +757,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:
@@ -886,11 +775,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`.
@@ -923,11 +810,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
@@ -935,17 +820,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
@@ -956,20 +838,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
@@ -980,16 +858,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
@@ -1001,7 +876,6 @@ spec:
ResponseHeaderModifier defines a schema for a filter that modifies response
headers.
-
Support: Extended
properties:
add:
@@ -1010,18 +884,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
@@ -1035,7 +906,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
@@ -1067,18 +937,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
@@ -1092,18 +959,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
@@ -1117,7 +981,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
@@ -1148,17 +1011,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
@@ -1167,20 +1027,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`.
@@ -1196,7 +1052,6 @@ spec:
description: |-
URLRewrite defines a schema for a filter that modifies a request during forwarding.
-
Support: Extended
properties:
hostname:
@@ -1204,7 +1059,6 @@ spec:
Hostname is the value to be used to replace the Host header value during
forwarding.
-
Support: Extended
maxLength: 253
minLength: 1
@@ -1214,7 +1068,6 @@ spec:
description: |-
Path defines a path rewrite.
-
Support: Extended
properties:
replaceFullPath:
@@ -1230,32 +1083,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:
@@ -1263,11 +1101,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`.
@@ -1380,20 +1216,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
@@ -1409,13 +1241,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
@@ -1442,13 +1272,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
@@ -1468,37 +1296,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
@@ -1507,7 +1328,6 @@ spec:
`False`, implementations may use the `IncompatibleFilters` reason to specify
this configuration error.
-
Support: Core
items:
description: |-
@@ -1525,10 +1345,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:
@@ -1560,7 +1378,6 @@ spec:
RequestHeaderModifier defines a schema for a filter that modifies request
headers.
-
Support: Core
properties:
add:
@@ -1569,18 +1386,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
@@ -1593,7 +1407,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
@@ -1625,18 +1438,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
@@ -1650,18 +1460,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
@@ -1674,7 +1481,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
@@ -1706,46 +1512,37 @@ spec:
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:
@@ -1762,20 +1559,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
@@ -1791,13 +1584,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
@@ -1829,7 +1620,6 @@ spec:
RequestRedirect defines a schema for a filter that responds to the
request with an HTTP redirection.
-
Support: Core
properties:
hostname:
@@ -1838,7 +1628,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
@@ -1850,7 +1639,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:
@@ -1866,32 +1654,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:
@@ -1899,11 +1672,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`.
@@ -1936,11 +1707,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
@@ -1948,17 +1717,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
@@ -1969,20 +1735,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
@@ -1993,16 +1755,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
@@ -2014,7 +1773,6 @@ spec:
ResponseHeaderModifier defines a schema for a filter that modifies response
headers.
-
Support: Extended
properties:
add:
@@ -2023,18 +1781,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
@@ -2047,7 +1802,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
@@ -2079,18 +1833,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
@@ -2104,18 +1855,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
@@ -2128,7 +1876,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
@@ -2159,17 +1906,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
@@ -2178,20 +1922,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`.
@@ -2207,7 +1947,6 @@ spec:
description: |-
URLRewrite defines a schema for a filter that modifies a request during forwarding.
-
Support: Extended
properties:
hostname:
@@ -2215,7 +1954,6 @@ spec:
Hostname is the value to be used to replace the Host header value during
forwarding.
-
Support: Extended
maxLength: 253
minLength: 1
@@ -2225,7 +1963,6 @@ spec:
description: |-
Path defines a path rewrite.
-
Support: Extended
properties:
replaceFullPath:
@@ -2241,32 +1978,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:
@@ -2274,11 +1996,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`.
@@ -2379,10 +2099,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:
@@ -2394,65 +2112,54 @@ 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
+ 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\n```"
+ \ value \"v1\"\n\n```"
properties:
headers:
description: |-
@@ -2469,14 +2176,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:
@@ -2491,13 +2196,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
@@ -2527,7 +2229,6 @@ spec:
When specified, this route will be matched only if the request has the
specified method.
-
Support: Extended
enum:
- GET
@@ -2553,10 +2254,8 @@ spec:
description: |-
Type specifies how to match against the path Value.
-
Support: Core (Exact, PathPrefix)
-
Support: Implementation-specific (RegularExpression)
enum:
- Exact
@@ -2621,7 +2320,6 @@ spec:
values are ANDed together, meaning, a request must match all the
specified query parameters to select the route.
-
Support: Extended
items:
description: |-
@@ -2634,12 +2332,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
@@ -2647,7 +2343,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
@@ -2659,13 +2354,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
@@ -2696,7 +2388,6 @@ spec:
description: |-
Timeouts defines the timeouts that can be configured for an HTTP request.
-
Support: Extended
properties:
backendRequest:
@@ -2705,24 +2396,20 @@ 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.
-
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}$
type: string
@@ -2732,28 +2419,23 @@ 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.
-
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}$
type: string
@@ -2835,13 +2517,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:
@@ -2855,38 +2535,24 @@ 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: |-
@@ -2928,12 +2594,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
@@ -2956,15 +2617,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.
@@ -2985,7 +2643,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])?)*$
@@ -2995,14 +2652,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
@@ -3012,7 +2666,6 @@ spec:
description: |-
Name is the name of the referent.
-
Support: Core
maxLength: 253
minLength: 1
@@ -3022,7 +2675,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:
@@ -3031,8 +2683,6 @@ spec:
-
-
Support: Core
maxLength: 63
minLength: 1
@@ -3043,7 +2693,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
@@ -3054,13 +2703,10 @@ spec:
-
-
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,
@@ -3069,7 +2715,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
@@ -3080,7 +2725,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.
@@ -3088,12 +2732,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
@@ -3103,7 +2745,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
@@ -3172,21 +2813,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`.
@@ -3197,55 +2834,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.
@@ -3268,21 +2895,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
@@ -3292,10 +2914,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
@@ -3303,14 +2923,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,
@@ -3322,23 +2940,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:
@@ -3350,7 +2963,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])?)*$
@@ -3360,14 +2972,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
@@ -3377,7 +2986,6 @@ spec:
description: |-
Name is the name of the referent.
-
Support: Core
maxLength: 253
minLength: 1
@@ -3387,7 +2995,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:
@@ -3396,8 +3003,6 @@ spec:
-
-
Support: Core
maxLength: 63
minLength: 1
@@ -3408,7 +3013,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
@@ -3419,13 +3023,10 @@ spec:
-
-
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,
@@ -3434,7 +3035,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
@@ -3445,7 +3045,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.
@@ -3453,12 +3052,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
@@ -3468,7 +3065,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
@@ -3508,7 +3104,6 @@ spec:
description: |+
Rules are a list of HTTP matchers, filters and actions.
-
items:
description: |-
HTTPRouteRule defines semantics for matching an HTTP request based on
@@ -3520,80 +3115,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:
@@ -3601,7 +3179,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:
@@ -3620,10 +3197,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:
@@ -3655,7 +3230,6 @@ spec:
RequestHeaderModifier defines a schema for a filter that modifies request
headers.
-
Support: Core
properties:
add:
@@ -3664,18 +3238,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
@@ -3689,7 +3260,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
@@ -3721,18 +3291,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
@@ -3746,18 +3313,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
@@ -3771,7 +3335,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
@@ -3803,46 +3366,37 @@ spec:
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:
@@ -3859,20 +3413,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
@@ -3888,13 +3438,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
@@ -3926,7 +3474,6 @@ spec:
RequestRedirect defines a schema for a filter that responds to the
request with an HTTP redirection.
-
Support: Core
properties:
hostname:
@@ -3935,7 +3482,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
@@ -3947,7 +3493,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:
@@ -3963,32 +3508,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:
@@ -3996,11 +3526,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`.
@@ -4033,11 +3561,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
@@ -4045,17 +3571,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
@@ -4066,20 +3589,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
@@ -4090,16 +3609,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
@@ -4111,7 +3627,6 @@ spec:
ResponseHeaderModifier defines a schema for a filter that modifies response
headers.
-
Support: Extended
properties:
add:
@@ -4120,18 +3635,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
@@ -4145,7 +3657,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
@@ -4177,18 +3688,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
@@ -4202,18 +3710,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
@@ -4227,7 +3732,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
@@ -4258,17 +3762,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
@@ -4277,20 +3778,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`.
@@ -4306,7 +3803,6 @@ spec:
description: |-
URLRewrite defines a schema for a filter that modifies a request during forwarding.
-
Support: Extended
properties:
hostname:
@@ -4314,7 +3810,6 @@ spec:
Hostname is the value to be used to replace the Host header value during
forwarding.
-
Support: Extended
maxLength: 253
minLength: 1
@@ -4324,7 +3819,6 @@ spec:
description: |-
Path defines a path rewrite.
-
Support: Extended
properties:
replaceFullPath:
@@ -4340,32 +3834,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:
@@ -4373,11 +3852,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`.
@@ -4490,20 +3967,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
@@ -4519,13 +3992,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
@@ -4552,13 +4023,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
@@ -4578,37 +4047,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
@@ -4617,7 +4079,6 @@ spec:
`False`, implementations may use the `IncompatibleFilters` reason to specify
this configuration error.
-
Support: Core
items:
description: |-
@@ -4635,10 +4096,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:
@@ -4670,7 +4129,6 @@ spec:
RequestHeaderModifier defines a schema for a filter that modifies request
headers.
-
Support: Core
properties:
add:
@@ -4679,18 +4137,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
@@ -4703,7 +4158,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
@@ -4735,18 +4189,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
@@ -4760,18 +4211,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
@@ -4784,7 +4232,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
@@ -4816,46 +4263,37 @@ spec:
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:
@@ -4872,20 +4310,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
@@ -4901,13 +4335,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
@@ -4939,7 +4371,6 @@ spec:
RequestRedirect defines a schema for a filter that responds to the
request with an HTTP redirection.
-
Support: Core
properties:
hostname:
@@ -4948,7 +4379,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
@@ -4960,7 +4390,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:
@@ -4976,32 +4405,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:
@@ -5009,11 +4423,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`.
@@ -5046,11 +4458,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
@@ -5058,17 +4468,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
@@ -5079,20 +4486,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
@@ -5103,16 +4506,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
@@ -5124,7 +4524,6 @@ spec:
ResponseHeaderModifier defines a schema for a filter that modifies response
headers.
-
Support: Extended
properties:
add:
@@ -5133,18 +4532,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
@@ -5157,7 +4553,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
@@ -5189,18 +4584,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
@@ -5214,18 +4606,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
@@ -5238,7 +4627,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
@@ -5269,17 +4657,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
@@ -5288,20 +4673,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`.
@@ -5317,7 +4698,6 @@ spec:
description: |-
URLRewrite defines a schema for a filter that modifies a request during forwarding.
-
Support: Extended
properties:
hostname:
@@ -5325,7 +4705,6 @@ spec:
Hostname is the value to be used to replace the Host header value during
forwarding.
-
Support: Extended
maxLength: 253
minLength: 1
@@ -5335,7 +4714,6 @@ spec:
description: |-
Path defines a path rewrite.
-
Support: Extended
properties:
replaceFullPath:
@@ -5351,32 +4729,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:
@@ -5384,11 +4747,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`.
@@ -5489,10 +4850,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:
@@ -5504,65 +4863,54 @@ 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
+ 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\n```"
+ \ value \"v1\"\n\n```"
properties:
headers:
description: |-
@@ -5579,14 +4927,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:
@@ -5601,13 +4947,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
@@ -5637,7 +4980,6 @@ spec:
When specified, this route will be matched only if the request has the
specified method.
-
Support: Extended
enum:
- GET
@@ -5663,10 +5005,8 @@ spec:
description: |-
Type specifies how to match against the path Value.
-
Support: Core (Exact, PathPrefix)
-
Support: Implementation-specific (RegularExpression)
enum:
- Exact
@@ -5731,7 +5071,6 @@ spec:
values are ANDed together, meaning, a request must match all the
specified query parameters to select the route.
-
Support: Extended
items:
description: |-
@@ -5744,12 +5083,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
@@ -5757,7 +5094,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
@@ -5769,13 +5105,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
@@ -5806,7 +5139,6 @@ spec:
description: |-
Timeouts defines the timeouts that can be configured for an HTTP request.
-
Support: Extended
properties:
backendRequest:
@@ -5815,24 +5147,20 @@ 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.
-
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}$
type: string
@@ -5842,28 +5170,23 @@ 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.
-
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}$
type: string
@@ -5945,13 +5268,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:
@@ -5965,38 +5286,24 @@ 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: |-
@@ -6038,12 +5345,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
@@ -6066,15 +5368,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.
@@ -6095,7 +5394,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])?)*$
@@ -6105,14 +5403,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
@@ -6122,7 +5417,6 @@ spec:
description: |-
Name is the name of the referent.
-
Support: Core
maxLength: 253
minLength: 1
@@ -6132,7 +5426,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:
@@ -6141,8 +5434,6 @@ spec:
-
-
Support: Core
maxLength: 63
minLength: 1
@@ -6153,7 +5444,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
@@ -6164,13 +5454,10 @@ spec:
-
-
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,
@@ -6179,7 +5466,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
@@ -6190,7 +5476,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.
@@ -6198,12 +5483,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
@@ -6213,7 +5496,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/config/crd/standard/gateway.networking.k8s.io_referencegrants.yaml b/config/crd/standard/gateway.networking.k8s.io_referencegrants.yaml
index 41a119c6d2..a80802e9fc 100644
--- a/config/crd/standard/gateway.networking.k8s.io_referencegrants.yaml
+++ b/config/crd/standard/gateway.networking.k8s.io_referencegrants.yaml
@@ -35,12 +35,10 @@ 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.
-
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
@@ -48,7 +46,6 @@ spec:
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
@@ -82,7 +79,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
@@ -93,7 +89,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])?)*$
@@ -104,16 +99,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
@@ -127,7 +118,6 @@ spec:
description: |-
Namespace is the namespace of the referent.
-
Support: Core
maxLength: 63
minLength: 1
@@ -148,7 +138,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: |-
@@ -160,7 +149,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])?)*$
@@ -171,7 +159,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
@@ -213,16 +200,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
@@ -256,7 +240,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
@@ -267,7 +250,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])?)*$
@@ -278,16 +260,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
@@ -301,7 +279,6 @@ spec:
description: |-
Namespace is the namespace of the referent.
-
Support: Core
maxLength: 63
minLength: 1
@@ -322,7 +299,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: |-
@@ -334,7 +310,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])?)*$
@@ -345,7 +320,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
diff --git a/go.mod b/go.mod
index c86ec8ff62..4e5ce5c4ef 100644
--- a/go.mod
+++ b/go.mod
@@ -8,29 +8,30 @@ require (
github.com/stretchr/testify v1.9.0
golang.org/x/net v0.28.0
golang.org/x/sync v0.8.0
- google.golang.org/grpc v1.66.0
+ google.golang.org/grpc v1.66.2
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.5.1
- google.golang.org/protobuf v1.34.1
- k8s.io/api v0.30.0
- k8s.io/apiextensions-apiserver v0.30.0
- k8s.io/apimachinery v0.30.0
- k8s.io/client-go v0.30.0
- k8s.io/code-generator v0.30.0
+ google.golang.org/protobuf v1.34.2
+ k8s.io/api v0.31.1
+ k8s.io/apiextensions-apiserver v0.31.1
+ k8s.io/apimachinery v0.31.1
+ k8s.io/client-go v0.31.1
+ k8s.io/code-generator v0.31.1
k8s.io/kube-openapi v0.0.0-20240423202451-8948a665c108
- k8s.io/utils v0.0.0-20240423183400-0849a56e8f22
+ k8s.io/utils v0.0.0-20240711033017-18e509b52bc8
sigs.k8s.io/controller-runtime v0.18.0
- sigs.k8s.io/controller-tools v0.15.0
+ sigs.k8s.io/controller-tools v0.16.3
sigs.k8s.io/structured-merge-diff/v4 v4.4.1
sigs.k8s.io/yaml v1.4.0
)
require (
- github.com/davecgh/go-spew v1.1.1 // indirect
+ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/emicklei/go-restful/v3 v3.12.0 // indirect
github.com/evanphx/json-patch v5.7.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
- github.com/fatih/color v1.16.0 // indirect
- github.com/go-logr/logr v1.4.1 // indirect
+ github.com/fatih/color v1.17.0 // indirect
+ github.com/fxamacker/cbor/v2 v2.7.0 // indirect
+ github.com/go-logr/logr v1.4.2 // indirect
github.com/go-openapi/jsonpointer v0.21.0 // indirect
github.com/go-openapi/jsonreference v0.21.0 // indirect
github.com/go-openapi/swag v0.23.0 // indirect
@@ -49,31 +50,33 @@ require (
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
- github.com/moby/spdystream v0.2.0 // indirect
+ github.com/moby/spdystream v0.4.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
github.com/pkg/errors v0.9.1 // indirect
- github.com/pmezard/go-difflib v1.0.0 // indirect
+ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
- github.com/spf13/cobra v1.8.0 // indirect
+ github.com/spf13/cobra v1.8.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
+ github.com/x448/float16 v0.8.4 // indirect
golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f // indirect
- golang.org/x/mod v0.18.0 // indirect
+ golang.org/x/mod v0.20.0 // indirect
golang.org/x/oauth2 v0.21.0 // indirect
- golang.org/x/sys v0.23.0 // indirect
+ golang.org/x/sys v0.24.0 // indirect
golang.org/x/term v0.23.0 // indirect
golang.org/x/text v0.17.0 // indirect
golang.org/x/time v0.5.0 // indirect
- golang.org/x/tools v0.22.0 // indirect
- google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 // indirect
+ golang.org/x/tools v0.24.0 // indirect
+ google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect
+ gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 // indirect
k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70 // indirect
k8s.io/klog v0.2.0 // indirect
- k8s.io/klog/v2 v2.120.1 // indirect
+ k8s.io/klog/v2 v2.130.1 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
)
diff --git a/go.sum b/go.sum
index 9289cf88ee..13131e198a 100644
--- a/go.sum
+++ b/go.sum
@@ -2,23 +2,26 @@ github.com/ahmetb/gen-crd-api-reference-docs v0.3.0 h1:+XfOU14S4bGuwyvCijJwhhBIj
github.com/ahmetb/gen-crd-api-reference-docs v0.3.0/go.mod h1:TdjdkYhlOifCQWPs1UdTma97kQQMozf5h26hTuG70u8=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
-github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
+github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
+github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/emicklei/go-restful/v3 v3.12.0 h1:y2DdzBAURM29NFF94q6RaY4vjIH1rtwDapwQtU84iWk=
github.com/emicklei/go-restful/v3 v3.12.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
github.com/evanphx/json-patch v5.7.0+incompatible h1:vgGkfT/9f8zE6tvSCe74nfpAVDQ2tG6yudJd8LBksgI=
github.com/evanphx/json-patch v5.7.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0/FOJfg=
github.com/evanphx/json-patch/v5 v5.9.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ=
-github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
-github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
+github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4=
+github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI=
github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
+github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E=
+github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ=
github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU=
-github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
-github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
+github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
+github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ=
github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg=
github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ=
@@ -28,7 +31,8 @@ github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDsl
github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE=
github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ=
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI=
-github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls=
+github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI=
+github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=
github.com/gobuffalo/flect v1.0.2 h1:eqjPGSo2WmjgY2XlpGwo2NXgL3RucAKo4k4qQMNA5sA=
github.com/gobuffalo/flect v1.0.2/go.mod h1:A5msMlrHtLqh9umBSnvabjsMrCcCpAyzglnDvkbYKHs=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
@@ -45,11 +49,10 @@ github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/
github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
-github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec=
-github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
+github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af h1:kmjWCqn2qkEml422C2Rrd27c3VGxi6a/6HNq8QmHRKM=
+github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
-github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY=
github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY=
github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4=
@@ -78,8 +81,8 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/miekg/dns v1.1.62 h1:cN8OuEF1/x5Rq6Np+h1epln8OiyPWV+lROx9LxcGgIQ=
github.com/miekg/dns v1.1.62/go.mod h1:mvDlcItzm+br7MToIKqkglaGhlFMHJ9DTNNWONWXbNQ=
-github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8=
-github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c=
+github.com/moby/spdystream v0.4.0 h1:Vy79D6mHeJJjiPdFEL2yku1kl0chZpJfZcPpb16BRl8=
+github.com/moby/spdystream v0.4.0/go.mod h1:xBAYlnt/ay+11ShkdFKNAG7LsyK/tmNBVvVOwrfMgdI=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
@@ -93,23 +96,24 @@ github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU=
-github.com/onsi/ginkgo/v2 v2.17.1 h1:V++EzdbhI4ZV4ev0UTIj0PzhzOcReJFyJaLjtSF55M8=
-github.com/onsi/ginkgo/v2 v2.17.1/go.mod h1:llBI3WDLL9Z6taip6f33H76YcWtJv+7R3HigUjbIBOs=
-github.com/onsi/gomega v1.33.0 h1:snPCflnZrpMsy94p4lXVEkHo12lmPnc3vY5XBbreexE=
-github.com/onsi/gomega v1.33.0/go.mod h1:+925n5YtiFsLzzafLUHzVMBpvvRAzrydIBiSIxjX3wY=
+github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA=
+github.com/onsi/ginkgo/v2 v2.19.0/go.mod h1:rlwLi9PilAFJ8jCg9UE1QP6VBpd6/xj3SRC0d6TU0To=
+github.com/onsi/gomega v1.34.2 h1:pNCwDkzrsv7MS9kpaQvVb1aVLahQXyJ/Tv5oAZMI3i8=
+github.com/onsi/gomega v1.34.2/go.mod h1:v1xfxRgk0KIsG+QOdm7p8UosrOzPYRo60fd3B/1Dukc=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
-github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
+github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
+github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
+github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
-github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0=
-github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho=
+github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM=
+github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
@@ -121,6 +125,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
+github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
+github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
@@ -134,8 +140,8 @@ golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f h1:99ci1mjWVBWwJiEKYY6jWa4d2
golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI=
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
-golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0=
-golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
+golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0=
+golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
@@ -154,8 +160,8 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM=
-golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg=
+golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU=
golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -169,24 +175,26 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn
golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
-golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA=
-golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c=
+golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24=
+golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 h1:1GBuWVLM/KMVUv1t1En5Gs+gFZCNd360GGb4sSxtrhU=
-google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0=
-google.golang.org/grpc v1.66.0 h1:DibZuoBznOxbDQxRINckZcUvnCEvrW9pcWIE2yF9r1c=
-google.golang.org/grpc v1.66.0/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y=
+google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA=
+google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY=
+google.golang.org/grpc v1.66.2 h1:3QdXkuq3Bkh7w+ywLdLvM56cmGvQHUMZpiCzt6Rqaoo=
+google.golang.org/grpc v1.66.2/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y=
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.5.1 h1:F29+wU6Ee6qgu9TddPgooOdaqsxTMunOoj8KA5yuS5A=
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.5.1/go.mod h1:5KF+wpkbTSbGcR9zteSqZV6fqFOWBl4Yde8En8MryZA=
-google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg=
-google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
+google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
+google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
+gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4=
+gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M=
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
@@ -197,16 +205,16 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
-k8s.io/api v0.30.0 h1:siWhRq7cNjy2iHssOB9SCGNCl2spiF1dO3dABqZ8niA=
-k8s.io/api v0.30.0/go.mod h1:OPlaYhoHs8EQ1ql0R/TsUgaRPhpKNxIMrKQfWUp8QSE=
-k8s.io/apiextensions-apiserver v0.30.0 h1:jcZFKMqnICJfRxTgnC4E+Hpcq8UEhT8B2lhBcQ+6uAs=
-k8s.io/apiextensions-apiserver v0.30.0/go.mod h1:N9ogQFGcrbWqAY9p2mUAL5mGxsLqwgtUce127VtRX5Y=
-k8s.io/apimachinery v0.30.0 h1:qxVPsyDM5XS96NIh9Oj6LavoVFYff/Pon9cZeDIkHHA=
-k8s.io/apimachinery v0.30.0/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc=
-k8s.io/client-go v0.30.0 h1:sB1AGGlhY/o7KCyCEQ0bPWzYDL0pwOZO4vAtTSh/gJQ=
-k8s.io/client-go v0.30.0/go.mod h1:g7li5O5256qe6TYdAMyX/otJqMhIiGgTapdLchhmOaY=
-k8s.io/code-generator v0.30.0 h1:3VUVqHvWFSVSm9kqL/G6kD4ZwNdHF6J/jPyo3Jgjy3k=
-k8s.io/code-generator v0.30.0/go.mod h1:mBMZhfRR4IunJUh2+7LVmdcWwpouCH5+LNPkZ3t/v7Q=
+k8s.io/api v0.31.1 h1:Xe1hX/fPW3PXYYv8BlozYqw63ytA92snr96zMW9gWTU=
+k8s.io/api v0.31.1/go.mod h1:sbN1g6eY6XVLeqNsZGLnI5FwVseTrZX7Fv3O26rhAaI=
+k8s.io/apiextensions-apiserver v0.31.1 h1:L+hwULvXx+nvTYX/MKM3kKMZyei+UiSXQWciX/N6E40=
+k8s.io/apiextensions-apiserver v0.31.1/go.mod h1:tWMPR3sgW+jsl2xm9v7lAyRF1rYEK71i9G5dRtkknoQ=
+k8s.io/apimachinery v0.31.1 h1:mhcUBbj7KUjaVhyXILglcVjuS4nYXiwC+KKFBgIVy7U=
+k8s.io/apimachinery v0.31.1/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo=
+k8s.io/client-go v0.31.1 h1:f0ugtWSbWpxHR7sjVpQwuvw9a3ZKLXX0u0itkFXufb0=
+k8s.io/client-go v0.31.1/go.mod h1:sKI8871MJN2OyeqRlmA4W4KM9KBdBUpDLu/43eGemCg=
+k8s.io/code-generator v0.31.1 h1:GvkRZEP2g2UnB2QKT2Dgc/kYxIkDxCHENv2Q1itioVs=
+k8s.io/code-generator v0.31.1/go.mod h1:oL2ky46L48osNqqZAeOcWWy0S5BXj50vVdwOtTefqIs=
k8s.io/gengo v0.0.0-20201203183100-97869a43a9d9/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E=
k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01 h1:pWEwq4Asjm4vjW7vcsmijwBhOr1/shsbSYiWXmNGlks=
k8s.io/gengo v0.0.0-20230829151522-9cce18d56c01/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E=
@@ -215,16 +223,16 @@ k8s.io/gengo/v2 v2.0.0-20240228010128-51d4e06bde70/go.mod h1:VH3AT8AaQOqiGjMF9p0
k8s.io/klog v0.2.0 h1:0ElL0OHzF3N+OhoJTL0uca20SxtYt4X4+bzHeqrB83c=
k8s.io/klog v0.2.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y=
-k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw=
-k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
+k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
+k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
k8s.io/kube-openapi v0.0.0-20240423202451-8948a665c108 h1:Q8Z7VlGhcJgBHJHYugJ/K/7iB8a2eSxCyxdVjJp+lLY=
k8s.io/kube-openapi v0.0.0-20240423202451-8948a665c108/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98=
-k8s.io/utils v0.0.0-20240423183400-0849a56e8f22 h1:ao5hUqGhsqdm+bYbjH/pRkCs0unBGe9UyDahzs9zQzQ=
-k8s.io/utils v0.0.0-20240423183400-0849a56e8f22/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
+k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A=
+k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
sigs.k8s.io/controller-runtime v0.18.0 h1:Z7jKuX784TQSUL1TIyeuF7j8KXZ4RtSX0YgtjKcSTME=
sigs.k8s.io/controller-runtime v0.18.0/go.mod h1:tuAt1+wbVsXIT8lPtk5RURxqAnq7xkpv2Mhttslg7Hw=
-sigs.k8s.io/controller-tools v0.15.0 h1:4dxdABXGDhIa68Fiwaif0vcu32xfwmgQ+w8p+5CxoAI=
-sigs.k8s.io/controller-tools v0.15.0/go.mod h1:8zUSS2T8Hx0APCNRhJWbS3CAQEbIxLa07khzh7pZmXM=
+sigs.k8s.io/controller-tools v0.16.3 h1:z48C5/d4jCVQQvtiSBL5MYyZ3EO2eFIOXrIKMgHVhFY=
+sigs.k8s.io/controller-tools v0.16.3/go.mod h1:AEj6k+w1kYpLZv2einOH3mj52ips4W/6FUjnB5tkJGs=
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo=
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0=
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4=
diff --git a/pkg/client/clientset/versioned/fake/clientset_generated.go b/pkg/client/clientset/versioned/fake/clientset_generated.go
index c588377449..7d165c93ba 100644
--- a/pkg/client/clientset/versioned/fake/clientset_generated.go
+++ b/pkg/client/clientset/versioned/fake/clientset_generated.go
@@ -24,6 +24,7 @@ import (
"k8s.io/client-go/discovery"
fakediscovery "k8s.io/client-go/discovery/fake"
"k8s.io/client-go/testing"
+ applyconfiguration "sigs.k8s.io/gateway-api/apis/applyconfiguration"
clientset "sigs.k8s.io/gateway-api/pkg/client/clientset/versioned"
gatewayv1 "sigs.k8s.io/gateway-api/pkg/client/clientset/versioned/typed/apis/v1"
fakegatewayv1 "sigs.k8s.io/gateway-api/pkg/client/clientset/versioned/typed/apis/v1/fake"
@@ -37,8 +38,12 @@ import (
// NewSimpleClientset returns a clientset that will respond with the provided objects.
// It's backed by a very simple object tracker that processes creates, updates and deletions as-is,
-// without applying any validations and/or defaults. It shouldn't be considered a replacement
+// without applying any field management, validations and/or defaults. It shouldn't be considered a replacement
// for a real clientset and is mostly useful in simple unit tests.
+//
+// DEPRECATED: NewClientset replaces this with support for field management, which significantly improves
+// server side apply testing. NewClientset is only available when apply configurations are generated (e.g.
+// via --with-applyconfig).
func NewSimpleClientset(objects ...runtime.Object) *Clientset {
o := testing.NewObjectTracker(scheme, codecs.UniversalDecoder())
for _, obj := range objects {
@@ -80,6 +85,38 @@ func (c *Clientset) Tracker() testing.ObjectTracker {
return c.tracker
}
+// NewClientset returns a clientset that will respond with the provided objects.
+// It's backed by a very simple object tracker that processes creates, updates and deletions as-is,
+// without applying any validations and/or defaults. It shouldn't be considered a replacement
+// for a real clientset and is mostly useful in simple unit tests.
+func NewClientset(objects ...runtime.Object) *Clientset {
+ o := testing.NewFieldManagedObjectTracker(
+ scheme,
+ codecs.UniversalDecoder(),
+ applyconfiguration.NewTypeConverter(scheme),
+ )
+ for _, obj := range objects {
+ if err := o.Add(obj); err != nil {
+ panic(err)
+ }
+ }
+
+ cs := &Clientset{tracker: o}
+ cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake}
+ cs.AddReactor("*", "*", testing.ObjectReaction(o))
+ cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) {
+ gvr := action.GetResource()
+ ns := action.GetNamespace()
+ watch, err := o.Watch(gvr, ns)
+ if err != nil {
+ return false, nil, err
+ }
+ return true, watch, nil
+ })
+
+ return cs
+}
+
var (
_ clientset.Interface = &Clientset{}
_ testing.FakeClient = &Clientset{}
diff --git a/pkg/client/clientset/versioned/typed/apis/v1/fake/fake_gateway.go b/pkg/client/clientset/versioned/typed/apis/v1/fake/fake_gateway.go
index 589461d4ce..38b4ec9ca9 100644
--- a/pkg/client/clientset/versioned/typed/apis/v1/fake/fake_gateway.go
+++ b/pkg/client/clientset/versioned/typed/apis/v1/fake/fake_gateway.go
@@ -44,22 +44,24 @@ var gatewaysKind = v1.SchemeGroupVersion.WithKind("Gateway")
// Get takes name of the gateway, and returns the corresponding gateway object, and an error if there is any.
func (c *FakeGateways) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Gateway, err error) {
+ emptyResult := &v1.Gateway{}
obj, err := c.Fake.
- Invokes(testing.NewGetAction(gatewaysResource, c.ns, name), &v1.Gateway{})
+ Invokes(testing.NewGetActionWithOptions(gatewaysResource, c.ns, name, options), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1.Gateway), err
}
// List takes label and field selectors, and returns the list of Gateways that match those selectors.
func (c *FakeGateways) List(ctx context.Context, opts metav1.ListOptions) (result *v1.GatewayList, err error) {
+ emptyResult := &v1.GatewayList{}
obj, err := c.Fake.
- Invokes(testing.NewListAction(gatewaysResource, gatewaysKind, c.ns, opts), &v1.GatewayList{})
+ Invokes(testing.NewListActionWithOptions(gatewaysResource, gatewaysKind, c.ns, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@@ -78,40 +80,43 @@ func (c *FakeGateways) List(ctx context.Context, opts metav1.ListOptions) (resul
// Watch returns a watch.Interface that watches the requested gateways.
func (c *FakeGateways) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
return c.Fake.
- InvokesWatch(testing.NewWatchAction(gatewaysResource, c.ns, opts))
+ InvokesWatch(testing.NewWatchActionWithOptions(gatewaysResource, c.ns, opts))
}
// Create takes the representation of a gateway and creates it. Returns the server's representation of the gateway, and an error, if there is any.
func (c *FakeGateways) Create(ctx context.Context, gateway *v1.Gateway, opts metav1.CreateOptions) (result *v1.Gateway, err error) {
+ emptyResult := &v1.Gateway{}
obj, err := c.Fake.
- Invokes(testing.NewCreateAction(gatewaysResource, c.ns, gateway), &v1.Gateway{})
+ Invokes(testing.NewCreateActionWithOptions(gatewaysResource, c.ns, gateway, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1.Gateway), err
}
// Update takes the representation of a gateway and updates it. Returns the server's representation of the gateway, and an error, if there is any.
func (c *FakeGateways) Update(ctx context.Context, gateway *v1.Gateway, opts metav1.UpdateOptions) (result *v1.Gateway, err error) {
+ emptyResult := &v1.Gateway{}
obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(gatewaysResource, c.ns, gateway), &v1.Gateway{})
+ Invokes(testing.NewUpdateActionWithOptions(gatewaysResource, c.ns, gateway, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1.Gateway), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-func (c *FakeGateways) UpdateStatus(ctx context.Context, gateway *v1.Gateway, opts metav1.UpdateOptions) (*v1.Gateway, error) {
+func (c *FakeGateways) UpdateStatus(ctx context.Context, gateway *v1.Gateway, opts metav1.UpdateOptions) (result *v1.Gateway, err error) {
+ emptyResult := &v1.Gateway{}
obj, err := c.Fake.
- Invokes(testing.NewUpdateSubresourceAction(gatewaysResource, "status", c.ns, gateway), &v1.Gateway{})
+ Invokes(testing.NewUpdateSubresourceActionWithOptions(gatewaysResource, "status", c.ns, gateway, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1.Gateway), err
}
@@ -126,7 +131,7 @@ func (c *FakeGateways) Delete(ctx context.Context, name string, opts metav1.Dele
// DeleteCollection deletes a collection of objects.
func (c *FakeGateways) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
- action := testing.NewDeleteCollectionAction(gatewaysResource, c.ns, listOpts)
+ action := testing.NewDeleteCollectionActionWithOptions(gatewaysResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1.GatewayList{})
return err
@@ -134,11 +139,12 @@ func (c *FakeGateways) DeleteCollection(ctx context.Context, opts metav1.DeleteO
// Patch applies the patch and returns the patched gateway.
func (c *FakeGateways) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Gateway, err error) {
+ emptyResult := &v1.Gateway{}
obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(gatewaysResource, c.ns, name, pt, data, subresources...), &v1.Gateway{})
+ Invokes(testing.NewPatchSubresourceActionWithOptions(gatewaysResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1.Gateway), err
}
@@ -156,11 +162,12 @@ func (c *FakeGateways) Apply(ctx context.Context, gateway *apisv1.GatewayApplyCo
if name == nil {
return nil, fmt.Errorf("gateway.Name must be provided to Apply")
}
+ emptyResult := &v1.Gateway{}
obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(gatewaysResource, c.ns, *name, types.ApplyPatchType, data), &v1.Gateway{})
+ Invokes(testing.NewPatchSubresourceActionWithOptions(gatewaysResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1.Gateway), err
}
@@ -179,11 +186,12 @@ func (c *FakeGateways) ApplyStatus(ctx context.Context, gateway *apisv1.GatewayA
if name == nil {
return nil, fmt.Errorf("gateway.Name must be provided to Apply")
}
+ emptyResult := &v1.Gateway{}
obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(gatewaysResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1.Gateway{})
+ Invokes(testing.NewPatchSubresourceActionWithOptions(gatewaysResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1.Gateway), err
}
diff --git a/pkg/client/clientset/versioned/typed/apis/v1/fake/fake_gatewayclass.go b/pkg/client/clientset/versioned/typed/apis/v1/fake/fake_gatewayclass.go
index 69d777711a..4cec1cac6f 100644
--- a/pkg/client/clientset/versioned/typed/apis/v1/fake/fake_gatewayclass.go
+++ b/pkg/client/clientset/versioned/typed/apis/v1/fake/fake_gatewayclass.go
@@ -43,20 +43,22 @@ var gatewayclassesKind = v1.SchemeGroupVersion.WithKind("GatewayClass")
// Get takes name of the gatewayClass, and returns the corresponding gatewayClass object, and an error if there is any.
func (c *FakeGatewayClasses) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.GatewayClass, err error) {
+ emptyResult := &v1.GatewayClass{}
obj, err := c.Fake.
- Invokes(testing.NewRootGetAction(gatewayclassesResource, name), &v1.GatewayClass{})
+ Invokes(testing.NewRootGetActionWithOptions(gatewayclassesResource, name, options), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1.GatewayClass), err
}
// List takes label and field selectors, and returns the list of GatewayClasses that match those selectors.
func (c *FakeGatewayClasses) List(ctx context.Context, opts metav1.ListOptions) (result *v1.GatewayClassList, err error) {
+ emptyResult := &v1.GatewayClassList{}
obj, err := c.Fake.
- Invokes(testing.NewRootListAction(gatewayclassesResource, gatewayclassesKind, opts), &v1.GatewayClassList{})
+ Invokes(testing.NewRootListActionWithOptions(gatewayclassesResource, gatewayclassesKind, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@@ -75,36 +77,39 @@ func (c *FakeGatewayClasses) List(ctx context.Context, opts metav1.ListOptions)
// Watch returns a watch.Interface that watches the requested gatewayClasses.
func (c *FakeGatewayClasses) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
return c.Fake.
- InvokesWatch(testing.NewRootWatchAction(gatewayclassesResource, opts))
+ InvokesWatch(testing.NewRootWatchActionWithOptions(gatewayclassesResource, opts))
}
// Create takes the representation of a gatewayClass and creates it. Returns the server's representation of the gatewayClass, and an error, if there is any.
func (c *FakeGatewayClasses) Create(ctx context.Context, gatewayClass *v1.GatewayClass, opts metav1.CreateOptions) (result *v1.GatewayClass, err error) {
+ emptyResult := &v1.GatewayClass{}
obj, err := c.Fake.
- Invokes(testing.NewRootCreateAction(gatewayclassesResource, gatewayClass), &v1.GatewayClass{})
+ Invokes(testing.NewRootCreateActionWithOptions(gatewayclassesResource, gatewayClass, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1.GatewayClass), err
}
// Update takes the representation of a gatewayClass and updates it. Returns the server's representation of the gatewayClass, and an error, if there is any.
func (c *FakeGatewayClasses) Update(ctx context.Context, gatewayClass *v1.GatewayClass, opts metav1.UpdateOptions) (result *v1.GatewayClass, err error) {
+ emptyResult := &v1.GatewayClass{}
obj, err := c.Fake.
- Invokes(testing.NewRootUpdateAction(gatewayclassesResource, gatewayClass), &v1.GatewayClass{})
+ Invokes(testing.NewRootUpdateActionWithOptions(gatewayclassesResource, gatewayClass, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1.GatewayClass), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-func (c *FakeGatewayClasses) UpdateStatus(ctx context.Context, gatewayClass *v1.GatewayClass, opts metav1.UpdateOptions) (*v1.GatewayClass, error) {
+func (c *FakeGatewayClasses) UpdateStatus(ctx context.Context, gatewayClass *v1.GatewayClass, opts metav1.UpdateOptions) (result *v1.GatewayClass, err error) {
+ emptyResult := &v1.GatewayClass{}
obj, err := c.Fake.
- Invokes(testing.NewRootUpdateSubresourceAction(gatewayclassesResource, "status", gatewayClass), &v1.GatewayClass{})
+ Invokes(testing.NewRootUpdateSubresourceActionWithOptions(gatewayclassesResource, "status", gatewayClass, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1.GatewayClass), err
}
@@ -118,7 +123,7 @@ func (c *FakeGatewayClasses) Delete(ctx context.Context, name string, opts metav
// DeleteCollection deletes a collection of objects.
func (c *FakeGatewayClasses) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
- action := testing.NewRootDeleteCollectionAction(gatewayclassesResource, listOpts)
+ action := testing.NewRootDeleteCollectionActionWithOptions(gatewayclassesResource, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1.GatewayClassList{})
return err
@@ -126,10 +131,11 @@ func (c *FakeGatewayClasses) DeleteCollection(ctx context.Context, opts metav1.D
// Patch applies the patch and returns the patched gatewayClass.
func (c *FakeGatewayClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.GatewayClass, err error) {
+ emptyResult := &v1.GatewayClass{}
obj, err := c.Fake.
- Invokes(testing.NewRootPatchSubresourceAction(gatewayclassesResource, name, pt, data, subresources...), &v1.GatewayClass{})
+ Invokes(testing.NewRootPatchSubresourceActionWithOptions(gatewayclassesResource, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1.GatewayClass), err
}
@@ -147,10 +153,11 @@ func (c *FakeGatewayClasses) Apply(ctx context.Context, gatewayClass *apisv1.Gat
if name == nil {
return nil, fmt.Errorf("gatewayClass.Name must be provided to Apply")
}
+ emptyResult := &v1.GatewayClass{}
obj, err := c.Fake.
- Invokes(testing.NewRootPatchSubresourceAction(gatewayclassesResource, *name, types.ApplyPatchType, data), &v1.GatewayClass{})
+ Invokes(testing.NewRootPatchSubresourceActionWithOptions(gatewayclassesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1.GatewayClass), err
}
@@ -169,10 +176,11 @@ func (c *FakeGatewayClasses) ApplyStatus(ctx context.Context, gatewayClass *apis
if name == nil {
return nil, fmt.Errorf("gatewayClass.Name must be provided to Apply")
}
+ emptyResult := &v1.GatewayClass{}
obj, err := c.Fake.
- Invokes(testing.NewRootPatchSubresourceAction(gatewayclassesResource, *name, types.ApplyPatchType, data, "status"), &v1.GatewayClass{})
+ Invokes(testing.NewRootPatchSubresourceActionWithOptions(gatewayclassesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1.GatewayClass), err
}
diff --git a/pkg/client/clientset/versioned/typed/apis/v1/fake/fake_grpcroute.go b/pkg/client/clientset/versioned/typed/apis/v1/fake/fake_grpcroute.go
index 9e6bf9f87f..e4992e422b 100644
--- a/pkg/client/clientset/versioned/typed/apis/v1/fake/fake_grpcroute.go
+++ b/pkg/client/clientset/versioned/typed/apis/v1/fake/fake_grpcroute.go
@@ -44,22 +44,24 @@ var grpcroutesKind = v1.SchemeGroupVersion.WithKind("GRPCRoute")
// Get takes name of the gRPCRoute, and returns the corresponding gRPCRoute object, and an error if there is any.
func (c *FakeGRPCRoutes) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.GRPCRoute, err error) {
+ emptyResult := &v1.GRPCRoute{}
obj, err := c.Fake.
- Invokes(testing.NewGetAction(grpcroutesResource, c.ns, name), &v1.GRPCRoute{})
+ Invokes(testing.NewGetActionWithOptions(grpcroutesResource, c.ns, name, options), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1.GRPCRoute), err
}
// List takes label and field selectors, and returns the list of GRPCRoutes that match those selectors.
func (c *FakeGRPCRoutes) List(ctx context.Context, opts metav1.ListOptions) (result *v1.GRPCRouteList, err error) {
+ emptyResult := &v1.GRPCRouteList{}
obj, err := c.Fake.
- Invokes(testing.NewListAction(grpcroutesResource, grpcroutesKind, c.ns, opts), &v1.GRPCRouteList{})
+ Invokes(testing.NewListActionWithOptions(grpcroutesResource, grpcroutesKind, c.ns, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@@ -78,40 +80,43 @@ func (c *FakeGRPCRoutes) List(ctx context.Context, opts metav1.ListOptions) (res
// Watch returns a watch.Interface that watches the requested gRPCRoutes.
func (c *FakeGRPCRoutes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
return c.Fake.
- InvokesWatch(testing.NewWatchAction(grpcroutesResource, c.ns, opts))
+ InvokesWatch(testing.NewWatchActionWithOptions(grpcroutesResource, c.ns, opts))
}
// Create takes the representation of a gRPCRoute and creates it. Returns the server's representation of the gRPCRoute, and an error, if there is any.
func (c *FakeGRPCRoutes) Create(ctx context.Context, gRPCRoute *v1.GRPCRoute, opts metav1.CreateOptions) (result *v1.GRPCRoute, err error) {
+ emptyResult := &v1.GRPCRoute{}
obj, err := c.Fake.
- Invokes(testing.NewCreateAction(grpcroutesResource, c.ns, gRPCRoute), &v1.GRPCRoute{})
+ Invokes(testing.NewCreateActionWithOptions(grpcroutesResource, c.ns, gRPCRoute, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1.GRPCRoute), err
}
// Update takes the representation of a gRPCRoute and updates it. Returns the server's representation of the gRPCRoute, and an error, if there is any.
func (c *FakeGRPCRoutes) Update(ctx context.Context, gRPCRoute *v1.GRPCRoute, opts metav1.UpdateOptions) (result *v1.GRPCRoute, err error) {
+ emptyResult := &v1.GRPCRoute{}
obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(grpcroutesResource, c.ns, gRPCRoute), &v1.GRPCRoute{})
+ Invokes(testing.NewUpdateActionWithOptions(grpcroutesResource, c.ns, gRPCRoute, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1.GRPCRoute), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-func (c *FakeGRPCRoutes) UpdateStatus(ctx context.Context, gRPCRoute *v1.GRPCRoute, opts metav1.UpdateOptions) (*v1.GRPCRoute, error) {
+func (c *FakeGRPCRoutes) UpdateStatus(ctx context.Context, gRPCRoute *v1.GRPCRoute, opts metav1.UpdateOptions) (result *v1.GRPCRoute, err error) {
+ emptyResult := &v1.GRPCRoute{}
obj, err := c.Fake.
- Invokes(testing.NewUpdateSubresourceAction(grpcroutesResource, "status", c.ns, gRPCRoute), &v1.GRPCRoute{})
+ Invokes(testing.NewUpdateSubresourceActionWithOptions(grpcroutesResource, "status", c.ns, gRPCRoute, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1.GRPCRoute), err
}
@@ -126,7 +131,7 @@ func (c *FakeGRPCRoutes) Delete(ctx context.Context, name string, opts metav1.De
// DeleteCollection deletes a collection of objects.
func (c *FakeGRPCRoutes) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
- action := testing.NewDeleteCollectionAction(grpcroutesResource, c.ns, listOpts)
+ action := testing.NewDeleteCollectionActionWithOptions(grpcroutesResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1.GRPCRouteList{})
return err
@@ -134,11 +139,12 @@ func (c *FakeGRPCRoutes) DeleteCollection(ctx context.Context, opts metav1.Delet
// Patch applies the patch and returns the patched gRPCRoute.
func (c *FakeGRPCRoutes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.GRPCRoute, err error) {
+ emptyResult := &v1.GRPCRoute{}
obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(grpcroutesResource, c.ns, name, pt, data, subresources...), &v1.GRPCRoute{})
+ Invokes(testing.NewPatchSubresourceActionWithOptions(grpcroutesResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1.GRPCRoute), err
}
@@ -156,11 +162,12 @@ func (c *FakeGRPCRoutes) Apply(ctx context.Context, gRPCRoute *apisv1.GRPCRouteA
if name == nil {
return nil, fmt.Errorf("gRPCRoute.Name must be provided to Apply")
}
+ emptyResult := &v1.GRPCRoute{}
obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(grpcroutesResource, c.ns, *name, types.ApplyPatchType, data), &v1.GRPCRoute{})
+ Invokes(testing.NewPatchSubresourceActionWithOptions(grpcroutesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1.GRPCRoute), err
}
@@ -179,11 +186,12 @@ func (c *FakeGRPCRoutes) ApplyStatus(ctx context.Context, gRPCRoute *apisv1.GRPC
if name == nil {
return nil, fmt.Errorf("gRPCRoute.Name must be provided to Apply")
}
+ emptyResult := &v1.GRPCRoute{}
obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(grpcroutesResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1.GRPCRoute{})
+ Invokes(testing.NewPatchSubresourceActionWithOptions(grpcroutesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1.GRPCRoute), err
}
diff --git a/pkg/client/clientset/versioned/typed/apis/v1/fake/fake_httproute.go b/pkg/client/clientset/versioned/typed/apis/v1/fake/fake_httproute.go
index 77c2f0d7e4..2673628ea3 100644
--- a/pkg/client/clientset/versioned/typed/apis/v1/fake/fake_httproute.go
+++ b/pkg/client/clientset/versioned/typed/apis/v1/fake/fake_httproute.go
@@ -44,22 +44,24 @@ var httproutesKind = v1.SchemeGroupVersion.WithKind("HTTPRoute")
// Get takes name of the hTTPRoute, and returns the corresponding hTTPRoute object, and an error if there is any.
func (c *FakeHTTPRoutes) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.HTTPRoute, err error) {
+ emptyResult := &v1.HTTPRoute{}
obj, err := c.Fake.
- Invokes(testing.NewGetAction(httproutesResource, c.ns, name), &v1.HTTPRoute{})
+ Invokes(testing.NewGetActionWithOptions(httproutesResource, c.ns, name, options), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1.HTTPRoute), err
}
// List takes label and field selectors, and returns the list of HTTPRoutes that match those selectors.
func (c *FakeHTTPRoutes) List(ctx context.Context, opts metav1.ListOptions) (result *v1.HTTPRouteList, err error) {
+ emptyResult := &v1.HTTPRouteList{}
obj, err := c.Fake.
- Invokes(testing.NewListAction(httproutesResource, httproutesKind, c.ns, opts), &v1.HTTPRouteList{})
+ Invokes(testing.NewListActionWithOptions(httproutesResource, httproutesKind, c.ns, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@@ -78,40 +80,43 @@ func (c *FakeHTTPRoutes) List(ctx context.Context, opts metav1.ListOptions) (res
// Watch returns a watch.Interface that watches the requested hTTPRoutes.
func (c *FakeHTTPRoutes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
return c.Fake.
- InvokesWatch(testing.NewWatchAction(httproutesResource, c.ns, opts))
+ InvokesWatch(testing.NewWatchActionWithOptions(httproutesResource, c.ns, opts))
}
// Create takes the representation of a hTTPRoute and creates it. Returns the server's representation of the hTTPRoute, and an error, if there is any.
func (c *FakeHTTPRoutes) Create(ctx context.Context, hTTPRoute *v1.HTTPRoute, opts metav1.CreateOptions) (result *v1.HTTPRoute, err error) {
+ emptyResult := &v1.HTTPRoute{}
obj, err := c.Fake.
- Invokes(testing.NewCreateAction(httproutesResource, c.ns, hTTPRoute), &v1.HTTPRoute{})
+ Invokes(testing.NewCreateActionWithOptions(httproutesResource, c.ns, hTTPRoute, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1.HTTPRoute), err
}
// Update takes the representation of a hTTPRoute and updates it. Returns the server's representation of the hTTPRoute, and an error, if there is any.
func (c *FakeHTTPRoutes) Update(ctx context.Context, hTTPRoute *v1.HTTPRoute, opts metav1.UpdateOptions) (result *v1.HTTPRoute, err error) {
+ emptyResult := &v1.HTTPRoute{}
obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(httproutesResource, c.ns, hTTPRoute), &v1.HTTPRoute{})
+ Invokes(testing.NewUpdateActionWithOptions(httproutesResource, c.ns, hTTPRoute, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1.HTTPRoute), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-func (c *FakeHTTPRoutes) UpdateStatus(ctx context.Context, hTTPRoute *v1.HTTPRoute, opts metav1.UpdateOptions) (*v1.HTTPRoute, error) {
+func (c *FakeHTTPRoutes) UpdateStatus(ctx context.Context, hTTPRoute *v1.HTTPRoute, opts metav1.UpdateOptions) (result *v1.HTTPRoute, err error) {
+ emptyResult := &v1.HTTPRoute{}
obj, err := c.Fake.
- Invokes(testing.NewUpdateSubresourceAction(httproutesResource, "status", c.ns, hTTPRoute), &v1.HTTPRoute{})
+ Invokes(testing.NewUpdateSubresourceActionWithOptions(httproutesResource, "status", c.ns, hTTPRoute, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1.HTTPRoute), err
}
@@ -126,7 +131,7 @@ func (c *FakeHTTPRoutes) Delete(ctx context.Context, name string, opts metav1.De
// DeleteCollection deletes a collection of objects.
func (c *FakeHTTPRoutes) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
- action := testing.NewDeleteCollectionAction(httproutesResource, c.ns, listOpts)
+ action := testing.NewDeleteCollectionActionWithOptions(httproutesResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1.HTTPRouteList{})
return err
@@ -134,11 +139,12 @@ func (c *FakeHTTPRoutes) DeleteCollection(ctx context.Context, opts metav1.Delet
// Patch applies the patch and returns the patched hTTPRoute.
func (c *FakeHTTPRoutes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.HTTPRoute, err error) {
+ emptyResult := &v1.HTTPRoute{}
obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(httproutesResource, c.ns, name, pt, data, subresources...), &v1.HTTPRoute{})
+ Invokes(testing.NewPatchSubresourceActionWithOptions(httproutesResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1.HTTPRoute), err
}
@@ -156,11 +162,12 @@ func (c *FakeHTTPRoutes) Apply(ctx context.Context, hTTPRoute *apisv1.HTTPRouteA
if name == nil {
return nil, fmt.Errorf("hTTPRoute.Name must be provided to Apply")
}
+ emptyResult := &v1.HTTPRoute{}
obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(httproutesResource, c.ns, *name, types.ApplyPatchType, data), &v1.HTTPRoute{})
+ Invokes(testing.NewPatchSubresourceActionWithOptions(httproutesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1.HTTPRoute), err
}
@@ -179,11 +186,12 @@ func (c *FakeHTTPRoutes) ApplyStatus(ctx context.Context, hTTPRoute *apisv1.HTTP
if name == nil {
return nil, fmt.Errorf("hTTPRoute.Name must be provided to Apply")
}
+ emptyResult := &v1.HTTPRoute{}
obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(httproutesResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1.HTTPRoute{})
+ Invokes(testing.NewPatchSubresourceActionWithOptions(httproutesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1.HTTPRoute), err
}
diff --git a/pkg/client/clientset/versioned/typed/apis/v1/gateway.go b/pkg/client/clientset/versioned/typed/apis/v1/gateway.go
index 9ad264580d..0e7d9372a5 100644
--- a/pkg/client/clientset/versioned/typed/apis/v1/gateway.go
+++ b/pkg/client/clientset/versioned/typed/apis/v1/gateway.go
@@ -20,14 +20,11 @@ package v1
import (
"context"
- json "encoding/json"
- "fmt"
- "time"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
- rest "k8s.io/client-go/rest"
+ gentype "k8s.io/client-go/gentype"
apisv1 "sigs.k8s.io/gateway-api/apis/applyconfiguration/apis/v1"
v1 "sigs.k8s.io/gateway-api/apis/v1"
scheme "sigs.k8s.io/gateway-api/pkg/client/clientset/versioned/scheme"
@@ -43,6 +40,7 @@ type GatewaysGetter interface {
type GatewayInterface interface {
Create(ctx context.Context, gateway *v1.Gateway, opts metav1.CreateOptions) (*v1.Gateway, error)
Update(ctx context.Context, gateway *v1.Gateway, opts metav1.UpdateOptions) (*v1.Gateway, error)
+ // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, gateway *v1.Gateway, opts metav1.UpdateOptions) (*v1.Gateway, error)
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
@@ -51,206 +49,25 @@ type GatewayInterface interface {
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Gateway, err error)
Apply(ctx context.Context, gateway *apisv1.GatewayApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Gateway, err error)
+ // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
ApplyStatus(ctx context.Context, gateway *apisv1.GatewayApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Gateway, err error)
GatewayExpansion
}
// gateways implements GatewayInterface
type gateways struct {
- client rest.Interface
- ns string
+ *gentype.ClientWithListAndApply[*v1.Gateway, *v1.GatewayList, *apisv1.GatewayApplyConfiguration]
}
// newGateways returns a Gateways
func newGateways(c *GatewayV1Client, namespace string) *gateways {
return &gateways{
- client: c.RESTClient(),
- ns: namespace,
+ gentype.NewClientWithListAndApply[*v1.Gateway, *v1.GatewayList, *apisv1.GatewayApplyConfiguration](
+ "gateways",
+ c.RESTClient(),
+ scheme.ParameterCodec,
+ namespace,
+ func() *v1.Gateway { return &v1.Gateway{} },
+ func() *v1.GatewayList { return &v1.GatewayList{} }),
}
}
-
-// Get takes name of the gateway, and returns the corresponding gateway object, and an error if there is any.
-func (c *gateways) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Gateway, err error) {
- result = &v1.Gateway{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("gateways").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do(ctx).
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of Gateways that match those selectors.
-func (c *gateways) List(ctx context.Context, opts metav1.ListOptions) (result *v1.GatewayList, err error) {
- var timeout time.Duration
- if opts.TimeoutSeconds != nil {
- timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
- }
- result = &v1.GatewayList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("gateways").
- VersionedParams(&opts, scheme.ParameterCodec).
- Timeout(timeout).
- Do(ctx).
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested gateways.
-func (c *gateways) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
- var timeout time.Duration
- if opts.TimeoutSeconds != nil {
- timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
- }
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("gateways").
- VersionedParams(&opts, scheme.ParameterCodec).
- Timeout(timeout).
- Watch(ctx)
-}
-
-// Create takes the representation of a gateway and creates it. Returns the server's representation of the gateway, and an error, if there is any.
-func (c *gateways) Create(ctx context.Context, gateway *v1.Gateway, opts metav1.CreateOptions) (result *v1.Gateway, err error) {
- result = &v1.Gateway{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("gateways").
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(gateway).
- Do(ctx).
- Into(result)
- return
-}
-
-// Update takes the representation of a gateway and updates it. Returns the server's representation of the gateway, and an error, if there is any.
-func (c *gateways) Update(ctx context.Context, gateway *v1.Gateway, opts metav1.UpdateOptions) (result *v1.Gateway, err error) {
- result = &v1.Gateway{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("gateways").
- Name(gateway.Name).
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(gateway).
- Do(ctx).
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-func (c *gateways) UpdateStatus(ctx context.Context, gateway *v1.Gateway, opts metav1.UpdateOptions) (result *v1.Gateway, err error) {
- result = &v1.Gateway{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("gateways").
- Name(gateway.Name).
- SubResource("status").
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(gateway).
- Do(ctx).
- Into(result)
- return
-}
-
-// Delete takes name of the gateway and deletes it. Returns an error if one occurs.
-func (c *gateways) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("gateways").
- Name(name).
- Body(&opts).
- Do(ctx).
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *gateways) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
- var timeout time.Duration
- if listOpts.TimeoutSeconds != nil {
- timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
- }
- return c.client.Delete().
- Namespace(c.ns).
- Resource("gateways").
- VersionedParams(&listOpts, scheme.ParameterCodec).
- Timeout(timeout).
- Body(&opts).
- Do(ctx).
- Error()
-}
-
-// Patch applies the patch and returns the patched gateway.
-func (c *gateways) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Gateway, err error) {
- result = &v1.Gateway{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("gateways").
- Name(name).
- SubResource(subresources...).
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
-
-// Apply takes the given apply declarative configuration, applies it and returns the applied gateway.
-func (c *gateways) Apply(ctx context.Context, gateway *apisv1.GatewayApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Gateway, err error) {
- if gateway == nil {
- return nil, fmt.Errorf("gateway provided to Apply must not be nil")
- }
- patchOpts := opts.ToPatchOptions()
- data, err := json.Marshal(gateway)
- if err != nil {
- return nil, err
- }
- name := gateway.Name
- if name == nil {
- return nil, fmt.Errorf("gateway.Name must be provided to Apply")
- }
- result = &v1.Gateway{}
- err = c.client.Patch(types.ApplyPatchType).
- Namespace(c.ns).
- Resource("gateways").
- Name(*name).
- VersionedParams(&patchOpts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
-
-// ApplyStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
-func (c *gateways) ApplyStatus(ctx context.Context, gateway *apisv1.GatewayApplyConfiguration, opts metav1.ApplyOptions) (result *v1.Gateway, err error) {
- if gateway == nil {
- return nil, fmt.Errorf("gateway provided to Apply must not be nil")
- }
- patchOpts := opts.ToPatchOptions()
- data, err := json.Marshal(gateway)
- if err != nil {
- return nil, err
- }
-
- name := gateway.Name
- if name == nil {
- return nil, fmt.Errorf("gateway.Name must be provided to Apply")
- }
-
- result = &v1.Gateway{}
- err = c.client.Patch(types.ApplyPatchType).
- Namespace(c.ns).
- Resource("gateways").
- Name(*name).
- SubResource("status").
- VersionedParams(&patchOpts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
diff --git a/pkg/client/clientset/versioned/typed/apis/v1/gatewayclass.go b/pkg/client/clientset/versioned/typed/apis/v1/gatewayclass.go
index 817b92a7c3..2f764f147d 100644
--- a/pkg/client/clientset/versioned/typed/apis/v1/gatewayclass.go
+++ b/pkg/client/clientset/versioned/typed/apis/v1/gatewayclass.go
@@ -20,14 +20,11 @@ package v1
import (
"context"
- json "encoding/json"
- "fmt"
- "time"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
- rest "k8s.io/client-go/rest"
+ gentype "k8s.io/client-go/gentype"
apisv1 "sigs.k8s.io/gateway-api/apis/applyconfiguration/apis/v1"
v1 "sigs.k8s.io/gateway-api/apis/v1"
scheme "sigs.k8s.io/gateway-api/pkg/client/clientset/versioned/scheme"
@@ -43,6 +40,7 @@ type GatewayClassesGetter interface {
type GatewayClassInterface interface {
Create(ctx context.Context, gatewayClass *v1.GatewayClass, opts metav1.CreateOptions) (*v1.GatewayClass, error)
Update(ctx context.Context, gatewayClass *v1.GatewayClass, opts metav1.UpdateOptions) (*v1.GatewayClass, error)
+ // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, gatewayClass *v1.GatewayClass, opts metav1.UpdateOptions) (*v1.GatewayClass, error)
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
@@ -51,193 +49,25 @@ type GatewayClassInterface interface {
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.GatewayClass, err error)
Apply(ctx context.Context, gatewayClass *apisv1.GatewayClassApplyConfiguration, opts metav1.ApplyOptions) (result *v1.GatewayClass, err error)
+ // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
ApplyStatus(ctx context.Context, gatewayClass *apisv1.GatewayClassApplyConfiguration, opts metav1.ApplyOptions) (result *v1.GatewayClass, err error)
GatewayClassExpansion
}
// gatewayClasses implements GatewayClassInterface
type gatewayClasses struct {
- client rest.Interface
+ *gentype.ClientWithListAndApply[*v1.GatewayClass, *v1.GatewayClassList, *apisv1.GatewayClassApplyConfiguration]
}
// newGatewayClasses returns a GatewayClasses
func newGatewayClasses(c *GatewayV1Client) *gatewayClasses {
return &gatewayClasses{
- client: c.RESTClient(),
+ gentype.NewClientWithListAndApply[*v1.GatewayClass, *v1.GatewayClassList, *apisv1.GatewayClassApplyConfiguration](
+ "gatewayclasses",
+ c.RESTClient(),
+ scheme.ParameterCodec,
+ "",
+ func() *v1.GatewayClass { return &v1.GatewayClass{} },
+ func() *v1.GatewayClassList { return &v1.GatewayClassList{} }),
}
}
-
-// Get takes name of the gatewayClass, and returns the corresponding gatewayClass object, and an error if there is any.
-func (c *gatewayClasses) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.GatewayClass, err error) {
- result = &v1.GatewayClass{}
- err = c.client.Get().
- Resource("gatewayclasses").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do(ctx).
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of GatewayClasses that match those selectors.
-func (c *gatewayClasses) List(ctx context.Context, opts metav1.ListOptions) (result *v1.GatewayClassList, err error) {
- var timeout time.Duration
- if opts.TimeoutSeconds != nil {
- timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
- }
- result = &v1.GatewayClassList{}
- err = c.client.Get().
- Resource("gatewayclasses").
- VersionedParams(&opts, scheme.ParameterCodec).
- Timeout(timeout).
- Do(ctx).
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested gatewayClasses.
-func (c *gatewayClasses) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
- var timeout time.Duration
- if opts.TimeoutSeconds != nil {
- timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
- }
- opts.Watch = true
- return c.client.Get().
- Resource("gatewayclasses").
- VersionedParams(&opts, scheme.ParameterCodec).
- Timeout(timeout).
- Watch(ctx)
-}
-
-// Create takes the representation of a gatewayClass and creates it. Returns the server's representation of the gatewayClass, and an error, if there is any.
-func (c *gatewayClasses) Create(ctx context.Context, gatewayClass *v1.GatewayClass, opts metav1.CreateOptions) (result *v1.GatewayClass, err error) {
- result = &v1.GatewayClass{}
- err = c.client.Post().
- Resource("gatewayclasses").
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(gatewayClass).
- Do(ctx).
- Into(result)
- return
-}
-
-// Update takes the representation of a gatewayClass and updates it. Returns the server's representation of the gatewayClass, and an error, if there is any.
-func (c *gatewayClasses) Update(ctx context.Context, gatewayClass *v1.GatewayClass, opts metav1.UpdateOptions) (result *v1.GatewayClass, err error) {
- result = &v1.GatewayClass{}
- err = c.client.Put().
- Resource("gatewayclasses").
- Name(gatewayClass.Name).
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(gatewayClass).
- Do(ctx).
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-func (c *gatewayClasses) UpdateStatus(ctx context.Context, gatewayClass *v1.GatewayClass, opts metav1.UpdateOptions) (result *v1.GatewayClass, err error) {
- result = &v1.GatewayClass{}
- err = c.client.Put().
- Resource("gatewayclasses").
- Name(gatewayClass.Name).
- SubResource("status").
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(gatewayClass).
- Do(ctx).
- Into(result)
- return
-}
-
-// Delete takes name of the gatewayClass and deletes it. Returns an error if one occurs.
-func (c *gatewayClasses) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
- return c.client.Delete().
- Resource("gatewayclasses").
- Name(name).
- Body(&opts).
- Do(ctx).
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *gatewayClasses) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
- var timeout time.Duration
- if listOpts.TimeoutSeconds != nil {
- timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
- }
- return c.client.Delete().
- Resource("gatewayclasses").
- VersionedParams(&listOpts, scheme.ParameterCodec).
- Timeout(timeout).
- Body(&opts).
- Do(ctx).
- Error()
-}
-
-// Patch applies the patch and returns the patched gatewayClass.
-func (c *gatewayClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.GatewayClass, err error) {
- result = &v1.GatewayClass{}
- err = c.client.Patch(pt).
- Resource("gatewayclasses").
- Name(name).
- SubResource(subresources...).
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
-
-// Apply takes the given apply declarative configuration, applies it and returns the applied gatewayClass.
-func (c *gatewayClasses) Apply(ctx context.Context, gatewayClass *apisv1.GatewayClassApplyConfiguration, opts metav1.ApplyOptions) (result *v1.GatewayClass, err error) {
- if gatewayClass == nil {
- return nil, fmt.Errorf("gatewayClass provided to Apply must not be nil")
- }
- patchOpts := opts.ToPatchOptions()
- data, err := json.Marshal(gatewayClass)
- if err != nil {
- return nil, err
- }
- name := gatewayClass.Name
- if name == nil {
- return nil, fmt.Errorf("gatewayClass.Name must be provided to Apply")
- }
- result = &v1.GatewayClass{}
- err = c.client.Patch(types.ApplyPatchType).
- Resource("gatewayclasses").
- Name(*name).
- VersionedParams(&patchOpts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
-
-// ApplyStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
-func (c *gatewayClasses) ApplyStatus(ctx context.Context, gatewayClass *apisv1.GatewayClassApplyConfiguration, opts metav1.ApplyOptions) (result *v1.GatewayClass, err error) {
- if gatewayClass == nil {
- return nil, fmt.Errorf("gatewayClass provided to Apply must not be nil")
- }
- patchOpts := opts.ToPatchOptions()
- data, err := json.Marshal(gatewayClass)
- if err != nil {
- return nil, err
- }
-
- name := gatewayClass.Name
- if name == nil {
- return nil, fmt.Errorf("gatewayClass.Name must be provided to Apply")
- }
-
- result = &v1.GatewayClass{}
- err = c.client.Patch(types.ApplyPatchType).
- Resource("gatewayclasses").
- Name(*name).
- SubResource("status").
- VersionedParams(&patchOpts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
diff --git a/pkg/client/clientset/versioned/typed/apis/v1/grpcroute.go b/pkg/client/clientset/versioned/typed/apis/v1/grpcroute.go
index f8e1c2132f..55748a1d29 100644
--- a/pkg/client/clientset/versioned/typed/apis/v1/grpcroute.go
+++ b/pkg/client/clientset/versioned/typed/apis/v1/grpcroute.go
@@ -20,14 +20,11 @@ package v1
import (
"context"
- json "encoding/json"
- "fmt"
- "time"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
- rest "k8s.io/client-go/rest"
+ gentype "k8s.io/client-go/gentype"
apisv1 "sigs.k8s.io/gateway-api/apis/applyconfiguration/apis/v1"
v1 "sigs.k8s.io/gateway-api/apis/v1"
scheme "sigs.k8s.io/gateway-api/pkg/client/clientset/versioned/scheme"
@@ -43,6 +40,7 @@ type GRPCRoutesGetter interface {
type GRPCRouteInterface interface {
Create(ctx context.Context, gRPCRoute *v1.GRPCRoute, opts metav1.CreateOptions) (*v1.GRPCRoute, error)
Update(ctx context.Context, gRPCRoute *v1.GRPCRoute, opts metav1.UpdateOptions) (*v1.GRPCRoute, error)
+ // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, gRPCRoute *v1.GRPCRoute, opts metav1.UpdateOptions) (*v1.GRPCRoute, error)
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
@@ -51,206 +49,25 @@ type GRPCRouteInterface interface {
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.GRPCRoute, err error)
Apply(ctx context.Context, gRPCRoute *apisv1.GRPCRouteApplyConfiguration, opts metav1.ApplyOptions) (result *v1.GRPCRoute, err error)
+ // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
ApplyStatus(ctx context.Context, gRPCRoute *apisv1.GRPCRouteApplyConfiguration, opts metav1.ApplyOptions) (result *v1.GRPCRoute, err error)
GRPCRouteExpansion
}
// gRPCRoutes implements GRPCRouteInterface
type gRPCRoutes struct {
- client rest.Interface
- ns string
+ *gentype.ClientWithListAndApply[*v1.GRPCRoute, *v1.GRPCRouteList, *apisv1.GRPCRouteApplyConfiguration]
}
// newGRPCRoutes returns a GRPCRoutes
func newGRPCRoutes(c *GatewayV1Client, namespace string) *gRPCRoutes {
return &gRPCRoutes{
- client: c.RESTClient(),
- ns: namespace,
+ gentype.NewClientWithListAndApply[*v1.GRPCRoute, *v1.GRPCRouteList, *apisv1.GRPCRouteApplyConfiguration](
+ "grpcroutes",
+ c.RESTClient(),
+ scheme.ParameterCodec,
+ namespace,
+ func() *v1.GRPCRoute { return &v1.GRPCRoute{} },
+ func() *v1.GRPCRouteList { return &v1.GRPCRouteList{} }),
}
}
-
-// Get takes name of the gRPCRoute, and returns the corresponding gRPCRoute object, and an error if there is any.
-func (c *gRPCRoutes) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.GRPCRoute, err error) {
- result = &v1.GRPCRoute{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("grpcroutes").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do(ctx).
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of GRPCRoutes that match those selectors.
-func (c *gRPCRoutes) List(ctx context.Context, opts metav1.ListOptions) (result *v1.GRPCRouteList, err error) {
- var timeout time.Duration
- if opts.TimeoutSeconds != nil {
- timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
- }
- result = &v1.GRPCRouteList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("grpcroutes").
- VersionedParams(&opts, scheme.ParameterCodec).
- Timeout(timeout).
- Do(ctx).
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested gRPCRoutes.
-func (c *gRPCRoutes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
- var timeout time.Duration
- if opts.TimeoutSeconds != nil {
- timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
- }
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("grpcroutes").
- VersionedParams(&opts, scheme.ParameterCodec).
- Timeout(timeout).
- Watch(ctx)
-}
-
-// Create takes the representation of a gRPCRoute and creates it. Returns the server's representation of the gRPCRoute, and an error, if there is any.
-func (c *gRPCRoutes) Create(ctx context.Context, gRPCRoute *v1.GRPCRoute, opts metav1.CreateOptions) (result *v1.GRPCRoute, err error) {
- result = &v1.GRPCRoute{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("grpcroutes").
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(gRPCRoute).
- Do(ctx).
- Into(result)
- return
-}
-
-// Update takes the representation of a gRPCRoute and updates it. Returns the server's representation of the gRPCRoute, and an error, if there is any.
-func (c *gRPCRoutes) Update(ctx context.Context, gRPCRoute *v1.GRPCRoute, opts metav1.UpdateOptions) (result *v1.GRPCRoute, err error) {
- result = &v1.GRPCRoute{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("grpcroutes").
- Name(gRPCRoute.Name).
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(gRPCRoute).
- Do(ctx).
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-func (c *gRPCRoutes) UpdateStatus(ctx context.Context, gRPCRoute *v1.GRPCRoute, opts metav1.UpdateOptions) (result *v1.GRPCRoute, err error) {
- result = &v1.GRPCRoute{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("grpcroutes").
- Name(gRPCRoute.Name).
- SubResource("status").
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(gRPCRoute).
- Do(ctx).
- Into(result)
- return
-}
-
-// Delete takes name of the gRPCRoute and deletes it. Returns an error if one occurs.
-func (c *gRPCRoutes) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("grpcroutes").
- Name(name).
- Body(&opts).
- Do(ctx).
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *gRPCRoutes) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
- var timeout time.Duration
- if listOpts.TimeoutSeconds != nil {
- timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
- }
- return c.client.Delete().
- Namespace(c.ns).
- Resource("grpcroutes").
- VersionedParams(&listOpts, scheme.ParameterCodec).
- Timeout(timeout).
- Body(&opts).
- Do(ctx).
- Error()
-}
-
-// Patch applies the patch and returns the patched gRPCRoute.
-func (c *gRPCRoutes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.GRPCRoute, err error) {
- result = &v1.GRPCRoute{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("grpcroutes").
- Name(name).
- SubResource(subresources...).
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
-
-// Apply takes the given apply declarative configuration, applies it and returns the applied gRPCRoute.
-func (c *gRPCRoutes) Apply(ctx context.Context, gRPCRoute *apisv1.GRPCRouteApplyConfiguration, opts metav1.ApplyOptions) (result *v1.GRPCRoute, err error) {
- if gRPCRoute == nil {
- return nil, fmt.Errorf("gRPCRoute provided to Apply must not be nil")
- }
- patchOpts := opts.ToPatchOptions()
- data, err := json.Marshal(gRPCRoute)
- if err != nil {
- return nil, err
- }
- name := gRPCRoute.Name
- if name == nil {
- return nil, fmt.Errorf("gRPCRoute.Name must be provided to Apply")
- }
- result = &v1.GRPCRoute{}
- err = c.client.Patch(types.ApplyPatchType).
- Namespace(c.ns).
- Resource("grpcroutes").
- Name(*name).
- VersionedParams(&patchOpts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
-
-// ApplyStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
-func (c *gRPCRoutes) ApplyStatus(ctx context.Context, gRPCRoute *apisv1.GRPCRouteApplyConfiguration, opts metav1.ApplyOptions) (result *v1.GRPCRoute, err error) {
- if gRPCRoute == nil {
- return nil, fmt.Errorf("gRPCRoute provided to Apply must not be nil")
- }
- patchOpts := opts.ToPatchOptions()
- data, err := json.Marshal(gRPCRoute)
- if err != nil {
- return nil, err
- }
-
- name := gRPCRoute.Name
- if name == nil {
- return nil, fmt.Errorf("gRPCRoute.Name must be provided to Apply")
- }
-
- result = &v1.GRPCRoute{}
- err = c.client.Patch(types.ApplyPatchType).
- Namespace(c.ns).
- Resource("grpcroutes").
- Name(*name).
- SubResource("status").
- VersionedParams(&patchOpts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
diff --git a/pkg/client/clientset/versioned/typed/apis/v1/httproute.go b/pkg/client/clientset/versioned/typed/apis/v1/httproute.go
index 89cab587c2..29f4fe9c6b 100644
--- a/pkg/client/clientset/versioned/typed/apis/v1/httproute.go
+++ b/pkg/client/clientset/versioned/typed/apis/v1/httproute.go
@@ -20,14 +20,11 @@ package v1
import (
"context"
- json "encoding/json"
- "fmt"
- "time"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
- rest "k8s.io/client-go/rest"
+ gentype "k8s.io/client-go/gentype"
apisv1 "sigs.k8s.io/gateway-api/apis/applyconfiguration/apis/v1"
v1 "sigs.k8s.io/gateway-api/apis/v1"
scheme "sigs.k8s.io/gateway-api/pkg/client/clientset/versioned/scheme"
@@ -43,6 +40,7 @@ type HTTPRoutesGetter interface {
type HTTPRouteInterface interface {
Create(ctx context.Context, hTTPRoute *v1.HTTPRoute, opts metav1.CreateOptions) (*v1.HTTPRoute, error)
Update(ctx context.Context, hTTPRoute *v1.HTTPRoute, opts metav1.UpdateOptions) (*v1.HTTPRoute, error)
+ // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, hTTPRoute *v1.HTTPRoute, opts metav1.UpdateOptions) (*v1.HTTPRoute, error)
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
@@ -51,206 +49,25 @@ type HTTPRouteInterface interface {
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.HTTPRoute, err error)
Apply(ctx context.Context, hTTPRoute *apisv1.HTTPRouteApplyConfiguration, opts metav1.ApplyOptions) (result *v1.HTTPRoute, err error)
+ // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
ApplyStatus(ctx context.Context, hTTPRoute *apisv1.HTTPRouteApplyConfiguration, opts metav1.ApplyOptions) (result *v1.HTTPRoute, err error)
HTTPRouteExpansion
}
// hTTPRoutes implements HTTPRouteInterface
type hTTPRoutes struct {
- client rest.Interface
- ns string
+ *gentype.ClientWithListAndApply[*v1.HTTPRoute, *v1.HTTPRouteList, *apisv1.HTTPRouteApplyConfiguration]
}
// newHTTPRoutes returns a HTTPRoutes
func newHTTPRoutes(c *GatewayV1Client, namespace string) *hTTPRoutes {
return &hTTPRoutes{
- client: c.RESTClient(),
- ns: namespace,
+ gentype.NewClientWithListAndApply[*v1.HTTPRoute, *v1.HTTPRouteList, *apisv1.HTTPRouteApplyConfiguration](
+ "httproutes",
+ c.RESTClient(),
+ scheme.ParameterCodec,
+ namespace,
+ func() *v1.HTTPRoute { return &v1.HTTPRoute{} },
+ func() *v1.HTTPRouteList { return &v1.HTTPRouteList{} }),
}
}
-
-// Get takes name of the hTTPRoute, and returns the corresponding hTTPRoute object, and an error if there is any.
-func (c *hTTPRoutes) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.HTTPRoute, err error) {
- result = &v1.HTTPRoute{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("httproutes").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do(ctx).
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of HTTPRoutes that match those selectors.
-func (c *hTTPRoutes) List(ctx context.Context, opts metav1.ListOptions) (result *v1.HTTPRouteList, err error) {
- var timeout time.Duration
- if opts.TimeoutSeconds != nil {
- timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
- }
- result = &v1.HTTPRouteList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("httproutes").
- VersionedParams(&opts, scheme.ParameterCodec).
- Timeout(timeout).
- Do(ctx).
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested hTTPRoutes.
-func (c *hTTPRoutes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
- var timeout time.Duration
- if opts.TimeoutSeconds != nil {
- timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
- }
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("httproutes").
- VersionedParams(&opts, scheme.ParameterCodec).
- Timeout(timeout).
- Watch(ctx)
-}
-
-// Create takes the representation of a hTTPRoute and creates it. Returns the server's representation of the hTTPRoute, and an error, if there is any.
-func (c *hTTPRoutes) Create(ctx context.Context, hTTPRoute *v1.HTTPRoute, opts metav1.CreateOptions) (result *v1.HTTPRoute, err error) {
- result = &v1.HTTPRoute{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("httproutes").
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(hTTPRoute).
- Do(ctx).
- Into(result)
- return
-}
-
-// Update takes the representation of a hTTPRoute and updates it. Returns the server's representation of the hTTPRoute, and an error, if there is any.
-func (c *hTTPRoutes) Update(ctx context.Context, hTTPRoute *v1.HTTPRoute, opts metav1.UpdateOptions) (result *v1.HTTPRoute, err error) {
- result = &v1.HTTPRoute{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("httproutes").
- Name(hTTPRoute.Name).
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(hTTPRoute).
- Do(ctx).
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-func (c *hTTPRoutes) UpdateStatus(ctx context.Context, hTTPRoute *v1.HTTPRoute, opts metav1.UpdateOptions) (result *v1.HTTPRoute, err error) {
- result = &v1.HTTPRoute{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("httproutes").
- Name(hTTPRoute.Name).
- SubResource("status").
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(hTTPRoute).
- Do(ctx).
- Into(result)
- return
-}
-
-// Delete takes name of the hTTPRoute and deletes it. Returns an error if one occurs.
-func (c *hTTPRoutes) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("httproutes").
- Name(name).
- Body(&opts).
- Do(ctx).
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *hTTPRoutes) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
- var timeout time.Duration
- if listOpts.TimeoutSeconds != nil {
- timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
- }
- return c.client.Delete().
- Namespace(c.ns).
- Resource("httproutes").
- VersionedParams(&listOpts, scheme.ParameterCodec).
- Timeout(timeout).
- Body(&opts).
- Do(ctx).
- Error()
-}
-
-// Patch applies the patch and returns the patched hTTPRoute.
-func (c *hTTPRoutes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.HTTPRoute, err error) {
- result = &v1.HTTPRoute{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("httproutes").
- Name(name).
- SubResource(subresources...).
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
-
-// Apply takes the given apply declarative configuration, applies it and returns the applied hTTPRoute.
-func (c *hTTPRoutes) Apply(ctx context.Context, hTTPRoute *apisv1.HTTPRouteApplyConfiguration, opts metav1.ApplyOptions) (result *v1.HTTPRoute, err error) {
- if hTTPRoute == nil {
- return nil, fmt.Errorf("hTTPRoute provided to Apply must not be nil")
- }
- patchOpts := opts.ToPatchOptions()
- data, err := json.Marshal(hTTPRoute)
- if err != nil {
- return nil, err
- }
- name := hTTPRoute.Name
- if name == nil {
- return nil, fmt.Errorf("hTTPRoute.Name must be provided to Apply")
- }
- result = &v1.HTTPRoute{}
- err = c.client.Patch(types.ApplyPatchType).
- Namespace(c.ns).
- Resource("httproutes").
- Name(*name).
- VersionedParams(&patchOpts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
-
-// ApplyStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
-func (c *hTTPRoutes) ApplyStatus(ctx context.Context, hTTPRoute *apisv1.HTTPRouteApplyConfiguration, opts metav1.ApplyOptions) (result *v1.HTTPRoute, err error) {
- if hTTPRoute == nil {
- return nil, fmt.Errorf("hTTPRoute provided to Apply must not be nil")
- }
- patchOpts := opts.ToPatchOptions()
- data, err := json.Marshal(hTTPRoute)
- if err != nil {
- return nil, err
- }
-
- name := hTTPRoute.Name
- if name == nil {
- return nil, fmt.Errorf("hTTPRoute.Name must be provided to Apply")
- }
-
- result = &v1.HTTPRoute{}
- err = c.client.Patch(types.ApplyPatchType).
- Namespace(c.ns).
- Resource("httproutes").
- Name(*name).
- SubResource("status").
- VersionedParams(&patchOpts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
diff --git a/pkg/client/clientset/versioned/typed/apis/v1alpha2/backendlbpolicy.go b/pkg/client/clientset/versioned/typed/apis/v1alpha2/backendlbpolicy.go
index 514cac1e28..0429945002 100644
--- a/pkg/client/clientset/versioned/typed/apis/v1alpha2/backendlbpolicy.go
+++ b/pkg/client/clientset/versioned/typed/apis/v1alpha2/backendlbpolicy.go
@@ -20,14 +20,11 @@ package v1alpha2
import (
"context"
- json "encoding/json"
- "fmt"
- "time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
- rest "k8s.io/client-go/rest"
+ gentype "k8s.io/client-go/gentype"
apisv1alpha2 "sigs.k8s.io/gateway-api/apis/applyconfiguration/apis/v1alpha2"
v1alpha2 "sigs.k8s.io/gateway-api/apis/v1alpha2"
scheme "sigs.k8s.io/gateway-api/pkg/client/clientset/versioned/scheme"
@@ -43,6 +40,7 @@ type BackendLBPoliciesGetter interface {
type BackendLBPolicyInterface interface {
Create(ctx context.Context, backendLBPolicy *v1alpha2.BackendLBPolicy, opts v1.CreateOptions) (*v1alpha2.BackendLBPolicy, error)
Update(ctx context.Context, backendLBPolicy *v1alpha2.BackendLBPolicy, opts v1.UpdateOptions) (*v1alpha2.BackendLBPolicy, error)
+ // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, backendLBPolicy *v1alpha2.BackendLBPolicy, opts v1.UpdateOptions) (*v1alpha2.BackendLBPolicy, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
@@ -51,206 +49,25 @@ type BackendLBPolicyInterface interface {
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.BackendLBPolicy, err error)
Apply(ctx context.Context, backendLBPolicy *apisv1alpha2.BackendLBPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.BackendLBPolicy, err error)
+ // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
ApplyStatus(ctx context.Context, backendLBPolicy *apisv1alpha2.BackendLBPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.BackendLBPolicy, err error)
BackendLBPolicyExpansion
}
// backendLBPolicies implements BackendLBPolicyInterface
type backendLBPolicies struct {
- client rest.Interface
- ns string
+ *gentype.ClientWithListAndApply[*v1alpha2.BackendLBPolicy, *v1alpha2.BackendLBPolicyList, *apisv1alpha2.BackendLBPolicyApplyConfiguration]
}
// newBackendLBPolicies returns a BackendLBPolicies
func newBackendLBPolicies(c *GatewayV1alpha2Client, namespace string) *backendLBPolicies {
return &backendLBPolicies{
- client: c.RESTClient(),
- ns: namespace,
+ gentype.NewClientWithListAndApply[*v1alpha2.BackendLBPolicy, *v1alpha2.BackendLBPolicyList, *apisv1alpha2.BackendLBPolicyApplyConfiguration](
+ "backendlbpolicies",
+ c.RESTClient(),
+ scheme.ParameterCodec,
+ namespace,
+ func() *v1alpha2.BackendLBPolicy { return &v1alpha2.BackendLBPolicy{} },
+ func() *v1alpha2.BackendLBPolicyList { return &v1alpha2.BackendLBPolicyList{} }),
}
}
-
-// Get takes name of the backendLBPolicy, and returns the corresponding backendLBPolicy object, and an error if there is any.
-func (c *backendLBPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.BackendLBPolicy, err error) {
- result = &v1alpha2.BackendLBPolicy{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("backendlbpolicies").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do(ctx).
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of BackendLBPolicies that match those selectors.
-func (c *backendLBPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.BackendLBPolicyList, err error) {
- var timeout time.Duration
- if opts.TimeoutSeconds != nil {
- timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
- }
- result = &v1alpha2.BackendLBPolicyList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("backendlbpolicies").
- VersionedParams(&opts, scheme.ParameterCodec).
- Timeout(timeout).
- Do(ctx).
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested backendLBPolicies.
-func (c *backendLBPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
- var timeout time.Duration
- if opts.TimeoutSeconds != nil {
- timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
- }
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("backendlbpolicies").
- VersionedParams(&opts, scheme.ParameterCodec).
- Timeout(timeout).
- Watch(ctx)
-}
-
-// Create takes the representation of a backendLBPolicy and creates it. Returns the server's representation of the backendLBPolicy, and an error, if there is any.
-func (c *backendLBPolicies) Create(ctx context.Context, backendLBPolicy *v1alpha2.BackendLBPolicy, opts v1.CreateOptions) (result *v1alpha2.BackendLBPolicy, err error) {
- result = &v1alpha2.BackendLBPolicy{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("backendlbpolicies").
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(backendLBPolicy).
- Do(ctx).
- Into(result)
- return
-}
-
-// Update takes the representation of a backendLBPolicy and updates it. Returns the server's representation of the backendLBPolicy, and an error, if there is any.
-func (c *backendLBPolicies) Update(ctx context.Context, backendLBPolicy *v1alpha2.BackendLBPolicy, opts v1.UpdateOptions) (result *v1alpha2.BackendLBPolicy, err error) {
- result = &v1alpha2.BackendLBPolicy{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("backendlbpolicies").
- Name(backendLBPolicy.Name).
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(backendLBPolicy).
- Do(ctx).
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-func (c *backendLBPolicies) UpdateStatus(ctx context.Context, backendLBPolicy *v1alpha2.BackendLBPolicy, opts v1.UpdateOptions) (result *v1alpha2.BackendLBPolicy, err error) {
- result = &v1alpha2.BackendLBPolicy{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("backendlbpolicies").
- Name(backendLBPolicy.Name).
- SubResource("status").
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(backendLBPolicy).
- Do(ctx).
- Into(result)
- return
-}
-
-// Delete takes name of the backendLBPolicy and deletes it. Returns an error if one occurs.
-func (c *backendLBPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("backendlbpolicies").
- Name(name).
- Body(&opts).
- Do(ctx).
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *backendLBPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
- var timeout time.Duration
- if listOpts.TimeoutSeconds != nil {
- timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
- }
- return c.client.Delete().
- Namespace(c.ns).
- Resource("backendlbpolicies").
- VersionedParams(&listOpts, scheme.ParameterCodec).
- Timeout(timeout).
- Body(&opts).
- Do(ctx).
- Error()
-}
-
-// Patch applies the patch and returns the patched backendLBPolicy.
-func (c *backendLBPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.BackendLBPolicy, err error) {
- result = &v1alpha2.BackendLBPolicy{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("backendlbpolicies").
- Name(name).
- SubResource(subresources...).
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
-
-// Apply takes the given apply declarative configuration, applies it and returns the applied backendLBPolicy.
-func (c *backendLBPolicies) Apply(ctx context.Context, backendLBPolicy *apisv1alpha2.BackendLBPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.BackendLBPolicy, err error) {
- if backendLBPolicy == nil {
- return nil, fmt.Errorf("backendLBPolicy provided to Apply must not be nil")
- }
- patchOpts := opts.ToPatchOptions()
- data, err := json.Marshal(backendLBPolicy)
- if err != nil {
- return nil, err
- }
- name := backendLBPolicy.Name
- if name == nil {
- return nil, fmt.Errorf("backendLBPolicy.Name must be provided to Apply")
- }
- result = &v1alpha2.BackendLBPolicy{}
- err = c.client.Patch(types.ApplyPatchType).
- Namespace(c.ns).
- Resource("backendlbpolicies").
- Name(*name).
- VersionedParams(&patchOpts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
-
-// ApplyStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
-func (c *backendLBPolicies) ApplyStatus(ctx context.Context, backendLBPolicy *apisv1alpha2.BackendLBPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.BackendLBPolicy, err error) {
- if backendLBPolicy == nil {
- return nil, fmt.Errorf("backendLBPolicy provided to Apply must not be nil")
- }
- patchOpts := opts.ToPatchOptions()
- data, err := json.Marshal(backendLBPolicy)
- if err != nil {
- return nil, err
- }
-
- name := backendLBPolicy.Name
- if name == nil {
- return nil, fmt.Errorf("backendLBPolicy.Name must be provided to Apply")
- }
-
- result = &v1alpha2.BackendLBPolicy{}
- err = c.client.Patch(types.ApplyPatchType).
- Namespace(c.ns).
- Resource("backendlbpolicies").
- Name(*name).
- SubResource("status").
- VersionedParams(&patchOpts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
diff --git a/pkg/client/clientset/versioned/typed/apis/v1alpha2/fake/fake_backendlbpolicy.go b/pkg/client/clientset/versioned/typed/apis/v1alpha2/fake/fake_backendlbpolicy.go
index dab088600b..9053eac042 100644
--- a/pkg/client/clientset/versioned/typed/apis/v1alpha2/fake/fake_backendlbpolicy.go
+++ b/pkg/client/clientset/versioned/typed/apis/v1alpha2/fake/fake_backendlbpolicy.go
@@ -44,22 +44,24 @@ var backendlbpoliciesKind = v1alpha2.SchemeGroupVersion.WithKind("BackendLBPolic
// Get takes name of the backendLBPolicy, and returns the corresponding backendLBPolicy object, and an error if there is any.
func (c *FakeBackendLBPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.BackendLBPolicy, err error) {
+ emptyResult := &v1alpha2.BackendLBPolicy{}
obj, err := c.Fake.
- Invokes(testing.NewGetAction(backendlbpoliciesResource, c.ns, name), &v1alpha2.BackendLBPolicy{})
+ Invokes(testing.NewGetActionWithOptions(backendlbpoliciesResource, c.ns, name, options), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha2.BackendLBPolicy), err
}
// List takes label and field selectors, and returns the list of BackendLBPolicies that match those selectors.
func (c *FakeBackendLBPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.BackendLBPolicyList, err error) {
+ emptyResult := &v1alpha2.BackendLBPolicyList{}
obj, err := c.Fake.
- Invokes(testing.NewListAction(backendlbpoliciesResource, backendlbpoliciesKind, c.ns, opts), &v1alpha2.BackendLBPolicyList{})
+ Invokes(testing.NewListActionWithOptions(backendlbpoliciesResource, backendlbpoliciesKind, c.ns, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@@ -78,40 +80,43 @@ func (c *FakeBackendLBPolicies) List(ctx context.Context, opts v1.ListOptions) (
// Watch returns a watch.Interface that watches the requested backendLBPolicies.
func (c *FakeBackendLBPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
- InvokesWatch(testing.NewWatchAction(backendlbpoliciesResource, c.ns, opts))
+ InvokesWatch(testing.NewWatchActionWithOptions(backendlbpoliciesResource, c.ns, opts))
}
// Create takes the representation of a backendLBPolicy and creates it. Returns the server's representation of the backendLBPolicy, and an error, if there is any.
func (c *FakeBackendLBPolicies) Create(ctx context.Context, backendLBPolicy *v1alpha2.BackendLBPolicy, opts v1.CreateOptions) (result *v1alpha2.BackendLBPolicy, err error) {
+ emptyResult := &v1alpha2.BackendLBPolicy{}
obj, err := c.Fake.
- Invokes(testing.NewCreateAction(backendlbpoliciesResource, c.ns, backendLBPolicy), &v1alpha2.BackendLBPolicy{})
+ Invokes(testing.NewCreateActionWithOptions(backendlbpoliciesResource, c.ns, backendLBPolicy, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha2.BackendLBPolicy), err
}
// Update takes the representation of a backendLBPolicy and updates it. Returns the server's representation of the backendLBPolicy, and an error, if there is any.
func (c *FakeBackendLBPolicies) Update(ctx context.Context, backendLBPolicy *v1alpha2.BackendLBPolicy, opts v1.UpdateOptions) (result *v1alpha2.BackendLBPolicy, err error) {
+ emptyResult := &v1alpha2.BackendLBPolicy{}
obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(backendlbpoliciesResource, c.ns, backendLBPolicy), &v1alpha2.BackendLBPolicy{})
+ Invokes(testing.NewUpdateActionWithOptions(backendlbpoliciesResource, c.ns, backendLBPolicy, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha2.BackendLBPolicy), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-func (c *FakeBackendLBPolicies) UpdateStatus(ctx context.Context, backendLBPolicy *v1alpha2.BackendLBPolicy, opts v1.UpdateOptions) (*v1alpha2.BackendLBPolicy, error) {
+func (c *FakeBackendLBPolicies) UpdateStatus(ctx context.Context, backendLBPolicy *v1alpha2.BackendLBPolicy, opts v1.UpdateOptions) (result *v1alpha2.BackendLBPolicy, err error) {
+ emptyResult := &v1alpha2.BackendLBPolicy{}
obj, err := c.Fake.
- Invokes(testing.NewUpdateSubresourceAction(backendlbpoliciesResource, "status", c.ns, backendLBPolicy), &v1alpha2.BackendLBPolicy{})
+ Invokes(testing.NewUpdateSubresourceActionWithOptions(backendlbpoliciesResource, "status", c.ns, backendLBPolicy, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha2.BackendLBPolicy), err
}
@@ -126,7 +131,7 @@ func (c *FakeBackendLBPolicies) Delete(ctx context.Context, name string, opts v1
// DeleteCollection deletes a collection of objects.
func (c *FakeBackendLBPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
- action := testing.NewDeleteCollectionAction(backendlbpoliciesResource, c.ns, listOpts)
+ action := testing.NewDeleteCollectionActionWithOptions(backendlbpoliciesResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha2.BackendLBPolicyList{})
return err
@@ -134,11 +139,12 @@ func (c *FakeBackendLBPolicies) DeleteCollection(ctx context.Context, opts v1.De
// Patch applies the patch and returns the patched backendLBPolicy.
func (c *FakeBackendLBPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.BackendLBPolicy, err error) {
+ emptyResult := &v1alpha2.BackendLBPolicy{}
obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(backendlbpoliciesResource, c.ns, name, pt, data, subresources...), &v1alpha2.BackendLBPolicy{})
+ Invokes(testing.NewPatchSubresourceActionWithOptions(backendlbpoliciesResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha2.BackendLBPolicy), err
}
@@ -156,11 +162,12 @@ func (c *FakeBackendLBPolicies) Apply(ctx context.Context, backendLBPolicy *apis
if name == nil {
return nil, fmt.Errorf("backendLBPolicy.Name must be provided to Apply")
}
+ emptyResult := &v1alpha2.BackendLBPolicy{}
obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(backendlbpoliciesResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha2.BackendLBPolicy{})
+ Invokes(testing.NewPatchSubresourceActionWithOptions(backendlbpoliciesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha2.BackendLBPolicy), err
}
@@ -179,11 +186,12 @@ func (c *FakeBackendLBPolicies) ApplyStatus(ctx context.Context, backendLBPolicy
if name == nil {
return nil, fmt.Errorf("backendLBPolicy.Name must be provided to Apply")
}
+ emptyResult := &v1alpha2.BackendLBPolicy{}
obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(backendlbpoliciesResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1alpha2.BackendLBPolicy{})
+ Invokes(testing.NewPatchSubresourceActionWithOptions(backendlbpoliciesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha2.BackendLBPolicy), err
}
diff --git a/pkg/client/clientset/versioned/typed/apis/v1alpha2/fake/fake_grpcroute.go b/pkg/client/clientset/versioned/typed/apis/v1alpha2/fake/fake_grpcroute.go
index 3059cb9944..82ea2b8db7 100644
--- a/pkg/client/clientset/versioned/typed/apis/v1alpha2/fake/fake_grpcroute.go
+++ b/pkg/client/clientset/versioned/typed/apis/v1alpha2/fake/fake_grpcroute.go
@@ -44,22 +44,24 @@ var grpcroutesKind = v1alpha2.SchemeGroupVersion.WithKind("GRPCRoute")
// Get takes name of the gRPCRoute, and returns the corresponding gRPCRoute object, and an error if there is any.
func (c *FakeGRPCRoutes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.GRPCRoute, err error) {
+ emptyResult := &v1alpha2.GRPCRoute{}
obj, err := c.Fake.
- Invokes(testing.NewGetAction(grpcroutesResource, c.ns, name), &v1alpha2.GRPCRoute{})
+ Invokes(testing.NewGetActionWithOptions(grpcroutesResource, c.ns, name, options), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha2.GRPCRoute), err
}
// List takes label and field selectors, and returns the list of GRPCRoutes that match those selectors.
func (c *FakeGRPCRoutes) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.GRPCRouteList, err error) {
+ emptyResult := &v1alpha2.GRPCRouteList{}
obj, err := c.Fake.
- Invokes(testing.NewListAction(grpcroutesResource, grpcroutesKind, c.ns, opts), &v1alpha2.GRPCRouteList{})
+ Invokes(testing.NewListActionWithOptions(grpcroutesResource, grpcroutesKind, c.ns, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@@ -78,40 +80,43 @@ func (c *FakeGRPCRoutes) List(ctx context.Context, opts v1.ListOptions) (result
// Watch returns a watch.Interface that watches the requested gRPCRoutes.
func (c *FakeGRPCRoutes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
- InvokesWatch(testing.NewWatchAction(grpcroutesResource, c.ns, opts))
+ InvokesWatch(testing.NewWatchActionWithOptions(grpcroutesResource, c.ns, opts))
}
// Create takes the representation of a gRPCRoute and creates it. Returns the server's representation of the gRPCRoute, and an error, if there is any.
func (c *FakeGRPCRoutes) Create(ctx context.Context, gRPCRoute *v1alpha2.GRPCRoute, opts v1.CreateOptions) (result *v1alpha2.GRPCRoute, err error) {
+ emptyResult := &v1alpha2.GRPCRoute{}
obj, err := c.Fake.
- Invokes(testing.NewCreateAction(grpcroutesResource, c.ns, gRPCRoute), &v1alpha2.GRPCRoute{})
+ Invokes(testing.NewCreateActionWithOptions(grpcroutesResource, c.ns, gRPCRoute, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha2.GRPCRoute), err
}
// Update takes the representation of a gRPCRoute and updates it. Returns the server's representation of the gRPCRoute, and an error, if there is any.
func (c *FakeGRPCRoutes) Update(ctx context.Context, gRPCRoute *v1alpha2.GRPCRoute, opts v1.UpdateOptions) (result *v1alpha2.GRPCRoute, err error) {
+ emptyResult := &v1alpha2.GRPCRoute{}
obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(grpcroutesResource, c.ns, gRPCRoute), &v1alpha2.GRPCRoute{})
+ Invokes(testing.NewUpdateActionWithOptions(grpcroutesResource, c.ns, gRPCRoute, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha2.GRPCRoute), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-func (c *FakeGRPCRoutes) UpdateStatus(ctx context.Context, gRPCRoute *v1alpha2.GRPCRoute, opts v1.UpdateOptions) (*v1alpha2.GRPCRoute, error) {
+func (c *FakeGRPCRoutes) UpdateStatus(ctx context.Context, gRPCRoute *v1alpha2.GRPCRoute, opts v1.UpdateOptions) (result *v1alpha2.GRPCRoute, err error) {
+ emptyResult := &v1alpha2.GRPCRoute{}
obj, err := c.Fake.
- Invokes(testing.NewUpdateSubresourceAction(grpcroutesResource, "status", c.ns, gRPCRoute), &v1alpha2.GRPCRoute{})
+ Invokes(testing.NewUpdateSubresourceActionWithOptions(grpcroutesResource, "status", c.ns, gRPCRoute, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha2.GRPCRoute), err
}
@@ -126,7 +131,7 @@ func (c *FakeGRPCRoutes) Delete(ctx context.Context, name string, opts v1.Delete
// DeleteCollection deletes a collection of objects.
func (c *FakeGRPCRoutes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
- action := testing.NewDeleteCollectionAction(grpcroutesResource, c.ns, listOpts)
+ action := testing.NewDeleteCollectionActionWithOptions(grpcroutesResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha2.GRPCRouteList{})
return err
@@ -134,11 +139,12 @@ func (c *FakeGRPCRoutes) DeleteCollection(ctx context.Context, opts v1.DeleteOpt
// Patch applies the patch and returns the patched gRPCRoute.
func (c *FakeGRPCRoutes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.GRPCRoute, err error) {
+ emptyResult := &v1alpha2.GRPCRoute{}
obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(grpcroutesResource, c.ns, name, pt, data, subresources...), &v1alpha2.GRPCRoute{})
+ Invokes(testing.NewPatchSubresourceActionWithOptions(grpcroutesResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha2.GRPCRoute), err
}
@@ -156,11 +162,12 @@ func (c *FakeGRPCRoutes) Apply(ctx context.Context, gRPCRoute *apisv1alpha2.GRPC
if name == nil {
return nil, fmt.Errorf("gRPCRoute.Name must be provided to Apply")
}
+ emptyResult := &v1alpha2.GRPCRoute{}
obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(grpcroutesResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha2.GRPCRoute{})
+ Invokes(testing.NewPatchSubresourceActionWithOptions(grpcroutesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha2.GRPCRoute), err
}
@@ -179,11 +186,12 @@ func (c *FakeGRPCRoutes) ApplyStatus(ctx context.Context, gRPCRoute *apisv1alpha
if name == nil {
return nil, fmt.Errorf("gRPCRoute.Name must be provided to Apply")
}
+ emptyResult := &v1alpha2.GRPCRoute{}
obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(grpcroutesResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1alpha2.GRPCRoute{})
+ Invokes(testing.NewPatchSubresourceActionWithOptions(grpcroutesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha2.GRPCRoute), err
}
diff --git a/pkg/client/clientset/versioned/typed/apis/v1alpha2/fake/fake_referencegrant.go b/pkg/client/clientset/versioned/typed/apis/v1alpha2/fake/fake_referencegrant.go
index 50c90fa8a1..31b65d3a5b 100644
--- a/pkg/client/clientset/versioned/typed/apis/v1alpha2/fake/fake_referencegrant.go
+++ b/pkg/client/clientset/versioned/typed/apis/v1alpha2/fake/fake_referencegrant.go
@@ -44,22 +44,24 @@ var referencegrantsKind = v1alpha2.SchemeGroupVersion.WithKind("ReferenceGrant")
// Get takes name of the referenceGrant, and returns the corresponding referenceGrant object, and an error if there is any.
func (c *FakeReferenceGrants) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ReferenceGrant, err error) {
+ emptyResult := &v1alpha2.ReferenceGrant{}
obj, err := c.Fake.
- Invokes(testing.NewGetAction(referencegrantsResource, c.ns, name), &v1alpha2.ReferenceGrant{})
+ Invokes(testing.NewGetActionWithOptions(referencegrantsResource, c.ns, name, options), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha2.ReferenceGrant), err
}
// List takes label and field selectors, and returns the list of ReferenceGrants that match those selectors.
func (c *FakeReferenceGrants) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ReferenceGrantList, err error) {
+ emptyResult := &v1alpha2.ReferenceGrantList{}
obj, err := c.Fake.
- Invokes(testing.NewListAction(referencegrantsResource, referencegrantsKind, c.ns, opts), &v1alpha2.ReferenceGrantList{})
+ Invokes(testing.NewListActionWithOptions(referencegrantsResource, referencegrantsKind, c.ns, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@@ -78,28 +80,30 @@ func (c *FakeReferenceGrants) List(ctx context.Context, opts v1.ListOptions) (re
// Watch returns a watch.Interface that watches the requested referenceGrants.
func (c *FakeReferenceGrants) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
- InvokesWatch(testing.NewWatchAction(referencegrantsResource, c.ns, opts))
+ InvokesWatch(testing.NewWatchActionWithOptions(referencegrantsResource, c.ns, opts))
}
// Create takes the representation of a referenceGrant and creates it. Returns the server's representation of the referenceGrant, and an error, if there is any.
func (c *FakeReferenceGrants) Create(ctx context.Context, referenceGrant *v1alpha2.ReferenceGrant, opts v1.CreateOptions) (result *v1alpha2.ReferenceGrant, err error) {
+ emptyResult := &v1alpha2.ReferenceGrant{}
obj, err := c.Fake.
- Invokes(testing.NewCreateAction(referencegrantsResource, c.ns, referenceGrant), &v1alpha2.ReferenceGrant{})
+ Invokes(testing.NewCreateActionWithOptions(referencegrantsResource, c.ns, referenceGrant, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha2.ReferenceGrant), err
}
// Update takes the representation of a referenceGrant and updates it. Returns the server's representation of the referenceGrant, and an error, if there is any.
func (c *FakeReferenceGrants) Update(ctx context.Context, referenceGrant *v1alpha2.ReferenceGrant, opts v1.UpdateOptions) (result *v1alpha2.ReferenceGrant, err error) {
+ emptyResult := &v1alpha2.ReferenceGrant{}
obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(referencegrantsResource, c.ns, referenceGrant), &v1alpha2.ReferenceGrant{})
+ Invokes(testing.NewUpdateActionWithOptions(referencegrantsResource, c.ns, referenceGrant, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha2.ReferenceGrant), err
}
@@ -114,7 +118,7 @@ func (c *FakeReferenceGrants) Delete(ctx context.Context, name string, opts v1.D
// DeleteCollection deletes a collection of objects.
func (c *FakeReferenceGrants) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
- action := testing.NewDeleteCollectionAction(referencegrantsResource, c.ns, listOpts)
+ action := testing.NewDeleteCollectionActionWithOptions(referencegrantsResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha2.ReferenceGrantList{})
return err
@@ -122,11 +126,12 @@ func (c *FakeReferenceGrants) DeleteCollection(ctx context.Context, opts v1.Dele
// Patch applies the patch and returns the patched referenceGrant.
func (c *FakeReferenceGrants) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ReferenceGrant, err error) {
+ emptyResult := &v1alpha2.ReferenceGrant{}
obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(referencegrantsResource, c.ns, name, pt, data, subresources...), &v1alpha2.ReferenceGrant{})
+ Invokes(testing.NewPatchSubresourceActionWithOptions(referencegrantsResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha2.ReferenceGrant), err
}
@@ -144,11 +149,12 @@ func (c *FakeReferenceGrants) Apply(ctx context.Context, referenceGrant *apisv1a
if name == nil {
return nil, fmt.Errorf("referenceGrant.Name must be provided to Apply")
}
+ emptyResult := &v1alpha2.ReferenceGrant{}
obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(referencegrantsResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha2.ReferenceGrant{})
+ Invokes(testing.NewPatchSubresourceActionWithOptions(referencegrantsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha2.ReferenceGrant), err
}
diff --git a/pkg/client/clientset/versioned/typed/apis/v1alpha2/fake/fake_tcproute.go b/pkg/client/clientset/versioned/typed/apis/v1alpha2/fake/fake_tcproute.go
index b93e76628d..32b88e16c3 100644
--- a/pkg/client/clientset/versioned/typed/apis/v1alpha2/fake/fake_tcproute.go
+++ b/pkg/client/clientset/versioned/typed/apis/v1alpha2/fake/fake_tcproute.go
@@ -44,22 +44,24 @@ var tcproutesKind = v1alpha2.SchemeGroupVersion.WithKind("TCPRoute")
// Get takes name of the tCPRoute, and returns the corresponding tCPRoute object, and an error if there is any.
func (c *FakeTCPRoutes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.TCPRoute, err error) {
+ emptyResult := &v1alpha2.TCPRoute{}
obj, err := c.Fake.
- Invokes(testing.NewGetAction(tcproutesResource, c.ns, name), &v1alpha2.TCPRoute{})
+ Invokes(testing.NewGetActionWithOptions(tcproutesResource, c.ns, name, options), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha2.TCPRoute), err
}
// List takes label and field selectors, and returns the list of TCPRoutes that match those selectors.
func (c *FakeTCPRoutes) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.TCPRouteList, err error) {
+ emptyResult := &v1alpha2.TCPRouteList{}
obj, err := c.Fake.
- Invokes(testing.NewListAction(tcproutesResource, tcproutesKind, c.ns, opts), &v1alpha2.TCPRouteList{})
+ Invokes(testing.NewListActionWithOptions(tcproutesResource, tcproutesKind, c.ns, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@@ -78,40 +80,43 @@ func (c *FakeTCPRoutes) List(ctx context.Context, opts v1.ListOptions) (result *
// Watch returns a watch.Interface that watches the requested tCPRoutes.
func (c *FakeTCPRoutes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
- InvokesWatch(testing.NewWatchAction(tcproutesResource, c.ns, opts))
+ InvokesWatch(testing.NewWatchActionWithOptions(tcproutesResource, c.ns, opts))
}
// Create takes the representation of a tCPRoute and creates it. Returns the server's representation of the tCPRoute, and an error, if there is any.
func (c *FakeTCPRoutes) Create(ctx context.Context, tCPRoute *v1alpha2.TCPRoute, opts v1.CreateOptions) (result *v1alpha2.TCPRoute, err error) {
+ emptyResult := &v1alpha2.TCPRoute{}
obj, err := c.Fake.
- Invokes(testing.NewCreateAction(tcproutesResource, c.ns, tCPRoute), &v1alpha2.TCPRoute{})
+ Invokes(testing.NewCreateActionWithOptions(tcproutesResource, c.ns, tCPRoute, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha2.TCPRoute), err
}
// Update takes the representation of a tCPRoute and updates it. Returns the server's representation of the tCPRoute, and an error, if there is any.
func (c *FakeTCPRoutes) Update(ctx context.Context, tCPRoute *v1alpha2.TCPRoute, opts v1.UpdateOptions) (result *v1alpha2.TCPRoute, err error) {
+ emptyResult := &v1alpha2.TCPRoute{}
obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(tcproutesResource, c.ns, tCPRoute), &v1alpha2.TCPRoute{})
+ Invokes(testing.NewUpdateActionWithOptions(tcproutesResource, c.ns, tCPRoute, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha2.TCPRoute), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-func (c *FakeTCPRoutes) UpdateStatus(ctx context.Context, tCPRoute *v1alpha2.TCPRoute, opts v1.UpdateOptions) (*v1alpha2.TCPRoute, error) {
+func (c *FakeTCPRoutes) UpdateStatus(ctx context.Context, tCPRoute *v1alpha2.TCPRoute, opts v1.UpdateOptions) (result *v1alpha2.TCPRoute, err error) {
+ emptyResult := &v1alpha2.TCPRoute{}
obj, err := c.Fake.
- Invokes(testing.NewUpdateSubresourceAction(tcproutesResource, "status", c.ns, tCPRoute), &v1alpha2.TCPRoute{})
+ Invokes(testing.NewUpdateSubresourceActionWithOptions(tcproutesResource, "status", c.ns, tCPRoute, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha2.TCPRoute), err
}
@@ -126,7 +131,7 @@ func (c *FakeTCPRoutes) Delete(ctx context.Context, name string, opts v1.DeleteO
// DeleteCollection deletes a collection of objects.
func (c *FakeTCPRoutes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
- action := testing.NewDeleteCollectionAction(tcproutesResource, c.ns, listOpts)
+ action := testing.NewDeleteCollectionActionWithOptions(tcproutesResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha2.TCPRouteList{})
return err
@@ -134,11 +139,12 @@ func (c *FakeTCPRoutes) DeleteCollection(ctx context.Context, opts v1.DeleteOpti
// Patch applies the patch and returns the patched tCPRoute.
func (c *FakeTCPRoutes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.TCPRoute, err error) {
+ emptyResult := &v1alpha2.TCPRoute{}
obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(tcproutesResource, c.ns, name, pt, data, subresources...), &v1alpha2.TCPRoute{})
+ Invokes(testing.NewPatchSubresourceActionWithOptions(tcproutesResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha2.TCPRoute), err
}
@@ -156,11 +162,12 @@ func (c *FakeTCPRoutes) Apply(ctx context.Context, tCPRoute *apisv1alpha2.TCPRou
if name == nil {
return nil, fmt.Errorf("tCPRoute.Name must be provided to Apply")
}
+ emptyResult := &v1alpha2.TCPRoute{}
obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(tcproutesResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha2.TCPRoute{})
+ Invokes(testing.NewPatchSubresourceActionWithOptions(tcproutesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha2.TCPRoute), err
}
@@ -179,11 +186,12 @@ func (c *FakeTCPRoutes) ApplyStatus(ctx context.Context, tCPRoute *apisv1alpha2.
if name == nil {
return nil, fmt.Errorf("tCPRoute.Name must be provided to Apply")
}
+ emptyResult := &v1alpha2.TCPRoute{}
obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(tcproutesResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1alpha2.TCPRoute{})
+ Invokes(testing.NewPatchSubresourceActionWithOptions(tcproutesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha2.TCPRoute), err
}
diff --git a/pkg/client/clientset/versioned/typed/apis/v1alpha2/fake/fake_tlsroute.go b/pkg/client/clientset/versioned/typed/apis/v1alpha2/fake/fake_tlsroute.go
index 9383876158..ba8255216f 100644
--- a/pkg/client/clientset/versioned/typed/apis/v1alpha2/fake/fake_tlsroute.go
+++ b/pkg/client/clientset/versioned/typed/apis/v1alpha2/fake/fake_tlsroute.go
@@ -44,22 +44,24 @@ var tlsroutesKind = v1alpha2.SchemeGroupVersion.WithKind("TLSRoute")
// Get takes name of the tLSRoute, and returns the corresponding tLSRoute object, and an error if there is any.
func (c *FakeTLSRoutes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.TLSRoute, err error) {
+ emptyResult := &v1alpha2.TLSRoute{}
obj, err := c.Fake.
- Invokes(testing.NewGetAction(tlsroutesResource, c.ns, name), &v1alpha2.TLSRoute{})
+ Invokes(testing.NewGetActionWithOptions(tlsroutesResource, c.ns, name, options), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha2.TLSRoute), err
}
// List takes label and field selectors, and returns the list of TLSRoutes that match those selectors.
func (c *FakeTLSRoutes) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.TLSRouteList, err error) {
+ emptyResult := &v1alpha2.TLSRouteList{}
obj, err := c.Fake.
- Invokes(testing.NewListAction(tlsroutesResource, tlsroutesKind, c.ns, opts), &v1alpha2.TLSRouteList{})
+ Invokes(testing.NewListActionWithOptions(tlsroutesResource, tlsroutesKind, c.ns, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@@ -78,40 +80,43 @@ func (c *FakeTLSRoutes) List(ctx context.Context, opts v1.ListOptions) (result *
// Watch returns a watch.Interface that watches the requested tLSRoutes.
func (c *FakeTLSRoutes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
- InvokesWatch(testing.NewWatchAction(tlsroutesResource, c.ns, opts))
+ InvokesWatch(testing.NewWatchActionWithOptions(tlsroutesResource, c.ns, opts))
}
// Create takes the representation of a tLSRoute and creates it. Returns the server's representation of the tLSRoute, and an error, if there is any.
func (c *FakeTLSRoutes) Create(ctx context.Context, tLSRoute *v1alpha2.TLSRoute, opts v1.CreateOptions) (result *v1alpha2.TLSRoute, err error) {
+ emptyResult := &v1alpha2.TLSRoute{}
obj, err := c.Fake.
- Invokes(testing.NewCreateAction(tlsroutesResource, c.ns, tLSRoute), &v1alpha2.TLSRoute{})
+ Invokes(testing.NewCreateActionWithOptions(tlsroutesResource, c.ns, tLSRoute, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha2.TLSRoute), err
}
// Update takes the representation of a tLSRoute and updates it. Returns the server's representation of the tLSRoute, and an error, if there is any.
func (c *FakeTLSRoutes) Update(ctx context.Context, tLSRoute *v1alpha2.TLSRoute, opts v1.UpdateOptions) (result *v1alpha2.TLSRoute, err error) {
+ emptyResult := &v1alpha2.TLSRoute{}
obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(tlsroutesResource, c.ns, tLSRoute), &v1alpha2.TLSRoute{})
+ Invokes(testing.NewUpdateActionWithOptions(tlsroutesResource, c.ns, tLSRoute, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha2.TLSRoute), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-func (c *FakeTLSRoutes) UpdateStatus(ctx context.Context, tLSRoute *v1alpha2.TLSRoute, opts v1.UpdateOptions) (*v1alpha2.TLSRoute, error) {
+func (c *FakeTLSRoutes) UpdateStatus(ctx context.Context, tLSRoute *v1alpha2.TLSRoute, opts v1.UpdateOptions) (result *v1alpha2.TLSRoute, err error) {
+ emptyResult := &v1alpha2.TLSRoute{}
obj, err := c.Fake.
- Invokes(testing.NewUpdateSubresourceAction(tlsroutesResource, "status", c.ns, tLSRoute), &v1alpha2.TLSRoute{})
+ Invokes(testing.NewUpdateSubresourceActionWithOptions(tlsroutesResource, "status", c.ns, tLSRoute, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha2.TLSRoute), err
}
@@ -126,7 +131,7 @@ func (c *FakeTLSRoutes) Delete(ctx context.Context, name string, opts v1.DeleteO
// DeleteCollection deletes a collection of objects.
func (c *FakeTLSRoutes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
- action := testing.NewDeleteCollectionAction(tlsroutesResource, c.ns, listOpts)
+ action := testing.NewDeleteCollectionActionWithOptions(tlsroutesResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha2.TLSRouteList{})
return err
@@ -134,11 +139,12 @@ func (c *FakeTLSRoutes) DeleteCollection(ctx context.Context, opts v1.DeleteOpti
// Patch applies the patch and returns the patched tLSRoute.
func (c *FakeTLSRoutes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.TLSRoute, err error) {
+ emptyResult := &v1alpha2.TLSRoute{}
obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(tlsroutesResource, c.ns, name, pt, data, subresources...), &v1alpha2.TLSRoute{})
+ Invokes(testing.NewPatchSubresourceActionWithOptions(tlsroutesResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha2.TLSRoute), err
}
@@ -156,11 +162,12 @@ func (c *FakeTLSRoutes) Apply(ctx context.Context, tLSRoute *apisv1alpha2.TLSRou
if name == nil {
return nil, fmt.Errorf("tLSRoute.Name must be provided to Apply")
}
+ emptyResult := &v1alpha2.TLSRoute{}
obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(tlsroutesResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha2.TLSRoute{})
+ Invokes(testing.NewPatchSubresourceActionWithOptions(tlsroutesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha2.TLSRoute), err
}
@@ -179,11 +186,12 @@ func (c *FakeTLSRoutes) ApplyStatus(ctx context.Context, tLSRoute *apisv1alpha2.
if name == nil {
return nil, fmt.Errorf("tLSRoute.Name must be provided to Apply")
}
+ emptyResult := &v1alpha2.TLSRoute{}
obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(tlsroutesResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1alpha2.TLSRoute{})
+ Invokes(testing.NewPatchSubresourceActionWithOptions(tlsroutesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha2.TLSRoute), err
}
diff --git a/pkg/client/clientset/versioned/typed/apis/v1alpha2/fake/fake_udproute.go b/pkg/client/clientset/versioned/typed/apis/v1alpha2/fake/fake_udproute.go
index 027f4a4c17..54a5b4d725 100644
--- a/pkg/client/clientset/versioned/typed/apis/v1alpha2/fake/fake_udproute.go
+++ b/pkg/client/clientset/versioned/typed/apis/v1alpha2/fake/fake_udproute.go
@@ -44,22 +44,24 @@ var udproutesKind = v1alpha2.SchemeGroupVersion.WithKind("UDPRoute")
// Get takes name of the uDPRoute, and returns the corresponding uDPRoute object, and an error if there is any.
func (c *FakeUDPRoutes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.UDPRoute, err error) {
+ emptyResult := &v1alpha2.UDPRoute{}
obj, err := c.Fake.
- Invokes(testing.NewGetAction(udproutesResource, c.ns, name), &v1alpha2.UDPRoute{})
+ Invokes(testing.NewGetActionWithOptions(udproutesResource, c.ns, name, options), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha2.UDPRoute), err
}
// List takes label and field selectors, and returns the list of UDPRoutes that match those selectors.
func (c *FakeUDPRoutes) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.UDPRouteList, err error) {
+ emptyResult := &v1alpha2.UDPRouteList{}
obj, err := c.Fake.
- Invokes(testing.NewListAction(udproutesResource, udproutesKind, c.ns, opts), &v1alpha2.UDPRouteList{})
+ Invokes(testing.NewListActionWithOptions(udproutesResource, udproutesKind, c.ns, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@@ -78,40 +80,43 @@ func (c *FakeUDPRoutes) List(ctx context.Context, opts v1.ListOptions) (result *
// Watch returns a watch.Interface that watches the requested uDPRoutes.
func (c *FakeUDPRoutes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
- InvokesWatch(testing.NewWatchAction(udproutesResource, c.ns, opts))
+ InvokesWatch(testing.NewWatchActionWithOptions(udproutesResource, c.ns, opts))
}
// Create takes the representation of a uDPRoute and creates it. Returns the server's representation of the uDPRoute, and an error, if there is any.
func (c *FakeUDPRoutes) Create(ctx context.Context, uDPRoute *v1alpha2.UDPRoute, opts v1.CreateOptions) (result *v1alpha2.UDPRoute, err error) {
+ emptyResult := &v1alpha2.UDPRoute{}
obj, err := c.Fake.
- Invokes(testing.NewCreateAction(udproutesResource, c.ns, uDPRoute), &v1alpha2.UDPRoute{})
+ Invokes(testing.NewCreateActionWithOptions(udproutesResource, c.ns, uDPRoute, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha2.UDPRoute), err
}
// Update takes the representation of a uDPRoute and updates it. Returns the server's representation of the uDPRoute, and an error, if there is any.
func (c *FakeUDPRoutes) Update(ctx context.Context, uDPRoute *v1alpha2.UDPRoute, opts v1.UpdateOptions) (result *v1alpha2.UDPRoute, err error) {
+ emptyResult := &v1alpha2.UDPRoute{}
obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(udproutesResource, c.ns, uDPRoute), &v1alpha2.UDPRoute{})
+ Invokes(testing.NewUpdateActionWithOptions(udproutesResource, c.ns, uDPRoute, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha2.UDPRoute), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-func (c *FakeUDPRoutes) UpdateStatus(ctx context.Context, uDPRoute *v1alpha2.UDPRoute, opts v1.UpdateOptions) (*v1alpha2.UDPRoute, error) {
+func (c *FakeUDPRoutes) UpdateStatus(ctx context.Context, uDPRoute *v1alpha2.UDPRoute, opts v1.UpdateOptions) (result *v1alpha2.UDPRoute, err error) {
+ emptyResult := &v1alpha2.UDPRoute{}
obj, err := c.Fake.
- Invokes(testing.NewUpdateSubresourceAction(udproutesResource, "status", c.ns, uDPRoute), &v1alpha2.UDPRoute{})
+ Invokes(testing.NewUpdateSubresourceActionWithOptions(udproutesResource, "status", c.ns, uDPRoute, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha2.UDPRoute), err
}
@@ -126,7 +131,7 @@ func (c *FakeUDPRoutes) Delete(ctx context.Context, name string, opts v1.DeleteO
// DeleteCollection deletes a collection of objects.
func (c *FakeUDPRoutes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
- action := testing.NewDeleteCollectionAction(udproutesResource, c.ns, listOpts)
+ action := testing.NewDeleteCollectionActionWithOptions(udproutesResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha2.UDPRouteList{})
return err
@@ -134,11 +139,12 @@ func (c *FakeUDPRoutes) DeleteCollection(ctx context.Context, opts v1.DeleteOpti
// Patch applies the patch and returns the patched uDPRoute.
func (c *FakeUDPRoutes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.UDPRoute, err error) {
+ emptyResult := &v1alpha2.UDPRoute{}
obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(udproutesResource, c.ns, name, pt, data, subresources...), &v1alpha2.UDPRoute{})
+ Invokes(testing.NewPatchSubresourceActionWithOptions(udproutesResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha2.UDPRoute), err
}
@@ -156,11 +162,12 @@ func (c *FakeUDPRoutes) Apply(ctx context.Context, uDPRoute *apisv1alpha2.UDPRou
if name == nil {
return nil, fmt.Errorf("uDPRoute.Name must be provided to Apply")
}
+ emptyResult := &v1alpha2.UDPRoute{}
obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(udproutesResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha2.UDPRoute{})
+ Invokes(testing.NewPatchSubresourceActionWithOptions(udproutesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha2.UDPRoute), err
}
@@ -179,11 +186,12 @@ func (c *FakeUDPRoutes) ApplyStatus(ctx context.Context, uDPRoute *apisv1alpha2.
if name == nil {
return nil, fmt.Errorf("uDPRoute.Name must be provided to Apply")
}
+ emptyResult := &v1alpha2.UDPRoute{}
obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(udproutesResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1alpha2.UDPRoute{})
+ Invokes(testing.NewPatchSubresourceActionWithOptions(udproutesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha2.UDPRoute), err
}
diff --git a/pkg/client/clientset/versioned/typed/apis/v1alpha2/grpcroute.go b/pkg/client/clientset/versioned/typed/apis/v1alpha2/grpcroute.go
index 5e08af49dd..75752337e9 100644
--- a/pkg/client/clientset/versioned/typed/apis/v1alpha2/grpcroute.go
+++ b/pkg/client/clientset/versioned/typed/apis/v1alpha2/grpcroute.go
@@ -20,14 +20,11 @@ package v1alpha2
import (
"context"
- json "encoding/json"
- "fmt"
- "time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
- rest "k8s.io/client-go/rest"
+ gentype "k8s.io/client-go/gentype"
apisv1alpha2 "sigs.k8s.io/gateway-api/apis/applyconfiguration/apis/v1alpha2"
v1alpha2 "sigs.k8s.io/gateway-api/apis/v1alpha2"
scheme "sigs.k8s.io/gateway-api/pkg/client/clientset/versioned/scheme"
@@ -43,6 +40,7 @@ type GRPCRoutesGetter interface {
type GRPCRouteInterface interface {
Create(ctx context.Context, gRPCRoute *v1alpha2.GRPCRoute, opts v1.CreateOptions) (*v1alpha2.GRPCRoute, error)
Update(ctx context.Context, gRPCRoute *v1alpha2.GRPCRoute, opts v1.UpdateOptions) (*v1alpha2.GRPCRoute, error)
+ // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, gRPCRoute *v1alpha2.GRPCRoute, opts v1.UpdateOptions) (*v1alpha2.GRPCRoute, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
@@ -51,206 +49,25 @@ type GRPCRouteInterface interface {
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.GRPCRoute, err error)
Apply(ctx context.Context, gRPCRoute *apisv1alpha2.GRPCRouteApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.GRPCRoute, err error)
+ // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
ApplyStatus(ctx context.Context, gRPCRoute *apisv1alpha2.GRPCRouteApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.GRPCRoute, err error)
GRPCRouteExpansion
}
// gRPCRoutes implements GRPCRouteInterface
type gRPCRoutes struct {
- client rest.Interface
- ns string
+ *gentype.ClientWithListAndApply[*v1alpha2.GRPCRoute, *v1alpha2.GRPCRouteList, *apisv1alpha2.GRPCRouteApplyConfiguration]
}
// newGRPCRoutes returns a GRPCRoutes
func newGRPCRoutes(c *GatewayV1alpha2Client, namespace string) *gRPCRoutes {
return &gRPCRoutes{
- client: c.RESTClient(),
- ns: namespace,
+ gentype.NewClientWithListAndApply[*v1alpha2.GRPCRoute, *v1alpha2.GRPCRouteList, *apisv1alpha2.GRPCRouteApplyConfiguration](
+ "grpcroutes",
+ c.RESTClient(),
+ scheme.ParameterCodec,
+ namespace,
+ func() *v1alpha2.GRPCRoute { return &v1alpha2.GRPCRoute{} },
+ func() *v1alpha2.GRPCRouteList { return &v1alpha2.GRPCRouteList{} }),
}
}
-
-// Get takes name of the gRPCRoute, and returns the corresponding gRPCRoute object, and an error if there is any.
-func (c *gRPCRoutes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.GRPCRoute, err error) {
- result = &v1alpha2.GRPCRoute{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("grpcroutes").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do(ctx).
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of GRPCRoutes that match those selectors.
-func (c *gRPCRoutes) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.GRPCRouteList, err error) {
- var timeout time.Duration
- if opts.TimeoutSeconds != nil {
- timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
- }
- result = &v1alpha2.GRPCRouteList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("grpcroutes").
- VersionedParams(&opts, scheme.ParameterCodec).
- Timeout(timeout).
- Do(ctx).
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested gRPCRoutes.
-func (c *gRPCRoutes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
- var timeout time.Duration
- if opts.TimeoutSeconds != nil {
- timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
- }
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("grpcroutes").
- VersionedParams(&opts, scheme.ParameterCodec).
- Timeout(timeout).
- Watch(ctx)
-}
-
-// Create takes the representation of a gRPCRoute and creates it. Returns the server's representation of the gRPCRoute, and an error, if there is any.
-func (c *gRPCRoutes) Create(ctx context.Context, gRPCRoute *v1alpha2.GRPCRoute, opts v1.CreateOptions) (result *v1alpha2.GRPCRoute, err error) {
- result = &v1alpha2.GRPCRoute{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("grpcroutes").
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(gRPCRoute).
- Do(ctx).
- Into(result)
- return
-}
-
-// Update takes the representation of a gRPCRoute and updates it. Returns the server's representation of the gRPCRoute, and an error, if there is any.
-func (c *gRPCRoutes) Update(ctx context.Context, gRPCRoute *v1alpha2.GRPCRoute, opts v1.UpdateOptions) (result *v1alpha2.GRPCRoute, err error) {
- result = &v1alpha2.GRPCRoute{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("grpcroutes").
- Name(gRPCRoute.Name).
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(gRPCRoute).
- Do(ctx).
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-func (c *gRPCRoutes) UpdateStatus(ctx context.Context, gRPCRoute *v1alpha2.GRPCRoute, opts v1.UpdateOptions) (result *v1alpha2.GRPCRoute, err error) {
- result = &v1alpha2.GRPCRoute{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("grpcroutes").
- Name(gRPCRoute.Name).
- SubResource("status").
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(gRPCRoute).
- Do(ctx).
- Into(result)
- return
-}
-
-// Delete takes name of the gRPCRoute and deletes it. Returns an error if one occurs.
-func (c *gRPCRoutes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("grpcroutes").
- Name(name).
- Body(&opts).
- Do(ctx).
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *gRPCRoutes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
- var timeout time.Duration
- if listOpts.TimeoutSeconds != nil {
- timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
- }
- return c.client.Delete().
- Namespace(c.ns).
- Resource("grpcroutes").
- VersionedParams(&listOpts, scheme.ParameterCodec).
- Timeout(timeout).
- Body(&opts).
- Do(ctx).
- Error()
-}
-
-// Patch applies the patch and returns the patched gRPCRoute.
-func (c *gRPCRoutes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.GRPCRoute, err error) {
- result = &v1alpha2.GRPCRoute{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("grpcroutes").
- Name(name).
- SubResource(subresources...).
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
-
-// Apply takes the given apply declarative configuration, applies it and returns the applied gRPCRoute.
-func (c *gRPCRoutes) Apply(ctx context.Context, gRPCRoute *apisv1alpha2.GRPCRouteApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.GRPCRoute, err error) {
- if gRPCRoute == nil {
- return nil, fmt.Errorf("gRPCRoute provided to Apply must not be nil")
- }
- patchOpts := opts.ToPatchOptions()
- data, err := json.Marshal(gRPCRoute)
- if err != nil {
- return nil, err
- }
- name := gRPCRoute.Name
- if name == nil {
- return nil, fmt.Errorf("gRPCRoute.Name must be provided to Apply")
- }
- result = &v1alpha2.GRPCRoute{}
- err = c.client.Patch(types.ApplyPatchType).
- Namespace(c.ns).
- Resource("grpcroutes").
- Name(*name).
- VersionedParams(&patchOpts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
-
-// ApplyStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
-func (c *gRPCRoutes) ApplyStatus(ctx context.Context, gRPCRoute *apisv1alpha2.GRPCRouteApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.GRPCRoute, err error) {
- if gRPCRoute == nil {
- return nil, fmt.Errorf("gRPCRoute provided to Apply must not be nil")
- }
- patchOpts := opts.ToPatchOptions()
- data, err := json.Marshal(gRPCRoute)
- if err != nil {
- return nil, err
- }
-
- name := gRPCRoute.Name
- if name == nil {
- return nil, fmt.Errorf("gRPCRoute.Name must be provided to Apply")
- }
-
- result = &v1alpha2.GRPCRoute{}
- err = c.client.Patch(types.ApplyPatchType).
- Namespace(c.ns).
- Resource("grpcroutes").
- Name(*name).
- SubResource("status").
- VersionedParams(&patchOpts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
diff --git a/pkg/client/clientset/versioned/typed/apis/v1alpha2/referencegrant.go b/pkg/client/clientset/versioned/typed/apis/v1alpha2/referencegrant.go
index ca799f71a1..bbe6f8790e 100644
--- a/pkg/client/clientset/versioned/typed/apis/v1alpha2/referencegrant.go
+++ b/pkg/client/clientset/versioned/typed/apis/v1alpha2/referencegrant.go
@@ -20,14 +20,11 @@ package v1alpha2
import (
"context"
- json "encoding/json"
- "fmt"
- "time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
- rest "k8s.io/client-go/rest"
+ gentype "k8s.io/client-go/gentype"
apisv1alpha2 "sigs.k8s.io/gateway-api/apis/applyconfiguration/apis/v1alpha2"
v1alpha2 "sigs.k8s.io/gateway-api/apis/v1alpha2"
scheme "sigs.k8s.io/gateway-api/pkg/client/clientset/versioned/scheme"
@@ -55,154 +52,18 @@ type ReferenceGrantInterface interface {
// referenceGrants implements ReferenceGrantInterface
type referenceGrants struct {
- client rest.Interface
- ns string
+ *gentype.ClientWithListAndApply[*v1alpha2.ReferenceGrant, *v1alpha2.ReferenceGrantList, *apisv1alpha2.ReferenceGrantApplyConfiguration]
}
// newReferenceGrants returns a ReferenceGrants
func newReferenceGrants(c *GatewayV1alpha2Client, namespace string) *referenceGrants {
return &referenceGrants{
- client: c.RESTClient(),
- ns: namespace,
+ gentype.NewClientWithListAndApply[*v1alpha2.ReferenceGrant, *v1alpha2.ReferenceGrantList, *apisv1alpha2.ReferenceGrantApplyConfiguration](
+ "referencegrants",
+ c.RESTClient(),
+ scheme.ParameterCodec,
+ namespace,
+ func() *v1alpha2.ReferenceGrant { return &v1alpha2.ReferenceGrant{} },
+ func() *v1alpha2.ReferenceGrantList { return &v1alpha2.ReferenceGrantList{} }),
}
}
-
-// Get takes name of the referenceGrant, and returns the corresponding referenceGrant object, and an error if there is any.
-func (c *referenceGrants) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.ReferenceGrant, err error) {
- result = &v1alpha2.ReferenceGrant{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("referencegrants").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do(ctx).
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of ReferenceGrants that match those selectors.
-func (c *referenceGrants) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.ReferenceGrantList, err error) {
- var timeout time.Duration
- if opts.TimeoutSeconds != nil {
- timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
- }
- result = &v1alpha2.ReferenceGrantList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("referencegrants").
- VersionedParams(&opts, scheme.ParameterCodec).
- Timeout(timeout).
- Do(ctx).
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested referenceGrants.
-func (c *referenceGrants) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
- var timeout time.Duration
- if opts.TimeoutSeconds != nil {
- timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
- }
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("referencegrants").
- VersionedParams(&opts, scheme.ParameterCodec).
- Timeout(timeout).
- Watch(ctx)
-}
-
-// Create takes the representation of a referenceGrant and creates it. Returns the server's representation of the referenceGrant, and an error, if there is any.
-func (c *referenceGrants) Create(ctx context.Context, referenceGrant *v1alpha2.ReferenceGrant, opts v1.CreateOptions) (result *v1alpha2.ReferenceGrant, err error) {
- result = &v1alpha2.ReferenceGrant{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("referencegrants").
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(referenceGrant).
- Do(ctx).
- Into(result)
- return
-}
-
-// Update takes the representation of a referenceGrant and updates it. Returns the server's representation of the referenceGrant, and an error, if there is any.
-func (c *referenceGrants) Update(ctx context.Context, referenceGrant *v1alpha2.ReferenceGrant, opts v1.UpdateOptions) (result *v1alpha2.ReferenceGrant, err error) {
- result = &v1alpha2.ReferenceGrant{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("referencegrants").
- Name(referenceGrant.Name).
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(referenceGrant).
- Do(ctx).
- Into(result)
- return
-}
-
-// Delete takes name of the referenceGrant and deletes it. Returns an error if one occurs.
-func (c *referenceGrants) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("referencegrants").
- Name(name).
- Body(&opts).
- Do(ctx).
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *referenceGrants) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
- var timeout time.Duration
- if listOpts.TimeoutSeconds != nil {
- timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
- }
- return c.client.Delete().
- Namespace(c.ns).
- Resource("referencegrants").
- VersionedParams(&listOpts, scheme.ParameterCodec).
- Timeout(timeout).
- Body(&opts).
- Do(ctx).
- Error()
-}
-
-// Patch applies the patch and returns the patched referenceGrant.
-func (c *referenceGrants) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.ReferenceGrant, err error) {
- result = &v1alpha2.ReferenceGrant{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("referencegrants").
- Name(name).
- SubResource(subresources...).
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
-
-// Apply takes the given apply declarative configuration, applies it and returns the applied referenceGrant.
-func (c *referenceGrants) Apply(ctx context.Context, referenceGrant *apisv1alpha2.ReferenceGrantApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.ReferenceGrant, err error) {
- if referenceGrant == nil {
- return nil, fmt.Errorf("referenceGrant provided to Apply must not be nil")
- }
- patchOpts := opts.ToPatchOptions()
- data, err := json.Marshal(referenceGrant)
- if err != nil {
- return nil, err
- }
- name := referenceGrant.Name
- if name == nil {
- return nil, fmt.Errorf("referenceGrant.Name must be provided to Apply")
- }
- result = &v1alpha2.ReferenceGrant{}
- err = c.client.Patch(types.ApplyPatchType).
- Namespace(c.ns).
- Resource("referencegrants").
- Name(*name).
- VersionedParams(&patchOpts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
diff --git a/pkg/client/clientset/versioned/typed/apis/v1alpha2/tcproute.go b/pkg/client/clientset/versioned/typed/apis/v1alpha2/tcproute.go
index ffc6fa2ee8..9a9959cf7c 100644
--- a/pkg/client/clientset/versioned/typed/apis/v1alpha2/tcproute.go
+++ b/pkg/client/clientset/versioned/typed/apis/v1alpha2/tcproute.go
@@ -20,14 +20,11 @@ package v1alpha2
import (
"context"
- json "encoding/json"
- "fmt"
- "time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
- rest "k8s.io/client-go/rest"
+ gentype "k8s.io/client-go/gentype"
apisv1alpha2 "sigs.k8s.io/gateway-api/apis/applyconfiguration/apis/v1alpha2"
v1alpha2 "sigs.k8s.io/gateway-api/apis/v1alpha2"
scheme "sigs.k8s.io/gateway-api/pkg/client/clientset/versioned/scheme"
@@ -43,6 +40,7 @@ type TCPRoutesGetter interface {
type TCPRouteInterface interface {
Create(ctx context.Context, tCPRoute *v1alpha2.TCPRoute, opts v1.CreateOptions) (*v1alpha2.TCPRoute, error)
Update(ctx context.Context, tCPRoute *v1alpha2.TCPRoute, opts v1.UpdateOptions) (*v1alpha2.TCPRoute, error)
+ // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, tCPRoute *v1alpha2.TCPRoute, opts v1.UpdateOptions) (*v1alpha2.TCPRoute, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
@@ -51,206 +49,25 @@ type TCPRouteInterface interface {
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.TCPRoute, err error)
Apply(ctx context.Context, tCPRoute *apisv1alpha2.TCPRouteApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.TCPRoute, err error)
+ // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
ApplyStatus(ctx context.Context, tCPRoute *apisv1alpha2.TCPRouteApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.TCPRoute, err error)
TCPRouteExpansion
}
// tCPRoutes implements TCPRouteInterface
type tCPRoutes struct {
- client rest.Interface
- ns string
+ *gentype.ClientWithListAndApply[*v1alpha2.TCPRoute, *v1alpha2.TCPRouteList, *apisv1alpha2.TCPRouteApplyConfiguration]
}
// newTCPRoutes returns a TCPRoutes
func newTCPRoutes(c *GatewayV1alpha2Client, namespace string) *tCPRoutes {
return &tCPRoutes{
- client: c.RESTClient(),
- ns: namespace,
+ gentype.NewClientWithListAndApply[*v1alpha2.TCPRoute, *v1alpha2.TCPRouteList, *apisv1alpha2.TCPRouteApplyConfiguration](
+ "tcproutes",
+ c.RESTClient(),
+ scheme.ParameterCodec,
+ namespace,
+ func() *v1alpha2.TCPRoute { return &v1alpha2.TCPRoute{} },
+ func() *v1alpha2.TCPRouteList { return &v1alpha2.TCPRouteList{} }),
}
}
-
-// Get takes name of the tCPRoute, and returns the corresponding tCPRoute object, and an error if there is any.
-func (c *tCPRoutes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.TCPRoute, err error) {
- result = &v1alpha2.TCPRoute{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("tcproutes").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do(ctx).
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of TCPRoutes that match those selectors.
-func (c *tCPRoutes) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.TCPRouteList, err error) {
- var timeout time.Duration
- if opts.TimeoutSeconds != nil {
- timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
- }
- result = &v1alpha2.TCPRouteList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("tcproutes").
- VersionedParams(&opts, scheme.ParameterCodec).
- Timeout(timeout).
- Do(ctx).
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested tCPRoutes.
-func (c *tCPRoutes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
- var timeout time.Duration
- if opts.TimeoutSeconds != nil {
- timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
- }
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("tcproutes").
- VersionedParams(&opts, scheme.ParameterCodec).
- Timeout(timeout).
- Watch(ctx)
-}
-
-// Create takes the representation of a tCPRoute and creates it. Returns the server's representation of the tCPRoute, and an error, if there is any.
-func (c *tCPRoutes) Create(ctx context.Context, tCPRoute *v1alpha2.TCPRoute, opts v1.CreateOptions) (result *v1alpha2.TCPRoute, err error) {
- result = &v1alpha2.TCPRoute{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("tcproutes").
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(tCPRoute).
- Do(ctx).
- Into(result)
- return
-}
-
-// Update takes the representation of a tCPRoute and updates it. Returns the server's representation of the tCPRoute, and an error, if there is any.
-func (c *tCPRoutes) Update(ctx context.Context, tCPRoute *v1alpha2.TCPRoute, opts v1.UpdateOptions) (result *v1alpha2.TCPRoute, err error) {
- result = &v1alpha2.TCPRoute{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("tcproutes").
- Name(tCPRoute.Name).
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(tCPRoute).
- Do(ctx).
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-func (c *tCPRoutes) UpdateStatus(ctx context.Context, tCPRoute *v1alpha2.TCPRoute, opts v1.UpdateOptions) (result *v1alpha2.TCPRoute, err error) {
- result = &v1alpha2.TCPRoute{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("tcproutes").
- Name(tCPRoute.Name).
- SubResource("status").
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(tCPRoute).
- Do(ctx).
- Into(result)
- return
-}
-
-// Delete takes name of the tCPRoute and deletes it. Returns an error if one occurs.
-func (c *tCPRoutes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("tcproutes").
- Name(name).
- Body(&opts).
- Do(ctx).
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *tCPRoutes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
- var timeout time.Duration
- if listOpts.TimeoutSeconds != nil {
- timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
- }
- return c.client.Delete().
- Namespace(c.ns).
- Resource("tcproutes").
- VersionedParams(&listOpts, scheme.ParameterCodec).
- Timeout(timeout).
- Body(&opts).
- Do(ctx).
- Error()
-}
-
-// Patch applies the patch and returns the patched tCPRoute.
-func (c *tCPRoutes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.TCPRoute, err error) {
- result = &v1alpha2.TCPRoute{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("tcproutes").
- Name(name).
- SubResource(subresources...).
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
-
-// Apply takes the given apply declarative configuration, applies it and returns the applied tCPRoute.
-func (c *tCPRoutes) Apply(ctx context.Context, tCPRoute *apisv1alpha2.TCPRouteApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.TCPRoute, err error) {
- if tCPRoute == nil {
- return nil, fmt.Errorf("tCPRoute provided to Apply must not be nil")
- }
- patchOpts := opts.ToPatchOptions()
- data, err := json.Marshal(tCPRoute)
- if err != nil {
- return nil, err
- }
- name := tCPRoute.Name
- if name == nil {
- return nil, fmt.Errorf("tCPRoute.Name must be provided to Apply")
- }
- result = &v1alpha2.TCPRoute{}
- err = c.client.Patch(types.ApplyPatchType).
- Namespace(c.ns).
- Resource("tcproutes").
- Name(*name).
- VersionedParams(&patchOpts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
-
-// ApplyStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
-func (c *tCPRoutes) ApplyStatus(ctx context.Context, tCPRoute *apisv1alpha2.TCPRouteApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.TCPRoute, err error) {
- if tCPRoute == nil {
- return nil, fmt.Errorf("tCPRoute provided to Apply must not be nil")
- }
- patchOpts := opts.ToPatchOptions()
- data, err := json.Marshal(tCPRoute)
- if err != nil {
- return nil, err
- }
-
- name := tCPRoute.Name
- if name == nil {
- return nil, fmt.Errorf("tCPRoute.Name must be provided to Apply")
- }
-
- result = &v1alpha2.TCPRoute{}
- err = c.client.Patch(types.ApplyPatchType).
- Namespace(c.ns).
- Resource("tcproutes").
- Name(*name).
- SubResource("status").
- VersionedParams(&patchOpts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
diff --git a/pkg/client/clientset/versioned/typed/apis/v1alpha2/tlsroute.go b/pkg/client/clientset/versioned/typed/apis/v1alpha2/tlsroute.go
index 23719242fa..d98da0fbab 100644
--- a/pkg/client/clientset/versioned/typed/apis/v1alpha2/tlsroute.go
+++ b/pkg/client/clientset/versioned/typed/apis/v1alpha2/tlsroute.go
@@ -20,14 +20,11 @@ package v1alpha2
import (
"context"
- json "encoding/json"
- "fmt"
- "time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
- rest "k8s.io/client-go/rest"
+ gentype "k8s.io/client-go/gentype"
apisv1alpha2 "sigs.k8s.io/gateway-api/apis/applyconfiguration/apis/v1alpha2"
v1alpha2 "sigs.k8s.io/gateway-api/apis/v1alpha2"
scheme "sigs.k8s.io/gateway-api/pkg/client/clientset/versioned/scheme"
@@ -43,6 +40,7 @@ type TLSRoutesGetter interface {
type TLSRouteInterface interface {
Create(ctx context.Context, tLSRoute *v1alpha2.TLSRoute, opts v1.CreateOptions) (*v1alpha2.TLSRoute, error)
Update(ctx context.Context, tLSRoute *v1alpha2.TLSRoute, opts v1.UpdateOptions) (*v1alpha2.TLSRoute, error)
+ // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, tLSRoute *v1alpha2.TLSRoute, opts v1.UpdateOptions) (*v1alpha2.TLSRoute, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
@@ -51,206 +49,25 @@ type TLSRouteInterface interface {
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.TLSRoute, err error)
Apply(ctx context.Context, tLSRoute *apisv1alpha2.TLSRouteApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.TLSRoute, err error)
+ // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
ApplyStatus(ctx context.Context, tLSRoute *apisv1alpha2.TLSRouteApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.TLSRoute, err error)
TLSRouteExpansion
}
// tLSRoutes implements TLSRouteInterface
type tLSRoutes struct {
- client rest.Interface
- ns string
+ *gentype.ClientWithListAndApply[*v1alpha2.TLSRoute, *v1alpha2.TLSRouteList, *apisv1alpha2.TLSRouteApplyConfiguration]
}
// newTLSRoutes returns a TLSRoutes
func newTLSRoutes(c *GatewayV1alpha2Client, namespace string) *tLSRoutes {
return &tLSRoutes{
- client: c.RESTClient(),
- ns: namespace,
+ gentype.NewClientWithListAndApply[*v1alpha2.TLSRoute, *v1alpha2.TLSRouteList, *apisv1alpha2.TLSRouteApplyConfiguration](
+ "tlsroutes",
+ c.RESTClient(),
+ scheme.ParameterCodec,
+ namespace,
+ func() *v1alpha2.TLSRoute { return &v1alpha2.TLSRoute{} },
+ func() *v1alpha2.TLSRouteList { return &v1alpha2.TLSRouteList{} }),
}
}
-
-// Get takes name of the tLSRoute, and returns the corresponding tLSRoute object, and an error if there is any.
-func (c *tLSRoutes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.TLSRoute, err error) {
- result = &v1alpha2.TLSRoute{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("tlsroutes").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do(ctx).
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of TLSRoutes that match those selectors.
-func (c *tLSRoutes) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.TLSRouteList, err error) {
- var timeout time.Duration
- if opts.TimeoutSeconds != nil {
- timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
- }
- result = &v1alpha2.TLSRouteList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("tlsroutes").
- VersionedParams(&opts, scheme.ParameterCodec).
- Timeout(timeout).
- Do(ctx).
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested tLSRoutes.
-func (c *tLSRoutes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
- var timeout time.Duration
- if opts.TimeoutSeconds != nil {
- timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
- }
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("tlsroutes").
- VersionedParams(&opts, scheme.ParameterCodec).
- Timeout(timeout).
- Watch(ctx)
-}
-
-// Create takes the representation of a tLSRoute and creates it. Returns the server's representation of the tLSRoute, and an error, if there is any.
-func (c *tLSRoutes) Create(ctx context.Context, tLSRoute *v1alpha2.TLSRoute, opts v1.CreateOptions) (result *v1alpha2.TLSRoute, err error) {
- result = &v1alpha2.TLSRoute{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("tlsroutes").
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(tLSRoute).
- Do(ctx).
- Into(result)
- return
-}
-
-// Update takes the representation of a tLSRoute and updates it. Returns the server's representation of the tLSRoute, and an error, if there is any.
-func (c *tLSRoutes) Update(ctx context.Context, tLSRoute *v1alpha2.TLSRoute, opts v1.UpdateOptions) (result *v1alpha2.TLSRoute, err error) {
- result = &v1alpha2.TLSRoute{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("tlsroutes").
- Name(tLSRoute.Name).
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(tLSRoute).
- Do(ctx).
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-func (c *tLSRoutes) UpdateStatus(ctx context.Context, tLSRoute *v1alpha2.TLSRoute, opts v1.UpdateOptions) (result *v1alpha2.TLSRoute, err error) {
- result = &v1alpha2.TLSRoute{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("tlsroutes").
- Name(tLSRoute.Name).
- SubResource("status").
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(tLSRoute).
- Do(ctx).
- Into(result)
- return
-}
-
-// Delete takes name of the tLSRoute and deletes it. Returns an error if one occurs.
-func (c *tLSRoutes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("tlsroutes").
- Name(name).
- Body(&opts).
- Do(ctx).
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *tLSRoutes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
- var timeout time.Duration
- if listOpts.TimeoutSeconds != nil {
- timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
- }
- return c.client.Delete().
- Namespace(c.ns).
- Resource("tlsroutes").
- VersionedParams(&listOpts, scheme.ParameterCodec).
- Timeout(timeout).
- Body(&opts).
- Do(ctx).
- Error()
-}
-
-// Patch applies the patch and returns the patched tLSRoute.
-func (c *tLSRoutes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.TLSRoute, err error) {
- result = &v1alpha2.TLSRoute{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("tlsroutes").
- Name(name).
- SubResource(subresources...).
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
-
-// Apply takes the given apply declarative configuration, applies it and returns the applied tLSRoute.
-func (c *tLSRoutes) Apply(ctx context.Context, tLSRoute *apisv1alpha2.TLSRouteApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.TLSRoute, err error) {
- if tLSRoute == nil {
- return nil, fmt.Errorf("tLSRoute provided to Apply must not be nil")
- }
- patchOpts := opts.ToPatchOptions()
- data, err := json.Marshal(tLSRoute)
- if err != nil {
- return nil, err
- }
- name := tLSRoute.Name
- if name == nil {
- return nil, fmt.Errorf("tLSRoute.Name must be provided to Apply")
- }
- result = &v1alpha2.TLSRoute{}
- err = c.client.Patch(types.ApplyPatchType).
- Namespace(c.ns).
- Resource("tlsroutes").
- Name(*name).
- VersionedParams(&patchOpts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
-
-// ApplyStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
-func (c *tLSRoutes) ApplyStatus(ctx context.Context, tLSRoute *apisv1alpha2.TLSRouteApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.TLSRoute, err error) {
- if tLSRoute == nil {
- return nil, fmt.Errorf("tLSRoute provided to Apply must not be nil")
- }
- patchOpts := opts.ToPatchOptions()
- data, err := json.Marshal(tLSRoute)
- if err != nil {
- return nil, err
- }
-
- name := tLSRoute.Name
- if name == nil {
- return nil, fmt.Errorf("tLSRoute.Name must be provided to Apply")
- }
-
- result = &v1alpha2.TLSRoute{}
- err = c.client.Patch(types.ApplyPatchType).
- Namespace(c.ns).
- Resource("tlsroutes").
- Name(*name).
- SubResource("status").
- VersionedParams(&patchOpts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
diff --git a/pkg/client/clientset/versioned/typed/apis/v1alpha2/udproute.go b/pkg/client/clientset/versioned/typed/apis/v1alpha2/udproute.go
index 3217a9004f..820bed9f31 100644
--- a/pkg/client/clientset/versioned/typed/apis/v1alpha2/udproute.go
+++ b/pkg/client/clientset/versioned/typed/apis/v1alpha2/udproute.go
@@ -20,14 +20,11 @@ package v1alpha2
import (
"context"
- json "encoding/json"
- "fmt"
- "time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
- rest "k8s.io/client-go/rest"
+ gentype "k8s.io/client-go/gentype"
apisv1alpha2 "sigs.k8s.io/gateway-api/apis/applyconfiguration/apis/v1alpha2"
v1alpha2 "sigs.k8s.io/gateway-api/apis/v1alpha2"
scheme "sigs.k8s.io/gateway-api/pkg/client/clientset/versioned/scheme"
@@ -43,6 +40,7 @@ type UDPRoutesGetter interface {
type UDPRouteInterface interface {
Create(ctx context.Context, uDPRoute *v1alpha2.UDPRoute, opts v1.CreateOptions) (*v1alpha2.UDPRoute, error)
Update(ctx context.Context, uDPRoute *v1alpha2.UDPRoute, opts v1.UpdateOptions) (*v1alpha2.UDPRoute, error)
+ // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, uDPRoute *v1alpha2.UDPRoute, opts v1.UpdateOptions) (*v1alpha2.UDPRoute, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
@@ -51,206 +49,25 @@ type UDPRouteInterface interface {
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.UDPRoute, err error)
Apply(ctx context.Context, uDPRoute *apisv1alpha2.UDPRouteApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.UDPRoute, err error)
+ // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
ApplyStatus(ctx context.Context, uDPRoute *apisv1alpha2.UDPRouteApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.UDPRoute, err error)
UDPRouteExpansion
}
// uDPRoutes implements UDPRouteInterface
type uDPRoutes struct {
- client rest.Interface
- ns string
+ *gentype.ClientWithListAndApply[*v1alpha2.UDPRoute, *v1alpha2.UDPRouteList, *apisv1alpha2.UDPRouteApplyConfiguration]
}
// newUDPRoutes returns a UDPRoutes
func newUDPRoutes(c *GatewayV1alpha2Client, namespace string) *uDPRoutes {
return &uDPRoutes{
- client: c.RESTClient(),
- ns: namespace,
+ gentype.NewClientWithListAndApply[*v1alpha2.UDPRoute, *v1alpha2.UDPRouteList, *apisv1alpha2.UDPRouteApplyConfiguration](
+ "udproutes",
+ c.RESTClient(),
+ scheme.ParameterCodec,
+ namespace,
+ func() *v1alpha2.UDPRoute { return &v1alpha2.UDPRoute{} },
+ func() *v1alpha2.UDPRouteList { return &v1alpha2.UDPRouteList{} }),
}
}
-
-// Get takes name of the uDPRoute, and returns the corresponding uDPRoute object, and an error if there is any.
-func (c *uDPRoutes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.UDPRoute, err error) {
- result = &v1alpha2.UDPRoute{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("udproutes").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do(ctx).
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of UDPRoutes that match those selectors.
-func (c *uDPRoutes) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.UDPRouteList, err error) {
- var timeout time.Duration
- if opts.TimeoutSeconds != nil {
- timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
- }
- result = &v1alpha2.UDPRouteList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("udproutes").
- VersionedParams(&opts, scheme.ParameterCodec).
- Timeout(timeout).
- Do(ctx).
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested uDPRoutes.
-func (c *uDPRoutes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
- var timeout time.Duration
- if opts.TimeoutSeconds != nil {
- timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
- }
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("udproutes").
- VersionedParams(&opts, scheme.ParameterCodec).
- Timeout(timeout).
- Watch(ctx)
-}
-
-// Create takes the representation of a uDPRoute and creates it. Returns the server's representation of the uDPRoute, and an error, if there is any.
-func (c *uDPRoutes) Create(ctx context.Context, uDPRoute *v1alpha2.UDPRoute, opts v1.CreateOptions) (result *v1alpha2.UDPRoute, err error) {
- result = &v1alpha2.UDPRoute{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("udproutes").
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(uDPRoute).
- Do(ctx).
- Into(result)
- return
-}
-
-// Update takes the representation of a uDPRoute and updates it. Returns the server's representation of the uDPRoute, and an error, if there is any.
-func (c *uDPRoutes) Update(ctx context.Context, uDPRoute *v1alpha2.UDPRoute, opts v1.UpdateOptions) (result *v1alpha2.UDPRoute, err error) {
- result = &v1alpha2.UDPRoute{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("udproutes").
- Name(uDPRoute.Name).
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(uDPRoute).
- Do(ctx).
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-func (c *uDPRoutes) UpdateStatus(ctx context.Context, uDPRoute *v1alpha2.UDPRoute, opts v1.UpdateOptions) (result *v1alpha2.UDPRoute, err error) {
- result = &v1alpha2.UDPRoute{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("udproutes").
- Name(uDPRoute.Name).
- SubResource("status").
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(uDPRoute).
- Do(ctx).
- Into(result)
- return
-}
-
-// Delete takes name of the uDPRoute and deletes it. Returns an error if one occurs.
-func (c *uDPRoutes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("udproutes").
- Name(name).
- Body(&opts).
- Do(ctx).
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *uDPRoutes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
- var timeout time.Duration
- if listOpts.TimeoutSeconds != nil {
- timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
- }
- return c.client.Delete().
- Namespace(c.ns).
- Resource("udproutes").
- VersionedParams(&listOpts, scheme.ParameterCodec).
- Timeout(timeout).
- Body(&opts).
- Do(ctx).
- Error()
-}
-
-// Patch applies the patch and returns the patched uDPRoute.
-func (c *uDPRoutes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.UDPRoute, err error) {
- result = &v1alpha2.UDPRoute{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("udproutes").
- Name(name).
- SubResource(subresources...).
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
-
-// Apply takes the given apply declarative configuration, applies it and returns the applied uDPRoute.
-func (c *uDPRoutes) Apply(ctx context.Context, uDPRoute *apisv1alpha2.UDPRouteApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.UDPRoute, err error) {
- if uDPRoute == nil {
- return nil, fmt.Errorf("uDPRoute provided to Apply must not be nil")
- }
- patchOpts := opts.ToPatchOptions()
- data, err := json.Marshal(uDPRoute)
- if err != nil {
- return nil, err
- }
- name := uDPRoute.Name
- if name == nil {
- return nil, fmt.Errorf("uDPRoute.Name must be provided to Apply")
- }
- result = &v1alpha2.UDPRoute{}
- err = c.client.Patch(types.ApplyPatchType).
- Namespace(c.ns).
- Resource("udproutes").
- Name(*name).
- VersionedParams(&patchOpts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
-
-// ApplyStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
-func (c *uDPRoutes) ApplyStatus(ctx context.Context, uDPRoute *apisv1alpha2.UDPRouteApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha2.UDPRoute, err error) {
- if uDPRoute == nil {
- return nil, fmt.Errorf("uDPRoute provided to Apply must not be nil")
- }
- patchOpts := opts.ToPatchOptions()
- data, err := json.Marshal(uDPRoute)
- if err != nil {
- return nil, err
- }
-
- name := uDPRoute.Name
- if name == nil {
- return nil, fmt.Errorf("uDPRoute.Name must be provided to Apply")
- }
-
- result = &v1alpha2.UDPRoute{}
- err = c.client.Patch(types.ApplyPatchType).
- Namespace(c.ns).
- Resource("udproutes").
- Name(*name).
- SubResource("status").
- VersionedParams(&patchOpts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
diff --git a/pkg/client/clientset/versioned/typed/apis/v1alpha3/backendtlspolicy.go b/pkg/client/clientset/versioned/typed/apis/v1alpha3/backendtlspolicy.go
index aecd62b6bb..3edd7e6279 100644
--- a/pkg/client/clientset/versioned/typed/apis/v1alpha3/backendtlspolicy.go
+++ b/pkg/client/clientset/versioned/typed/apis/v1alpha3/backendtlspolicy.go
@@ -20,14 +20,11 @@ package v1alpha3
import (
"context"
- json "encoding/json"
- "fmt"
- "time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
- rest "k8s.io/client-go/rest"
+ gentype "k8s.io/client-go/gentype"
apisv1alpha3 "sigs.k8s.io/gateway-api/apis/applyconfiguration/apis/v1alpha3"
v1alpha3 "sigs.k8s.io/gateway-api/apis/v1alpha3"
scheme "sigs.k8s.io/gateway-api/pkg/client/clientset/versioned/scheme"
@@ -43,6 +40,7 @@ type BackendTLSPoliciesGetter interface {
type BackendTLSPolicyInterface interface {
Create(ctx context.Context, backendTLSPolicy *v1alpha3.BackendTLSPolicy, opts v1.CreateOptions) (*v1alpha3.BackendTLSPolicy, error)
Update(ctx context.Context, backendTLSPolicy *v1alpha3.BackendTLSPolicy, opts v1.UpdateOptions) (*v1alpha3.BackendTLSPolicy, error)
+ // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, backendTLSPolicy *v1alpha3.BackendTLSPolicy, opts v1.UpdateOptions) (*v1alpha3.BackendTLSPolicy, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
@@ -51,206 +49,25 @@ type BackendTLSPolicyInterface interface {
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.BackendTLSPolicy, err error)
Apply(ctx context.Context, backendTLSPolicy *apisv1alpha3.BackendTLSPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.BackendTLSPolicy, err error)
+ // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
ApplyStatus(ctx context.Context, backendTLSPolicy *apisv1alpha3.BackendTLSPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.BackendTLSPolicy, err error)
BackendTLSPolicyExpansion
}
// backendTLSPolicies implements BackendTLSPolicyInterface
type backendTLSPolicies struct {
- client rest.Interface
- ns string
+ *gentype.ClientWithListAndApply[*v1alpha3.BackendTLSPolicy, *v1alpha3.BackendTLSPolicyList, *apisv1alpha3.BackendTLSPolicyApplyConfiguration]
}
// newBackendTLSPolicies returns a BackendTLSPolicies
func newBackendTLSPolicies(c *GatewayV1alpha3Client, namespace string) *backendTLSPolicies {
return &backendTLSPolicies{
- client: c.RESTClient(),
- ns: namespace,
+ gentype.NewClientWithListAndApply[*v1alpha3.BackendTLSPolicy, *v1alpha3.BackendTLSPolicyList, *apisv1alpha3.BackendTLSPolicyApplyConfiguration](
+ "backendtlspolicies",
+ c.RESTClient(),
+ scheme.ParameterCodec,
+ namespace,
+ func() *v1alpha3.BackendTLSPolicy { return &v1alpha3.BackendTLSPolicy{} },
+ func() *v1alpha3.BackendTLSPolicyList { return &v1alpha3.BackendTLSPolicyList{} }),
}
}
-
-// Get takes name of the backendTLSPolicy, and returns the corresponding backendTLSPolicy object, and an error if there is any.
-func (c *backendTLSPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha3.BackendTLSPolicy, err error) {
- result = &v1alpha3.BackendTLSPolicy{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("backendtlspolicies").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do(ctx).
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of BackendTLSPolicies that match those selectors.
-func (c *backendTLSPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha3.BackendTLSPolicyList, err error) {
- var timeout time.Duration
- if opts.TimeoutSeconds != nil {
- timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
- }
- result = &v1alpha3.BackendTLSPolicyList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("backendtlspolicies").
- VersionedParams(&opts, scheme.ParameterCodec).
- Timeout(timeout).
- Do(ctx).
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested backendTLSPolicies.
-func (c *backendTLSPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
- var timeout time.Duration
- if opts.TimeoutSeconds != nil {
- timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
- }
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("backendtlspolicies").
- VersionedParams(&opts, scheme.ParameterCodec).
- Timeout(timeout).
- Watch(ctx)
-}
-
-// Create takes the representation of a backendTLSPolicy and creates it. Returns the server's representation of the backendTLSPolicy, and an error, if there is any.
-func (c *backendTLSPolicies) Create(ctx context.Context, backendTLSPolicy *v1alpha3.BackendTLSPolicy, opts v1.CreateOptions) (result *v1alpha3.BackendTLSPolicy, err error) {
- result = &v1alpha3.BackendTLSPolicy{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("backendtlspolicies").
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(backendTLSPolicy).
- Do(ctx).
- Into(result)
- return
-}
-
-// Update takes the representation of a backendTLSPolicy and updates it. Returns the server's representation of the backendTLSPolicy, and an error, if there is any.
-func (c *backendTLSPolicies) Update(ctx context.Context, backendTLSPolicy *v1alpha3.BackendTLSPolicy, opts v1.UpdateOptions) (result *v1alpha3.BackendTLSPolicy, err error) {
- result = &v1alpha3.BackendTLSPolicy{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("backendtlspolicies").
- Name(backendTLSPolicy.Name).
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(backendTLSPolicy).
- Do(ctx).
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-func (c *backendTLSPolicies) UpdateStatus(ctx context.Context, backendTLSPolicy *v1alpha3.BackendTLSPolicy, opts v1.UpdateOptions) (result *v1alpha3.BackendTLSPolicy, err error) {
- result = &v1alpha3.BackendTLSPolicy{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("backendtlspolicies").
- Name(backendTLSPolicy.Name).
- SubResource("status").
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(backendTLSPolicy).
- Do(ctx).
- Into(result)
- return
-}
-
-// Delete takes name of the backendTLSPolicy and deletes it. Returns an error if one occurs.
-func (c *backendTLSPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("backendtlspolicies").
- Name(name).
- Body(&opts).
- Do(ctx).
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *backendTLSPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
- var timeout time.Duration
- if listOpts.TimeoutSeconds != nil {
- timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
- }
- return c.client.Delete().
- Namespace(c.ns).
- Resource("backendtlspolicies").
- VersionedParams(&listOpts, scheme.ParameterCodec).
- Timeout(timeout).
- Body(&opts).
- Do(ctx).
- Error()
-}
-
-// Patch applies the patch and returns the patched backendTLSPolicy.
-func (c *backendTLSPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.BackendTLSPolicy, err error) {
- result = &v1alpha3.BackendTLSPolicy{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("backendtlspolicies").
- Name(name).
- SubResource(subresources...).
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
-
-// Apply takes the given apply declarative configuration, applies it and returns the applied backendTLSPolicy.
-func (c *backendTLSPolicies) Apply(ctx context.Context, backendTLSPolicy *apisv1alpha3.BackendTLSPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.BackendTLSPolicy, err error) {
- if backendTLSPolicy == nil {
- return nil, fmt.Errorf("backendTLSPolicy provided to Apply must not be nil")
- }
- patchOpts := opts.ToPatchOptions()
- data, err := json.Marshal(backendTLSPolicy)
- if err != nil {
- return nil, err
- }
- name := backendTLSPolicy.Name
- if name == nil {
- return nil, fmt.Errorf("backendTLSPolicy.Name must be provided to Apply")
- }
- result = &v1alpha3.BackendTLSPolicy{}
- err = c.client.Patch(types.ApplyPatchType).
- Namespace(c.ns).
- Resource("backendtlspolicies").
- Name(*name).
- VersionedParams(&patchOpts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
-
-// ApplyStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
-func (c *backendTLSPolicies) ApplyStatus(ctx context.Context, backendTLSPolicy *apisv1alpha3.BackendTLSPolicyApplyConfiguration, opts v1.ApplyOptions) (result *v1alpha3.BackendTLSPolicy, err error) {
- if backendTLSPolicy == nil {
- return nil, fmt.Errorf("backendTLSPolicy provided to Apply must not be nil")
- }
- patchOpts := opts.ToPatchOptions()
- data, err := json.Marshal(backendTLSPolicy)
- if err != nil {
- return nil, err
- }
-
- name := backendTLSPolicy.Name
- if name == nil {
- return nil, fmt.Errorf("backendTLSPolicy.Name must be provided to Apply")
- }
-
- result = &v1alpha3.BackendTLSPolicy{}
- err = c.client.Patch(types.ApplyPatchType).
- Namespace(c.ns).
- Resource("backendtlspolicies").
- Name(*name).
- SubResource("status").
- VersionedParams(&patchOpts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
diff --git a/pkg/client/clientset/versioned/typed/apis/v1alpha3/fake/fake_backendtlspolicy.go b/pkg/client/clientset/versioned/typed/apis/v1alpha3/fake/fake_backendtlspolicy.go
index 65ec24e635..042a931aea 100644
--- a/pkg/client/clientset/versioned/typed/apis/v1alpha3/fake/fake_backendtlspolicy.go
+++ b/pkg/client/clientset/versioned/typed/apis/v1alpha3/fake/fake_backendtlspolicy.go
@@ -44,22 +44,24 @@ var backendtlspoliciesKind = v1alpha3.SchemeGroupVersion.WithKind("BackendTLSPol
// Get takes name of the backendTLSPolicy, and returns the corresponding backendTLSPolicy object, and an error if there is any.
func (c *FakeBackendTLSPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha3.BackendTLSPolicy, err error) {
+ emptyResult := &v1alpha3.BackendTLSPolicy{}
obj, err := c.Fake.
- Invokes(testing.NewGetAction(backendtlspoliciesResource, c.ns, name), &v1alpha3.BackendTLSPolicy{})
+ Invokes(testing.NewGetActionWithOptions(backendtlspoliciesResource, c.ns, name, options), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha3.BackendTLSPolicy), err
}
// List takes label and field selectors, and returns the list of BackendTLSPolicies that match those selectors.
func (c *FakeBackendTLSPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha3.BackendTLSPolicyList, err error) {
+ emptyResult := &v1alpha3.BackendTLSPolicyList{}
obj, err := c.Fake.
- Invokes(testing.NewListAction(backendtlspoliciesResource, backendtlspoliciesKind, c.ns, opts), &v1alpha3.BackendTLSPolicyList{})
+ Invokes(testing.NewListActionWithOptions(backendtlspoliciesResource, backendtlspoliciesKind, c.ns, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@@ -78,40 +80,43 @@ func (c *FakeBackendTLSPolicies) List(ctx context.Context, opts v1.ListOptions)
// Watch returns a watch.Interface that watches the requested backendTLSPolicies.
func (c *FakeBackendTLSPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
- InvokesWatch(testing.NewWatchAction(backendtlspoliciesResource, c.ns, opts))
+ InvokesWatch(testing.NewWatchActionWithOptions(backendtlspoliciesResource, c.ns, opts))
}
// Create takes the representation of a backendTLSPolicy and creates it. Returns the server's representation of the backendTLSPolicy, and an error, if there is any.
func (c *FakeBackendTLSPolicies) Create(ctx context.Context, backendTLSPolicy *v1alpha3.BackendTLSPolicy, opts v1.CreateOptions) (result *v1alpha3.BackendTLSPolicy, err error) {
+ emptyResult := &v1alpha3.BackendTLSPolicy{}
obj, err := c.Fake.
- Invokes(testing.NewCreateAction(backendtlspoliciesResource, c.ns, backendTLSPolicy), &v1alpha3.BackendTLSPolicy{})
+ Invokes(testing.NewCreateActionWithOptions(backendtlspoliciesResource, c.ns, backendTLSPolicy, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha3.BackendTLSPolicy), err
}
// Update takes the representation of a backendTLSPolicy and updates it. Returns the server's representation of the backendTLSPolicy, and an error, if there is any.
func (c *FakeBackendTLSPolicies) Update(ctx context.Context, backendTLSPolicy *v1alpha3.BackendTLSPolicy, opts v1.UpdateOptions) (result *v1alpha3.BackendTLSPolicy, err error) {
+ emptyResult := &v1alpha3.BackendTLSPolicy{}
obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(backendtlspoliciesResource, c.ns, backendTLSPolicy), &v1alpha3.BackendTLSPolicy{})
+ Invokes(testing.NewUpdateActionWithOptions(backendtlspoliciesResource, c.ns, backendTLSPolicy, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha3.BackendTLSPolicy), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-func (c *FakeBackendTLSPolicies) UpdateStatus(ctx context.Context, backendTLSPolicy *v1alpha3.BackendTLSPolicy, opts v1.UpdateOptions) (*v1alpha3.BackendTLSPolicy, error) {
+func (c *FakeBackendTLSPolicies) UpdateStatus(ctx context.Context, backendTLSPolicy *v1alpha3.BackendTLSPolicy, opts v1.UpdateOptions) (result *v1alpha3.BackendTLSPolicy, err error) {
+ emptyResult := &v1alpha3.BackendTLSPolicy{}
obj, err := c.Fake.
- Invokes(testing.NewUpdateSubresourceAction(backendtlspoliciesResource, "status", c.ns, backendTLSPolicy), &v1alpha3.BackendTLSPolicy{})
+ Invokes(testing.NewUpdateSubresourceActionWithOptions(backendtlspoliciesResource, "status", c.ns, backendTLSPolicy, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha3.BackendTLSPolicy), err
}
@@ -126,7 +131,7 @@ func (c *FakeBackendTLSPolicies) Delete(ctx context.Context, name string, opts v
// DeleteCollection deletes a collection of objects.
func (c *FakeBackendTLSPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
- action := testing.NewDeleteCollectionAction(backendtlspoliciesResource, c.ns, listOpts)
+ action := testing.NewDeleteCollectionActionWithOptions(backendtlspoliciesResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1alpha3.BackendTLSPolicyList{})
return err
@@ -134,11 +139,12 @@ func (c *FakeBackendTLSPolicies) DeleteCollection(ctx context.Context, opts v1.D
// Patch applies the patch and returns the patched backendTLSPolicy.
func (c *FakeBackendTLSPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.BackendTLSPolicy, err error) {
+ emptyResult := &v1alpha3.BackendTLSPolicy{}
obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(backendtlspoliciesResource, c.ns, name, pt, data, subresources...), &v1alpha3.BackendTLSPolicy{})
+ Invokes(testing.NewPatchSubresourceActionWithOptions(backendtlspoliciesResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha3.BackendTLSPolicy), err
}
@@ -156,11 +162,12 @@ func (c *FakeBackendTLSPolicies) Apply(ctx context.Context, backendTLSPolicy *ap
if name == nil {
return nil, fmt.Errorf("backendTLSPolicy.Name must be provided to Apply")
}
+ emptyResult := &v1alpha3.BackendTLSPolicy{}
obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(backendtlspoliciesResource, c.ns, *name, types.ApplyPatchType, data), &v1alpha3.BackendTLSPolicy{})
+ Invokes(testing.NewPatchSubresourceActionWithOptions(backendtlspoliciesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha3.BackendTLSPolicy), err
}
@@ -179,11 +186,12 @@ func (c *FakeBackendTLSPolicies) ApplyStatus(ctx context.Context, backendTLSPoli
if name == nil {
return nil, fmt.Errorf("backendTLSPolicy.Name must be provided to Apply")
}
+ emptyResult := &v1alpha3.BackendTLSPolicy{}
obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(backendtlspoliciesResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1alpha3.BackendTLSPolicy{})
+ Invokes(testing.NewPatchSubresourceActionWithOptions(backendtlspoliciesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1alpha3.BackendTLSPolicy), err
}
diff --git a/pkg/client/clientset/versioned/typed/apis/v1beta1/fake/fake_gateway.go b/pkg/client/clientset/versioned/typed/apis/v1beta1/fake/fake_gateway.go
index e591318ced..757c95f11b 100644
--- a/pkg/client/clientset/versioned/typed/apis/v1beta1/fake/fake_gateway.go
+++ b/pkg/client/clientset/versioned/typed/apis/v1beta1/fake/fake_gateway.go
@@ -44,22 +44,24 @@ var gatewaysKind = v1beta1.SchemeGroupVersion.WithKind("Gateway")
// Get takes name of the gateway, and returns the corresponding gateway object, and an error if there is any.
func (c *FakeGateways) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Gateway, err error) {
+ emptyResult := &v1beta1.Gateway{}
obj, err := c.Fake.
- Invokes(testing.NewGetAction(gatewaysResource, c.ns, name), &v1beta1.Gateway{})
+ Invokes(testing.NewGetActionWithOptions(gatewaysResource, c.ns, name, options), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1beta1.Gateway), err
}
// List takes label and field selectors, and returns the list of Gateways that match those selectors.
func (c *FakeGateways) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.GatewayList, err error) {
+ emptyResult := &v1beta1.GatewayList{}
obj, err := c.Fake.
- Invokes(testing.NewListAction(gatewaysResource, gatewaysKind, c.ns, opts), &v1beta1.GatewayList{})
+ Invokes(testing.NewListActionWithOptions(gatewaysResource, gatewaysKind, c.ns, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@@ -78,40 +80,43 @@ func (c *FakeGateways) List(ctx context.Context, opts v1.ListOptions) (result *v
// Watch returns a watch.Interface that watches the requested gateways.
func (c *FakeGateways) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
- InvokesWatch(testing.NewWatchAction(gatewaysResource, c.ns, opts))
+ InvokesWatch(testing.NewWatchActionWithOptions(gatewaysResource, c.ns, opts))
}
// Create takes the representation of a gateway and creates it. Returns the server's representation of the gateway, and an error, if there is any.
func (c *FakeGateways) Create(ctx context.Context, gateway *v1beta1.Gateway, opts v1.CreateOptions) (result *v1beta1.Gateway, err error) {
+ emptyResult := &v1beta1.Gateway{}
obj, err := c.Fake.
- Invokes(testing.NewCreateAction(gatewaysResource, c.ns, gateway), &v1beta1.Gateway{})
+ Invokes(testing.NewCreateActionWithOptions(gatewaysResource, c.ns, gateway, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1beta1.Gateway), err
}
// Update takes the representation of a gateway and updates it. Returns the server's representation of the gateway, and an error, if there is any.
func (c *FakeGateways) Update(ctx context.Context, gateway *v1beta1.Gateway, opts v1.UpdateOptions) (result *v1beta1.Gateway, err error) {
+ emptyResult := &v1beta1.Gateway{}
obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(gatewaysResource, c.ns, gateway), &v1beta1.Gateway{})
+ Invokes(testing.NewUpdateActionWithOptions(gatewaysResource, c.ns, gateway, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1beta1.Gateway), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-func (c *FakeGateways) UpdateStatus(ctx context.Context, gateway *v1beta1.Gateway, opts v1.UpdateOptions) (*v1beta1.Gateway, error) {
+func (c *FakeGateways) UpdateStatus(ctx context.Context, gateway *v1beta1.Gateway, opts v1.UpdateOptions) (result *v1beta1.Gateway, err error) {
+ emptyResult := &v1beta1.Gateway{}
obj, err := c.Fake.
- Invokes(testing.NewUpdateSubresourceAction(gatewaysResource, "status", c.ns, gateway), &v1beta1.Gateway{})
+ Invokes(testing.NewUpdateSubresourceActionWithOptions(gatewaysResource, "status", c.ns, gateway, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1beta1.Gateway), err
}
@@ -126,7 +131,7 @@ func (c *FakeGateways) Delete(ctx context.Context, name string, opts v1.DeleteOp
// DeleteCollection deletes a collection of objects.
func (c *FakeGateways) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
- action := testing.NewDeleteCollectionAction(gatewaysResource, c.ns, listOpts)
+ action := testing.NewDeleteCollectionActionWithOptions(gatewaysResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1beta1.GatewayList{})
return err
@@ -134,11 +139,12 @@ func (c *FakeGateways) DeleteCollection(ctx context.Context, opts v1.DeleteOptio
// Patch applies the patch and returns the patched gateway.
func (c *FakeGateways) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Gateway, err error) {
+ emptyResult := &v1beta1.Gateway{}
obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(gatewaysResource, c.ns, name, pt, data, subresources...), &v1beta1.Gateway{})
+ Invokes(testing.NewPatchSubresourceActionWithOptions(gatewaysResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1beta1.Gateway), err
}
@@ -156,11 +162,12 @@ func (c *FakeGateways) Apply(ctx context.Context, gateway *apisv1beta1.GatewayAp
if name == nil {
return nil, fmt.Errorf("gateway.Name must be provided to Apply")
}
+ emptyResult := &v1beta1.Gateway{}
obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(gatewaysResource, c.ns, *name, types.ApplyPatchType, data), &v1beta1.Gateway{})
+ Invokes(testing.NewPatchSubresourceActionWithOptions(gatewaysResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1beta1.Gateway), err
}
@@ -179,11 +186,12 @@ func (c *FakeGateways) ApplyStatus(ctx context.Context, gateway *apisv1beta1.Gat
if name == nil {
return nil, fmt.Errorf("gateway.Name must be provided to Apply")
}
+ emptyResult := &v1beta1.Gateway{}
obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(gatewaysResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1beta1.Gateway{})
+ Invokes(testing.NewPatchSubresourceActionWithOptions(gatewaysResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1beta1.Gateway), err
}
diff --git a/pkg/client/clientset/versioned/typed/apis/v1beta1/fake/fake_gatewayclass.go b/pkg/client/clientset/versioned/typed/apis/v1beta1/fake/fake_gatewayclass.go
index 4eb6d6a41f..0260974731 100644
--- a/pkg/client/clientset/versioned/typed/apis/v1beta1/fake/fake_gatewayclass.go
+++ b/pkg/client/clientset/versioned/typed/apis/v1beta1/fake/fake_gatewayclass.go
@@ -43,20 +43,22 @@ var gatewayclassesKind = v1beta1.SchemeGroupVersion.WithKind("GatewayClass")
// Get takes name of the gatewayClass, and returns the corresponding gatewayClass object, and an error if there is any.
func (c *FakeGatewayClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.GatewayClass, err error) {
+ emptyResult := &v1beta1.GatewayClass{}
obj, err := c.Fake.
- Invokes(testing.NewRootGetAction(gatewayclassesResource, name), &v1beta1.GatewayClass{})
+ Invokes(testing.NewRootGetActionWithOptions(gatewayclassesResource, name, options), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1beta1.GatewayClass), err
}
// List takes label and field selectors, and returns the list of GatewayClasses that match those selectors.
func (c *FakeGatewayClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.GatewayClassList, err error) {
+ emptyResult := &v1beta1.GatewayClassList{}
obj, err := c.Fake.
- Invokes(testing.NewRootListAction(gatewayclassesResource, gatewayclassesKind, opts), &v1beta1.GatewayClassList{})
+ Invokes(testing.NewRootListActionWithOptions(gatewayclassesResource, gatewayclassesKind, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@@ -75,36 +77,39 @@ func (c *FakeGatewayClasses) List(ctx context.Context, opts v1.ListOptions) (res
// Watch returns a watch.Interface that watches the requested gatewayClasses.
func (c *FakeGatewayClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
- InvokesWatch(testing.NewRootWatchAction(gatewayclassesResource, opts))
+ InvokesWatch(testing.NewRootWatchActionWithOptions(gatewayclassesResource, opts))
}
// Create takes the representation of a gatewayClass and creates it. Returns the server's representation of the gatewayClass, and an error, if there is any.
func (c *FakeGatewayClasses) Create(ctx context.Context, gatewayClass *v1beta1.GatewayClass, opts v1.CreateOptions) (result *v1beta1.GatewayClass, err error) {
+ emptyResult := &v1beta1.GatewayClass{}
obj, err := c.Fake.
- Invokes(testing.NewRootCreateAction(gatewayclassesResource, gatewayClass), &v1beta1.GatewayClass{})
+ Invokes(testing.NewRootCreateActionWithOptions(gatewayclassesResource, gatewayClass, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1beta1.GatewayClass), err
}
// Update takes the representation of a gatewayClass and updates it. Returns the server's representation of the gatewayClass, and an error, if there is any.
func (c *FakeGatewayClasses) Update(ctx context.Context, gatewayClass *v1beta1.GatewayClass, opts v1.UpdateOptions) (result *v1beta1.GatewayClass, err error) {
+ emptyResult := &v1beta1.GatewayClass{}
obj, err := c.Fake.
- Invokes(testing.NewRootUpdateAction(gatewayclassesResource, gatewayClass), &v1beta1.GatewayClass{})
+ Invokes(testing.NewRootUpdateActionWithOptions(gatewayclassesResource, gatewayClass, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1beta1.GatewayClass), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-func (c *FakeGatewayClasses) UpdateStatus(ctx context.Context, gatewayClass *v1beta1.GatewayClass, opts v1.UpdateOptions) (*v1beta1.GatewayClass, error) {
+func (c *FakeGatewayClasses) UpdateStatus(ctx context.Context, gatewayClass *v1beta1.GatewayClass, opts v1.UpdateOptions) (result *v1beta1.GatewayClass, err error) {
+ emptyResult := &v1beta1.GatewayClass{}
obj, err := c.Fake.
- Invokes(testing.NewRootUpdateSubresourceAction(gatewayclassesResource, "status", gatewayClass), &v1beta1.GatewayClass{})
+ Invokes(testing.NewRootUpdateSubresourceActionWithOptions(gatewayclassesResource, "status", gatewayClass, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1beta1.GatewayClass), err
}
@@ -118,7 +123,7 @@ func (c *FakeGatewayClasses) Delete(ctx context.Context, name string, opts v1.De
// DeleteCollection deletes a collection of objects.
func (c *FakeGatewayClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
- action := testing.NewRootDeleteCollectionAction(gatewayclassesResource, listOpts)
+ action := testing.NewRootDeleteCollectionActionWithOptions(gatewayclassesResource, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1beta1.GatewayClassList{})
return err
@@ -126,10 +131,11 @@ func (c *FakeGatewayClasses) DeleteCollection(ctx context.Context, opts v1.Delet
// Patch applies the patch and returns the patched gatewayClass.
func (c *FakeGatewayClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.GatewayClass, err error) {
+ emptyResult := &v1beta1.GatewayClass{}
obj, err := c.Fake.
- Invokes(testing.NewRootPatchSubresourceAction(gatewayclassesResource, name, pt, data, subresources...), &v1beta1.GatewayClass{})
+ Invokes(testing.NewRootPatchSubresourceActionWithOptions(gatewayclassesResource, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1beta1.GatewayClass), err
}
@@ -147,10 +153,11 @@ func (c *FakeGatewayClasses) Apply(ctx context.Context, gatewayClass *apisv1beta
if name == nil {
return nil, fmt.Errorf("gatewayClass.Name must be provided to Apply")
}
+ emptyResult := &v1beta1.GatewayClass{}
obj, err := c.Fake.
- Invokes(testing.NewRootPatchSubresourceAction(gatewayclassesResource, *name, types.ApplyPatchType, data), &v1beta1.GatewayClass{})
+ Invokes(testing.NewRootPatchSubresourceActionWithOptions(gatewayclassesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1beta1.GatewayClass), err
}
@@ -169,10 +176,11 @@ func (c *FakeGatewayClasses) ApplyStatus(ctx context.Context, gatewayClass *apis
if name == nil {
return nil, fmt.Errorf("gatewayClass.Name must be provided to Apply")
}
+ emptyResult := &v1beta1.GatewayClass{}
obj, err := c.Fake.
- Invokes(testing.NewRootPatchSubresourceAction(gatewayclassesResource, *name, types.ApplyPatchType, data, "status"), &v1beta1.GatewayClass{})
+ Invokes(testing.NewRootPatchSubresourceActionWithOptions(gatewayclassesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1beta1.GatewayClass), err
}
diff --git a/pkg/client/clientset/versioned/typed/apis/v1beta1/fake/fake_httproute.go b/pkg/client/clientset/versioned/typed/apis/v1beta1/fake/fake_httproute.go
index cae13dec84..75b4b7107b 100644
--- a/pkg/client/clientset/versioned/typed/apis/v1beta1/fake/fake_httproute.go
+++ b/pkg/client/clientset/versioned/typed/apis/v1beta1/fake/fake_httproute.go
@@ -44,22 +44,24 @@ var httproutesKind = v1beta1.SchemeGroupVersion.WithKind("HTTPRoute")
// Get takes name of the hTTPRoute, and returns the corresponding hTTPRoute object, and an error if there is any.
func (c *FakeHTTPRoutes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.HTTPRoute, err error) {
+ emptyResult := &v1beta1.HTTPRoute{}
obj, err := c.Fake.
- Invokes(testing.NewGetAction(httproutesResource, c.ns, name), &v1beta1.HTTPRoute{})
+ Invokes(testing.NewGetActionWithOptions(httproutesResource, c.ns, name, options), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1beta1.HTTPRoute), err
}
// List takes label and field selectors, and returns the list of HTTPRoutes that match those selectors.
func (c *FakeHTTPRoutes) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.HTTPRouteList, err error) {
+ emptyResult := &v1beta1.HTTPRouteList{}
obj, err := c.Fake.
- Invokes(testing.NewListAction(httproutesResource, httproutesKind, c.ns, opts), &v1beta1.HTTPRouteList{})
+ Invokes(testing.NewListActionWithOptions(httproutesResource, httproutesKind, c.ns, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@@ -78,40 +80,43 @@ func (c *FakeHTTPRoutes) List(ctx context.Context, opts v1.ListOptions) (result
// Watch returns a watch.Interface that watches the requested hTTPRoutes.
func (c *FakeHTTPRoutes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
- InvokesWatch(testing.NewWatchAction(httproutesResource, c.ns, opts))
+ InvokesWatch(testing.NewWatchActionWithOptions(httproutesResource, c.ns, opts))
}
// Create takes the representation of a hTTPRoute and creates it. Returns the server's representation of the hTTPRoute, and an error, if there is any.
func (c *FakeHTTPRoutes) Create(ctx context.Context, hTTPRoute *v1beta1.HTTPRoute, opts v1.CreateOptions) (result *v1beta1.HTTPRoute, err error) {
+ emptyResult := &v1beta1.HTTPRoute{}
obj, err := c.Fake.
- Invokes(testing.NewCreateAction(httproutesResource, c.ns, hTTPRoute), &v1beta1.HTTPRoute{})
+ Invokes(testing.NewCreateActionWithOptions(httproutesResource, c.ns, hTTPRoute, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1beta1.HTTPRoute), err
}
// Update takes the representation of a hTTPRoute and updates it. Returns the server's representation of the hTTPRoute, and an error, if there is any.
func (c *FakeHTTPRoutes) Update(ctx context.Context, hTTPRoute *v1beta1.HTTPRoute, opts v1.UpdateOptions) (result *v1beta1.HTTPRoute, err error) {
+ emptyResult := &v1beta1.HTTPRoute{}
obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(httproutesResource, c.ns, hTTPRoute), &v1beta1.HTTPRoute{})
+ Invokes(testing.NewUpdateActionWithOptions(httproutesResource, c.ns, hTTPRoute, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1beta1.HTTPRoute), err
}
// UpdateStatus was generated because the type contains a Status member.
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-func (c *FakeHTTPRoutes) UpdateStatus(ctx context.Context, hTTPRoute *v1beta1.HTTPRoute, opts v1.UpdateOptions) (*v1beta1.HTTPRoute, error) {
+func (c *FakeHTTPRoutes) UpdateStatus(ctx context.Context, hTTPRoute *v1beta1.HTTPRoute, opts v1.UpdateOptions) (result *v1beta1.HTTPRoute, err error) {
+ emptyResult := &v1beta1.HTTPRoute{}
obj, err := c.Fake.
- Invokes(testing.NewUpdateSubresourceAction(httproutesResource, "status", c.ns, hTTPRoute), &v1beta1.HTTPRoute{})
+ Invokes(testing.NewUpdateSubresourceActionWithOptions(httproutesResource, "status", c.ns, hTTPRoute, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1beta1.HTTPRoute), err
}
@@ -126,7 +131,7 @@ func (c *FakeHTTPRoutes) Delete(ctx context.Context, name string, opts v1.Delete
// DeleteCollection deletes a collection of objects.
func (c *FakeHTTPRoutes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
- action := testing.NewDeleteCollectionAction(httproutesResource, c.ns, listOpts)
+ action := testing.NewDeleteCollectionActionWithOptions(httproutesResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1beta1.HTTPRouteList{})
return err
@@ -134,11 +139,12 @@ func (c *FakeHTTPRoutes) DeleteCollection(ctx context.Context, opts v1.DeleteOpt
// Patch applies the patch and returns the patched hTTPRoute.
func (c *FakeHTTPRoutes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.HTTPRoute, err error) {
+ emptyResult := &v1beta1.HTTPRoute{}
obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(httproutesResource, c.ns, name, pt, data, subresources...), &v1beta1.HTTPRoute{})
+ Invokes(testing.NewPatchSubresourceActionWithOptions(httproutesResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1beta1.HTTPRoute), err
}
@@ -156,11 +162,12 @@ func (c *FakeHTTPRoutes) Apply(ctx context.Context, hTTPRoute *apisv1beta1.HTTPR
if name == nil {
return nil, fmt.Errorf("hTTPRoute.Name must be provided to Apply")
}
+ emptyResult := &v1beta1.HTTPRoute{}
obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(httproutesResource, c.ns, *name, types.ApplyPatchType, data), &v1beta1.HTTPRoute{})
+ Invokes(testing.NewPatchSubresourceActionWithOptions(httproutesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1beta1.HTTPRoute), err
}
@@ -179,11 +186,12 @@ func (c *FakeHTTPRoutes) ApplyStatus(ctx context.Context, hTTPRoute *apisv1beta1
if name == nil {
return nil, fmt.Errorf("hTTPRoute.Name must be provided to Apply")
}
+ emptyResult := &v1beta1.HTTPRoute{}
obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(httproutesResource, c.ns, *name, types.ApplyPatchType, data, "status"), &v1beta1.HTTPRoute{})
+ Invokes(testing.NewPatchSubresourceActionWithOptions(httproutesResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1beta1.HTTPRoute), err
}
diff --git a/pkg/client/clientset/versioned/typed/apis/v1beta1/fake/fake_referencegrant.go b/pkg/client/clientset/versioned/typed/apis/v1beta1/fake/fake_referencegrant.go
index d6e31e827e..2f5daecf86 100644
--- a/pkg/client/clientset/versioned/typed/apis/v1beta1/fake/fake_referencegrant.go
+++ b/pkg/client/clientset/versioned/typed/apis/v1beta1/fake/fake_referencegrant.go
@@ -44,22 +44,24 @@ var referencegrantsKind = v1beta1.SchemeGroupVersion.WithKind("ReferenceGrant")
// Get takes name of the referenceGrant, and returns the corresponding referenceGrant object, and an error if there is any.
func (c *FakeReferenceGrants) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ReferenceGrant, err error) {
+ emptyResult := &v1beta1.ReferenceGrant{}
obj, err := c.Fake.
- Invokes(testing.NewGetAction(referencegrantsResource, c.ns, name), &v1beta1.ReferenceGrant{})
+ Invokes(testing.NewGetActionWithOptions(referencegrantsResource, c.ns, name, options), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1beta1.ReferenceGrant), err
}
// List takes label and field selectors, and returns the list of ReferenceGrants that match those selectors.
func (c *FakeReferenceGrants) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ReferenceGrantList, err error) {
+ emptyResult := &v1beta1.ReferenceGrantList{}
obj, err := c.Fake.
- Invokes(testing.NewListAction(referencegrantsResource, referencegrantsKind, c.ns, opts), &v1beta1.ReferenceGrantList{})
+ Invokes(testing.NewListActionWithOptions(referencegrantsResource, referencegrantsKind, c.ns, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
label, _, _ := testing.ExtractFromListOptions(opts)
@@ -78,28 +80,30 @@ func (c *FakeReferenceGrants) List(ctx context.Context, opts v1.ListOptions) (re
// Watch returns a watch.Interface that watches the requested referenceGrants.
func (c *FakeReferenceGrants) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
return c.Fake.
- InvokesWatch(testing.NewWatchAction(referencegrantsResource, c.ns, opts))
+ InvokesWatch(testing.NewWatchActionWithOptions(referencegrantsResource, c.ns, opts))
}
// Create takes the representation of a referenceGrant and creates it. Returns the server's representation of the referenceGrant, and an error, if there is any.
func (c *FakeReferenceGrants) Create(ctx context.Context, referenceGrant *v1beta1.ReferenceGrant, opts v1.CreateOptions) (result *v1beta1.ReferenceGrant, err error) {
+ emptyResult := &v1beta1.ReferenceGrant{}
obj, err := c.Fake.
- Invokes(testing.NewCreateAction(referencegrantsResource, c.ns, referenceGrant), &v1beta1.ReferenceGrant{})
+ Invokes(testing.NewCreateActionWithOptions(referencegrantsResource, c.ns, referenceGrant, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1beta1.ReferenceGrant), err
}
// Update takes the representation of a referenceGrant and updates it. Returns the server's representation of the referenceGrant, and an error, if there is any.
func (c *FakeReferenceGrants) Update(ctx context.Context, referenceGrant *v1beta1.ReferenceGrant, opts v1.UpdateOptions) (result *v1beta1.ReferenceGrant, err error) {
+ emptyResult := &v1beta1.ReferenceGrant{}
obj, err := c.Fake.
- Invokes(testing.NewUpdateAction(referencegrantsResource, c.ns, referenceGrant), &v1beta1.ReferenceGrant{})
+ Invokes(testing.NewUpdateActionWithOptions(referencegrantsResource, c.ns, referenceGrant, opts), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1beta1.ReferenceGrant), err
}
@@ -114,7 +118,7 @@ func (c *FakeReferenceGrants) Delete(ctx context.Context, name string, opts v1.D
// DeleteCollection deletes a collection of objects.
func (c *FakeReferenceGrants) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
- action := testing.NewDeleteCollectionAction(referencegrantsResource, c.ns, listOpts)
+ action := testing.NewDeleteCollectionActionWithOptions(referencegrantsResource, c.ns, opts, listOpts)
_, err := c.Fake.Invokes(action, &v1beta1.ReferenceGrantList{})
return err
@@ -122,11 +126,12 @@ func (c *FakeReferenceGrants) DeleteCollection(ctx context.Context, opts v1.Dele
// Patch applies the patch and returns the patched referenceGrant.
func (c *FakeReferenceGrants) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ReferenceGrant, err error) {
+ emptyResult := &v1beta1.ReferenceGrant{}
obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(referencegrantsResource, c.ns, name, pt, data, subresources...), &v1beta1.ReferenceGrant{})
+ Invokes(testing.NewPatchSubresourceActionWithOptions(referencegrantsResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1beta1.ReferenceGrant), err
}
@@ -144,11 +149,12 @@ func (c *FakeReferenceGrants) Apply(ctx context.Context, referenceGrant *apisv1b
if name == nil {
return nil, fmt.Errorf("referenceGrant.Name must be provided to Apply")
}
+ emptyResult := &v1beta1.ReferenceGrant{}
obj, err := c.Fake.
- Invokes(testing.NewPatchSubresourceAction(referencegrantsResource, c.ns, *name, types.ApplyPatchType, data), &v1beta1.ReferenceGrant{})
+ Invokes(testing.NewPatchSubresourceActionWithOptions(referencegrantsResource, c.ns, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult)
if obj == nil {
- return nil, err
+ return emptyResult, err
}
return obj.(*v1beta1.ReferenceGrant), err
}
diff --git a/pkg/client/clientset/versioned/typed/apis/v1beta1/gateway.go b/pkg/client/clientset/versioned/typed/apis/v1beta1/gateway.go
index ad54bccd57..6ed67c9955 100644
--- a/pkg/client/clientset/versioned/typed/apis/v1beta1/gateway.go
+++ b/pkg/client/clientset/versioned/typed/apis/v1beta1/gateway.go
@@ -20,14 +20,11 @@ package v1beta1
import (
"context"
- json "encoding/json"
- "fmt"
- "time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
- rest "k8s.io/client-go/rest"
+ gentype "k8s.io/client-go/gentype"
apisv1beta1 "sigs.k8s.io/gateway-api/apis/applyconfiguration/apis/v1beta1"
v1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1"
scheme "sigs.k8s.io/gateway-api/pkg/client/clientset/versioned/scheme"
@@ -43,6 +40,7 @@ type GatewaysGetter interface {
type GatewayInterface interface {
Create(ctx context.Context, gateway *v1beta1.Gateway, opts v1.CreateOptions) (*v1beta1.Gateway, error)
Update(ctx context.Context, gateway *v1beta1.Gateway, opts v1.UpdateOptions) (*v1beta1.Gateway, error)
+ // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, gateway *v1beta1.Gateway, opts v1.UpdateOptions) (*v1beta1.Gateway, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
@@ -51,206 +49,25 @@ type GatewayInterface interface {
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Gateway, err error)
Apply(ctx context.Context, gateway *apisv1beta1.GatewayApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Gateway, err error)
+ // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
ApplyStatus(ctx context.Context, gateway *apisv1beta1.GatewayApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Gateway, err error)
GatewayExpansion
}
// gateways implements GatewayInterface
type gateways struct {
- client rest.Interface
- ns string
+ *gentype.ClientWithListAndApply[*v1beta1.Gateway, *v1beta1.GatewayList, *apisv1beta1.GatewayApplyConfiguration]
}
// newGateways returns a Gateways
func newGateways(c *GatewayV1beta1Client, namespace string) *gateways {
return &gateways{
- client: c.RESTClient(),
- ns: namespace,
+ gentype.NewClientWithListAndApply[*v1beta1.Gateway, *v1beta1.GatewayList, *apisv1beta1.GatewayApplyConfiguration](
+ "gateways",
+ c.RESTClient(),
+ scheme.ParameterCodec,
+ namespace,
+ func() *v1beta1.Gateway { return &v1beta1.Gateway{} },
+ func() *v1beta1.GatewayList { return &v1beta1.GatewayList{} }),
}
}
-
-// Get takes name of the gateway, and returns the corresponding gateway object, and an error if there is any.
-func (c *gateways) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Gateway, err error) {
- result = &v1beta1.Gateway{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("gateways").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do(ctx).
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of Gateways that match those selectors.
-func (c *gateways) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.GatewayList, err error) {
- var timeout time.Duration
- if opts.TimeoutSeconds != nil {
- timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
- }
- result = &v1beta1.GatewayList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("gateways").
- VersionedParams(&opts, scheme.ParameterCodec).
- Timeout(timeout).
- Do(ctx).
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested gateways.
-func (c *gateways) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
- var timeout time.Duration
- if opts.TimeoutSeconds != nil {
- timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
- }
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("gateways").
- VersionedParams(&opts, scheme.ParameterCodec).
- Timeout(timeout).
- Watch(ctx)
-}
-
-// Create takes the representation of a gateway and creates it. Returns the server's representation of the gateway, and an error, if there is any.
-func (c *gateways) Create(ctx context.Context, gateway *v1beta1.Gateway, opts v1.CreateOptions) (result *v1beta1.Gateway, err error) {
- result = &v1beta1.Gateway{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("gateways").
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(gateway).
- Do(ctx).
- Into(result)
- return
-}
-
-// Update takes the representation of a gateway and updates it. Returns the server's representation of the gateway, and an error, if there is any.
-func (c *gateways) Update(ctx context.Context, gateway *v1beta1.Gateway, opts v1.UpdateOptions) (result *v1beta1.Gateway, err error) {
- result = &v1beta1.Gateway{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("gateways").
- Name(gateway.Name).
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(gateway).
- Do(ctx).
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-func (c *gateways) UpdateStatus(ctx context.Context, gateway *v1beta1.Gateway, opts v1.UpdateOptions) (result *v1beta1.Gateway, err error) {
- result = &v1beta1.Gateway{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("gateways").
- Name(gateway.Name).
- SubResource("status").
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(gateway).
- Do(ctx).
- Into(result)
- return
-}
-
-// Delete takes name of the gateway and deletes it. Returns an error if one occurs.
-func (c *gateways) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("gateways").
- Name(name).
- Body(&opts).
- Do(ctx).
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *gateways) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
- var timeout time.Duration
- if listOpts.TimeoutSeconds != nil {
- timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
- }
- return c.client.Delete().
- Namespace(c.ns).
- Resource("gateways").
- VersionedParams(&listOpts, scheme.ParameterCodec).
- Timeout(timeout).
- Body(&opts).
- Do(ctx).
- Error()
-}
-
-// Patch applies the patch and returns the patched gateway.
-func (c *gateways) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Gateway, err error) {
- result = &v1beta1.Gateway{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("gateways").
- Name(name).
- SubResource(subresources...).
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
-
-// Apply takes the given apply declarative configuration, applies it and returns the applied gateway.
-func (c *gateways) Apply(ctx context.Context, gateway *apisv1beta1.GatewayApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Gateway, err error) {
- if gateway == nil {
- return nil, fmt.Errorf("gateway provided to Apply must not be nil")
- }
- patchOpts := opts.ToPatchOptions()
- data, err := json.Marshal(gateway)
- if err != nil {
- return nil, err
- }
- name := gateway.Name
- if name == nil {
- return nil, fmt.Errorf("gateway.Name must be provided to Apply")
- }
- result = &v1beta1.Gateway{}
- err = c.client.Patch(types.ApplyPatchType).
- Namespace(c.ns).
- Resource("gateways").
- Name(*name).
- VersionedParams(&patchOpts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
-
-// ApplyStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
-func (c *gateways) ApplyStatus(ctx context.Context, gateway *apisv1beta1.GatewayApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.Gateway, err error) {
- if gateway == nil {
- return nil, fmt.Errorf("gateway provided to Apply must not be nil")
- }
- patchOpts := opts.ToPatchOptions()
- data, err := json.Marshal(gateway)
- if err != nil {
- return nil, err
- }
-
- name := gateway.Name
- if name == nil {
- return nil, fmt.Errorf("gateway.Name must be provided to Apply")
- }
-
- result = &v1beta1.Gateway{}
- err = c.client.Patch(types.ApplyPatchType).
- Namespace(c.ns).
- Resource("gateways").
- Name(*name).
- SubResource("status").
- VersionedParams(&patchOpts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
diff --git a/pkg/client/clientset/versioned/typed/apis/v1beta1/gatewayclass.go b/pkg/client/clientset/versioned/typed/apis/v1beta1/gatewayclass.go
index 45bd5fcad0..f54b1e49be 100644
--- a/pkg/client/clientset/versioned/typed/apis/v1beta1/gatewayclass.go
+++ b/pkg/client/clientset/versioned/typed/apis/v1beta1/gatewayclass.go
@@ -20,14 +20,11 @@ package v1beta1
import (
"context"
- json "encoding/json"
- "fmt"
- "time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
- rest "k8s.io/client-go/rest"
+ gentype "k8s.io/client-go/gentype"
apisv1beta1 "sigs.k8s.io/gateway-api/apis/applyconfiguration/apis/v1beta1"
v1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1"
scheme "sigs.k8s.io/gateway-api/pkg/client/clientset/versioned/scheme"
@@ -43,6 +40,7 @@ type GatewayClassesGetter interface {
type GatewayClassInterface interface {
Create(ctx context.Context, gatewayClass *v1beta1.GatewayClass, opts v1.CreateOptions) (*v1beta1.GatewayClass, error)
Update(ctx context.Context, gatewayClass *v1beta1.GatewayClass, opts v1.UpdateOptions) (*v1beta1.GatewayClass, error)
+ // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, gatewayClass *v1beta1.GatewayClass, opts v1.UpdateOptions) (*v1beta1.GatewayClass, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
@@ -51,193 +49,25 @@ type GatewayClassInterface interface {
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.GatewayClass, err error)
Apply(ctx context.Context, gatewayClass *apisv1beta1.GatewayClassApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.GatewayClass, err error)
+ // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
ApplyStatus(ctx context.Context, gatewayClass *apisv1beta1.GatewayClassApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.GatewayClass, err error)
GatewayClassExpansion
}
// gatewayClasses implements GatewayClassInterface
type gatewayClasses struct {
- client rest.Interface
+ *gentype.ClientWithListAndApply[*v1beta1.GatewayClass, *v1beta1.GatewayClassList, *apisv1beta1.GatewayClassApplyConfiguration]
}
// newGatewayClasses returns a GatewayClasses
func newGatewayClasses(c *GatewayV1beta1Client) *gatewayClasses {
return &gatewayClasses{
- client: c.RESTClient(),
+ gentype.NewClientWithListAndApply[*v1beta1.GatewayClass, *v1beta1.GatewayClassList, *apisv1beta1.GatewayClassApplyConfiguration](
+ "gatewayclasses",
+ c.RESTClient(),
+ scheme.ParameterCodec,
+ "",
+ func() *v1beta1.GatewayClass { return &v1beta1.GatewayClass{} },
+ func() *v1beta1.GatewayClassList { return &v1beta1.GatewayClassList{} }),
}
}
-
-// Get takes name of the gatewayClass, and returns the corresponding gatewayClass object, and an error if there is any.
-func (c *gatewayClasses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.GatewayClass, err error) {
- result = &v1beta1.GatewayClass{}
- err = c.client.Get().
- Resource("gatewayclasses").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do(ctx).
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of GatewayClasses that match those selectors.
-func (c *gatewayClasses) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.GatewayClassList, err error) {
- var timeout time.Duration
- if opts.TimeoutSeconds != nil {
- timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
- }
- result = &v1beta1.GatewayClassList{}
- err = c.client.Get().
- Resource("gatewayclasses").
- VersionedParams(&opts, scheme.ParameterCodec).
- Timeout(timeout).
- Do(ctx).
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested gatewayClasses.
-func (c *gatewayClasses) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
- var timeout time.Duration
- if opts.TimeoutSeconds != nil {
- timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
- }
- opts.Watch = true
- return c.client.Get().
- Resource("gatewayclasses").
- VersionedParams(&opts, scheme.ParameterCodec).
- Timeout(timeout).
- Watch(ctx)
-}
-
-// Create takes the representation of a gatewayClass and creates it. Returns the server's representation of the gatewayClass, and an error, if there is any.
-func (c *gatewayClasses) Create(ctx context.Context, gatewayClass *v1beta1.GatewayClass, opts v1.CreateOptions) (result *v1beta1.GatewayClass, err error) {
- result = &v1beta1.GatewayClass{}
- err = c.client.Post().
- Resource("gatewayclasses").
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(gatewayClass).
- Do(ctx).
- Into(result)
- return
-}
-
-// Update takes the representation of a gatewayClass and updates it. Returns the server's representation of the gatewayClass, and an error, if there is any.
-func (c *gatewayClasses) Update(ctx context.Context, gatewayClass *v1beta1.GatewayClass, opts v1.UpdateOptions) (result *v1beta1.GatewayClass, err error) {
- result = &v1beta1.GatewayClass{}
- err = c.client.Put().
- Resource("gatewayclasses").
- Name(gatewayClass.Name).
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(gatewayClass).
- Do(ctx).
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-func (c *gatewayClasses) UpdateStatus(ctx context.Context, gatewayClass *v1beta1.GatewayClass, opts v1.UpdateOptions) (result *v1beta1.GatewayClass, err error) {
- result = &v1beta1.GatewayClass{}
- err = c.client.Put().
- Resource("gatewayclasses").
- Name(gatewayClass.Name).
- SubResource("status").
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(gatewayClass).
- Do(ctx).
- Into(result)
- return
-}
-
-// Delete takes name of the gatewayClass and deletes it. Returns an error if one occurs.
-func (c *gatewayClasses) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
- return c.client.Delete().
- Resource("gatewayclasses").
- Name(name).
- Body(&opts).
- Do(ctx).
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *gatewayClasses) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
- var timeout time.Duration
- if listOpts.TimeoutSeconds != nil {
- timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
- }
- return c.client.Delete().
- Resource("gatewayclasses").
- VersionedParams(&listOpts, scheme.ParameterCodec).
- Timeout(timeout).
- Body(&opts).
- Do(ctx).
- Error()
-}
-
-// Patch applies the patch and returns the patched gatewayClass.
-func (c *gatewayClasses) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.GatewayClass, err error) {
- result = &v1beta1.GatewayClass{}
- err = c.client.Patch(pt).
- Resource("gatewayclasses").
- Name(name).
- SubResource(subresources...).
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
-
-// Apply takes the given apply declarative configuration, applies it and returns the applied gatewayClass.
-func (c *gatewayClasses) Apply(ctx context.Context, gatewayClass *apisv1beta1.GatewayClassApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.GatewayClass, err error) {
- if gatewayClass == nil {
- return nil, fmt.Errorf("gatewayClass provided to Apply must not be nil")
- }
- patchOpts := opts.ToPatchOptions()
- data, err := json.Marshal(gatewayClass)
- if err != nil {
- return nil, err
- }
- name := gatewayClass.Name
- if name == nil {
- return nil, fmt.Errorf("gatewayClass.Name must be provided to Apply")
- }
- result = &v1beta1.GatewayClass{}
- err = c.client.Patch(types.ApplyPatchType).
- Resource("gatewayclasses").
- Name(*name).
- VersionedParams(&patchOpts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
-
-// ApplyStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
-func (c *gatewayClasses) ApplyStatus(ctx context.Context, gatewayClass *apisv1beta1.GatewayClassApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.GatewayClass, err error) {
- if gatewayClass == nil {
- return nil, fmt.Errorf("gatewayClass provided to Apply must not be nil")
- }
- patchOpts := opts.ToPatchOptions()
- data, err := json.Marshal(gatewayClass)
- if err != nil {
- return nil, err
- }
-
- name := gatewayClass.Name
- if name == nil {
- return nil, fmt.Errorf("gatewayClass.Name must be provided to Apply")
- }
-
- result = &v1beta1.GatewayClass{}
- err = c.client.Patch(types.ApplyPatchType).
- Resource("gatewayclasses").
- Name(*name).
- SubResource("status").
- VersionedParams(&patchOpts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
diff --git a/pkg/client/clientset/versioned/typed/apis/v1beta1/httproute.go b/pkg/client/clientset/versioned/typed/apis/v1beta1/httproute.go
index a85262dca2..884a3d6108 100644
--- a/pkg/client/clientset/versioned/typed/apis/v1beta1/httproute.go
+++ b/pkg/client/clientset/versioned/typed/apis/v1beta1/httproute.go
@@ -20,14 +20,11 @@ package v1beta1
import (
"context"
- json "encoding/json"
- "fmt"
- "time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
- rest "k8s.io/client-go/rest"
+ gentype "k8s.io/client-go/gentype"
apisv1beta1 "sigs.k8s.io/gateway-api/apis/applyconfiguration/apis/v1beta1"
v1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1"
scheme "sigs.k8s.io/gateway-api/pkg/client/clientset/versioned/scheme"
@@ -43,6 +40,7 @@ type HTTPRoutesGetter interface {
type HTTPRouteInterface interface {
Create(ctx context.Context, hTTPRoute *v1beta1.HTTPRoute, opts v1.CreateOptions) (*v1beta1.HTTPRoute, error)
Update(ctx context.Context, hTTPRoute *v1beta1.HTTPRoute, opts v1.UpdateOptions) (*v1beta1.HTTPRoute, error)
+ // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
UpdateStatus(ctx context.Context, hTTPRoute *v1beta1.HTTPRoute, opts v1.UpdateOptions) (*v1beta1.HTTPRoute, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
@@ -51,206 +49,25 @@ type HTTPRouteInterface interface {
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.HTTPRoute, err error)
Apply(ctx context.Context, hTTPRoute *apisv1beta1.HTTPRouteApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.HTTPRoute, err error)
+ // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
ApplyStatus(ctx context.Context, hTTPRoute *apisv1beta1.HTTPRouteApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.HTTPRoute, err error)
HTTPRouteExpansion
}
// hTTPRoutes implements HTTPRouteInterface
type hTTPRoutes struct {
- client rest.Interface
- ns string
+ *gentype.ClientWithListAndApply[*v1beta1.HTTPRoute, *v1beta1.HTTPRouteList, *apisv1beta1.HTTPRouteApplyConfiguration]
}
// newHTTPRoutes returns a HTTPRoutes
func newHTTPRoutes(c *GatewayV1beta1Client, namespace string) *hTTPRoutes {
return &hTTPRoutes{
- client: c.RESTClient(),
- ns: namespace,
+ gentype.NewClientWithListAndApply[*v1beta1.HTTPRoute, *v1beta1.HTTPRouteList, *apisv1beta1.HTTPRouteApplyConfiguration](
+ "httproutes",
+ c.RESTClient(),
+ scheme.ParameterCodec,
+ namespace,
+ func() *v1beta1.HTTPRoute { return &v1beta1.HTTPRoute{} },
+ func() *v1beta1.HTTPRouteList { return &v1beta1.HTTPRouteList{} }),
}
}
-
-// Get takes name of the hTTPRoute, and returns the corresponding hTTPRoute object, and an error if there is any.
-func (c *hTTPRoutes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.HTTPRoute, err error) {
- result = &v1beta1.HTTPRoute{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("httproutes").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do(ctx).
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of HTTPRoutes that match those selectors.
-func (c *hTTPRoutes) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.HTTPRouteList, err error) {
- var timeout time.Duration
- if opts.TimeoutSeconds != nil {
- timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
- }
- result = &v1beta1.HTTPRouteList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("httproutes").
- VersionedParams(&opts, scheme.ParameterCodec).
- Timeout(timeout).
- Do(ctx).
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested hTTPRoutes.
-func (c *hTTPRoutes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
- var timeout time.Duration
- if opts.TimeoutSeconds != nil {
- timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
- }
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("httproutes").
- VersionedParams(&opts, scheme.ParameterCodec).
- Timeout(timeout).
- Watch(ctx)
-}
-
-// Create takes the representation of a hTTPRoute and creates it. Returns the server's representation of the hTTPRoute, and an error, if there is any.
-func (c *hTTPRoutes) Create(ctx context.Context, hTTPRoute *v1beta1.HTTPRoute, opts v1.CreateOptions) (result *v1beta1.HTTPRoute, err error) {
- result = &v1beta1.HTTPRoute{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("httproutes").
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(hTTPRoute).
- Do(ctx).
- Into(result)
- return
-}
-
-// Update takes the representation of a hTTPRoute and updates it. Returns the server's representation of the hTTPRoute, and an error, if there is any.
-func (c *hTTPRoutes) Update(ctx context.Context, hTTPRoute *v1beta1.HTTPRoute, opts v1.UpdateOptions) (result *v1beta1.HTTPRoute, err error) {
- result = &v1beta1.HTTPRoute{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("httproutes").
- Name(hTTPRoute.Name).
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(hTTPRoute).
- Do(ctx).
- Into(result)
- return
-}
-
-// UpdateStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
-func (c *hTTPRoutes) UpdateStatus(ctx context.Context, hTTPRoute *v1beta1.HTTPRoute, opts v1.UpdateOptions) (result *v1beta1.HTTPRoute, err error) {
- result = &v1beta1.HTTPRoute{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("httproutes").
- Name(hTTPRoute.Name).
- SubResource("status").
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(hTTPRoute).
- Do(ctx).
- Into(result)
- return
-}
-
-// Delete takes name of the hTTPRoute and deletes it. Returns an error if one occurs.
-func (c *hTTPRoutes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("httproutes").
- Name(name).
- Body(&opts).
- Do(ctx).
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *hTTPRoutes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
- var timeout time.Duration
- if listOpts.TimeoutSeconds != nil {
- timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
- }
- return c.client.Delete().
- Namespace(c.ns).
- Resource("httproutes").
- VersionedParams(&listOpts, scheme.ParameterCodec).
- Timeout(timeout).
- Body(&opts).
- Do(ctx).
- Error()
-}
-
-// Patch applies the patch and returns the patched hTTPRoute.
-func (c *hTTPRoutes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.HTTPRoute, err error) {
- result = &v1beta1.HTTPRoute{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("httproutes").
- Name(name).
- SubResource(subresources...).
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
-
-// Apply takes the given apply declarative configuration, applies it and returns the applied hTTPRoute.
-func (c *hTTPRoutes) Apply(ctx context.Context, hTTPRoute *apisv1beta1.HTTPRouteApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.HTTPRoute, err error) {
- if hTTPRoute == nil {
- return nil, fmt.Errorf("hTTPRoute provided to Apply must not be nil")
- }
- patchOpts := opts.ToPatchOptions()
- data, err := json.Marshal(hTTPRoute)
- if err != nil {
- return nil, err
- }
- name := hTTPRoute.Name
- if name == nil {
- return nil, fmt.Errorf("hTTPRoute.Name must be provided to Apply")
- }
- result = &v1beta1.HTTPRoute{}
- err = c.client.Patch(types.ApplyPatchType).
- Namespace(c.ns).
- Resource("httproutes").
- Name(*name).
- VersionedParams(&patchOpts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
-
-// ApplyStatus was generated because the type contains a Status member.
-// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
-func (c *hTTPRoutes) ApplyStatus(ctx context.Context, hTTPRoute *apisv1beta1.HTTPRouteApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.HTTPRoute, err error) {
- if hTTPRoute == nil {
- return nil, fmt.Errorf("hTTPRoute provided to Apply must not be nil")
- }
- patchOpts := opts.ToPatchOptions()
- data, err := json.Marshal(hTTPRoute)
- if err != nil {
- return nil, err
- }
-
- name := hTTPRoute.Name
- if name == nil {
- return nil, fmt.Errorf("hTTPRoute.Name must be provided to Apply")
- }
-
- result = &v1beta1.HTTPRoute{}
- err = c.client.Patch(types.ApplyPatchType).
- Namespace(c.ns).
- Resource("httproutes").
- Name(*name).
- SubResource("status").
- VersionedParams(&patchOpts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
diff --git a/pkg/client/clientset/versioned/typed/apis/v1beta1/referencegrant.go b/pkg/client/clientset/versioned/typed/apis/v1beta1/referencegrant.go
index 575bbd4c05..992727e305 100644
--- a/pkg/client/clientset/versioned/typed/apis/v1beta1/referencegrant.go
+++ b/pkg/client/clientset/versioned/typed/apis/v1beta1/referencegrant.go
@@ -20,14 +20,11 @@ package v1beta1
import (
"context"
- json "encoding/json"
- "fmt"
- "time"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
- rest "k8s.io/client-go/rest"
+ gentype "k8s.io/client-go/gentype"
apisv1beta1 "sigs.k8s.io/gateway-api/apis/applyconfiguration/apis/v1beta1"
v1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1"
scheme "sigs.k8s.io/gateway-api/pkg/client/clientset/versioned/scheme"
@@ -55,154 +52,18 @@ type ReferenceGrantInterface interface {
// referenceGrants implements ReferenceGrantInterface
type referenceGrants struct {
- client rest.Interface
- ns string
+ *gentype.ClientWithListAndApply[*v1beta1.ReferenceGrant, *v1beta1.ReferenceGrantList, *apisv1beta1.ReferenceGrantApplyConfiguration]
}
// newReferenceGrants returns a ReferenceGrants
func newReferenceGrants(c *GatewayV1beta1Client, namespace string) *referenceGrants {
return &referenceGrants{
- client: c.RESTClient(),
- ns: namespace,
+ gentype.NewClientWithListAndApply[*v1beta1.ReferenceGrant, *v1beta1.ReferenceGrantList, *apisv1beta1.ReferenceGrantApplyConfiguration](
+ "referencegrants",
+ c.RESTClient(),
+ scheme.ParameterCodec,
+ namespace,
+ func() *v1beta1.ReferenceGrant { return &v1beta1.ReferenceGrant{} },
+ func() *v1beta1.ReferenceGrantList { return &v1beta1.ReferenceGrantList{} }),
}
}
-
-// Get takes name of the referenceGrant, and returns the corresponding referenceGrant object, and an error if there is any.
-func (c *referenceGrants) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.ReferenceGrant, err error) {
- result = &v1beta1.ReferenceGrant{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("referencegrants").
- Name(name).
- VersionedParams(&options, scheme.ParameterCodec).
- Do(ctx).
- Into(result)
- return
-}
-
-// List takes label and field selectors, and returns the list of ReferenceGrants that match those selectors.
-func (c *referenceGrants) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.ReferenceGrantList, err error) {
- var timeout time.Duration
- if opts.TimeoutSeconds != nil {
- timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
- }
- result = &v1beta1.ReferenceGrantList{}
- err = c.client.Get().
- Namespace(c.ns).
- Resource("referencegrants").
- VersionedParams(&opts, scheme.ParameterCodec).
- Timeout(timeout).
- Do(ctx).
- Into(result)
- return
-}
-
-// Watch returns a watch.Interface that watches the requested referenceGrants.
-func (c *referenceGrants) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
- var timeout time.Duration
- if opts.TimeoutSeconds != nil {
- timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
- }
- opts.Watch = true
- return c.client.Get().
- Namespace(c.ns).
- Resource("referencegrants").
- VersionedParams(&opts, scheme.ParameterCodec).
- Timeout(timeout).
- Watch(ctx)
-}
-
-// Create takes the representation of a referenceGrant and creates it. Returns the server's representation of the referenceGrant, and an error, if there is any.
-func (c *referenceGrants) Create(ctx context.Context, referenceGrant *v1beta1.ReferenceGrant, opts v1.CreateOptions) (result *v1beta1.ReferenceGrant, err error) {
- result = &v1beta1.ReferenceGrant{}
- err = c.client.Post().
- Namespace(c.ns).
- Resource("referencegrants").
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(referenceGrant).
- Do(ctx).
- Into(result)
- return
-}
-
-// Update takes the representation of a referenceGrant and updates it. Returns the server's representation of the referenceGrant, and an error, if there is any.
-func (c *referenceGrants) Update(ctx context.Context, referenceGrant *v1beta1.ReferenceGrant, opts v1.UpdateOptions) (result *v1beta1.ReferenceGrant, err error) {
- result = &v1beta1.ReferenceGrant{}
- err = c.client.Put().
- Namespace(c.ns).
- Resource("referencegrants").
- Name(referenceGrant.Name).
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(referenceGrant).
- Do(ctx).
- Into(result)
- return
-}
-
-// Delete takes name of the referenceGrant and deletes it. Returns an error if one occurs.
-func (c *referenceGrants) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
- return c.client.Delete().
- Namespace(c.ns).
- Resource("referencegrants").
- Name(name).
- Body(&opts).
- Do(ctx).
- Error()
-}
-
-// DeleteCollection deletes a collection of objects.
-func (c *referenceGrants) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
- var timeout time.Duration
- if listOpts.TimeoutSeconds != nil {
- timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
- }
- return c.client.Delete().
- Namespace(c.ns).
- Resource("referencegrants").
- VersionedParams(&listOpts, scheme.ParameterCodec).
- Timeout(timeout).
- Body(&opts).
- Do(ctx).
- Error()
-}
-
-// Patch applies the patch and returns the patched referenceGrant.
-func (c *referenceGrants) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.ReferenceGrant, err error) {
- result = &v1beta1.ReferenceGrant{}
- err = c.client.Patch(pt).
- Namespace(c.ns).
- Resource("referencegrants").
- Name(name).
- SubResource(subresources...).
- VersionedParams(&opts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
-
-// Apply takes the given apply declarative configuration, applies it and returns the applied referenceGrant.
-func (c *referenceGrants) Apply(ctx context.Context, referenceGrant *apisv1beta1.ReferenceGrantApplyConfiguration, opts v1.ApplyOptions) (result *v1beta1.ReferenceGrant, err error) {
- if referenceGrant == nil {
- return nil, fmt.Errorf("referenceGrant provided to Apply must not be nil")
- }
- patchOpts := opts.ToPatchOptions()
- data, err := json.Marshal(referenceGrant)
- if err != nil {
- return nil, err
- }
- name := referenceGrant.Name
- if name == nil {
- return nil, fmt.Errorf("referenceGrant.Name must be provided to Apply")
- }
- result = &v1beta1.ReferenceGrant{}
- err = c.client.Patch(types.ApplyPatchType).
- Namespace(c.ns).
- Resource("referencegrants").
- Name(*name).
- VersionedParams(&patchOpts, scheme.ParameterCodec).
- Body(data).
- Do(ctx).
- Into(result)
- return
-}
diff --git a/pkg/client/informers/externalversions/factory.go b/pkg/client/informers/externalversions/factory.go
index e7f08e89f1..0f5f0550c8 100644
--- a/pkg/client/informers/externalversions/factory.go
+++ b/pkg/client/informers/externalversions/factory.go
@@ -228,6 +228,7 @@ type SharedInformerFactory interface {
// Start initializes all requested informers. They are handled in goroutines
// which run until the stop channel gets closed.
+ // Warning: Start does not block. When run in a go-routine, it will race with a later WaitForCacheSync.
Start(stopCh <-chan struct{})
// Shutdown marks a factory as shutting down. At that point no new
diff --git a/pkg/client/listers/apis/v1/gateway.go b/pkg/client/listers/apis/v1/gateway.go
index 82a886c86c..a709b86266 100644
--- a/pkg/client/listers/apis/v1/gateway.go
+++ b/pkg/client/listers/apis/v1/gateway.go
@@ -19,8 +19,8 @@ limitations under the License.
package v1
import (
- "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
+ "k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
@@ -38,25 +38,17 @@ type GatewayLister interface {
// gatewayLister implements the GatewayLister interface.
type gatewayLister struct {
- indexer cache.Indexer
+ listers.ResourceIndexer[*v1.Gateway]
}
// NewGatewayLister returns a new GatewayLister.
func NewGatewayLister(indexer cache.Indexer) GatewayLister {
- return &gatewayLister{indexer: indexer}
-}
-
-// List lists all Gateways in the indexer.
-func (s *gatewayLister) List(selector labels.Selector) (ret []*v1.Gateway, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.Gateway))
- })
- return ret, err
+ return &gatewayLister{listers.New[*v1.Gateway](indexer, v1.Resource("gateway"))}
}
// Gateways returns an object that can list and get Gateways.
func (s *gatewayLister) Gateways(namespace string) GatewayNamespaceLister {
- return gatewayNamespaceLister{indexer: s.indexer, namespace: namespace}
+ return gatewayNamespaceLister{listers.NewNamespaced[*v1.Gateway](s.ResourceIndexer, namespace)}
}
// GatewayNamespaceLister helps list and get Gateways.
@@ -74,26 +66,5 @@ type GatewayNamespaceLister interface {
// gatewayNamespaceLister implements the GatewayNamespaceLister
// interface.
type gatewayNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all Gateways in the indexer for a given namespace.
-func (s gatewayNamespaceLister) List(selector labels.Selector) (ret []*v1.Gateway, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.Gateway))
- })
- return ret, err
-}
-
-// Get retrieves the Gateway from the indexer for a given namespace and name.
-func (s gatewayNamespaceLister) Get(name string) (*v1.Gateway, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1.Resource("gateway"), name)
- }
- return obj.(*v1.Gateway), nil
+ listers.ResourceIndexer[*v1.Gateway]
}
diff --git a/pkg/client/listers/apis/v1/gatewayclass.go b/pkg/client/listers/apis/v1/gatewayclass.go
index e3ddf47e27..477e91983d 100644
--- a/pkg/client/listers/apis/v1/gatewayclass.go
+++ b/pkg/client/listers/apis/v1/gatewayclass.go
@@ -19,8 +19,8 @@ limitations under the License.
package v1
import (
- "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
+ "k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
@@ -39,30 +39,10 @@ type GatewayClassLister interface {
// gatewayClassLister implements the GatewayClassLister interface.
type gatewayClassLister struct {
- indexer cache.Indexer
+ listers.ResourceIndexer[*v1.GatewayClass]
}
// NewGatewayClassLister returns a new GatewayClassLister.
func NewGatewayClassLister(indexer cache.Indexer) GatewayClassLister {
- return &gatewayClassLister{indexer: indexer}
-}
-
-// List lists all GatewayClasses in the indexer.
-func (s *gatewayClassLister) List(selector labels.Selector) (ret []*v1.GatewayClass, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.GatewayClass))
- })
- return ret, err
-}
-
-// Get retrieves the GatewayClass from the index for a given name.
-func (s *gatewayClassLister) Get(name string) (*v1.GatewayClass, error) {
- obj, exists, err := s.indexer.GetByKey(name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1.Resource("gatewayclass"), name)
- }
- return obj.(*v1.GatewayClass), nil
+ return &gatewayClassLister{listers.New[*v1.GatewayClass](indexer, v1.Resource("gatewayclass"))}
}
diff --git a/pkg/client/listers/apis/v1/grpcroute.go b/pkg/client/listers/apis/v1/grpcroute.go
index 5859b59a10..0409c9a402 100644
--- a/pkg/client/listers/apis/v1/grpcroute.go
+++ b/pkg/client/listers/apis/v1/grpcroute.go
@@ -19,8 +19,8 @@ limitations under the License.
package v1
import (
- "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
+ "k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
@@ -38,25 +38,17 @@ type GRPCRouteLister interface {
// gRPCRouteLister implements the GRPCRouteLister interface.
type gRPCRouteLister struct {
- indexer cache.Indexer
+ listers.ResourceIndexer[*v1.GRPCRoute]
}
// NewGRPCRouteLister returns a new GRPCRouteLister.
func NewGRPCRouteLister(indexer cache.Indexer) GRPCRouteLister {
- return &gRPCRouteLister{indexer: indexer}
-}
-
-// List lists all GRPCRoutes in the indexer.
-func (s *gRPCRouteLister) List(selector labels.Selector) (ret []*v1.GRPCRoute, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.GRPCRoute))
- })
- return ret, err
+ return &gRPCRouteLister{listers.New[*v1.GRPCRoute](indexer, v1.Resource("grpcroute"))}
}
// GRPCRoutes returns an object that can list and get GRPCRoutes.
func (s *gRPCRouteLister) GRPCRoutes(namespace string) GRPCRouteNamespaceLister {
- return gRPCRouteNamespaceLister{indexer: s.indexer, namespace: namespace}
+ return gRPCRouteNamespaceLister{listers.NewNamespaced[*v1.GRPCRoute](s.ResourceIndexer, namespace)}
}
// GRPCRouteNamespaceLister helps list and get GRPCRoutes.
@@ -74,26 +66,5 @@ type GRPCRouteNamespaceLister interface {
// gRPCRouteNamespaceLister implements the GRPCRouteNamespaceLister
// interface.
type gRPCRouteNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all GRPCRoutes in the indexer for a given namespace.
-func (s gRPCRouteNamespaceLister) List(selector labels.Selector) (ret []*v1.GRPCRoute, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.GRPCRoute))
- })
- return ret, err
-}
-
-// Get retrieves the GRPCRoute from the indexer for a given namespace and name.
-func (s gRPCRouteNamespaceLister) Get(name string) (*v1.GRPCRoute, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1.Resource("grpcroute"), name)
- }
- return obj.(*v1.GRPCRoute), nil
+ listers.ResourceIndexer[*v1.GRPCRoute]
}
diff --git a/pkg/client/listers/apis/v1/httproute.go b/pkg/client/listers/apis/v1/httproute.go
index edf16efc5f..2cbbe09d94 100644
--- a/pkg/client/listers/apis/v1/httproute.go
+++ b/pkg/client/listers/apis/v1/httproute.go
@@ -19,8 +19,8 @@ limitations under the License.
package v1
import (
- "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
+ "k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
v1 "sigs.k8s.io/gateway-api/apis/v1"
)
@@ -38,25 +38,17 @@ type HTTPRouteLister interface {
// hTTPRouteLister implements the HTTPRouteLister interface.
type hTTPRouteLister struct {
- indexer cache.Indexer
+ listers.ResourceIndexer[*v1.HTTPRoute]
}
// NewHTTPRouteLister returns a new HTTPRouteLister.
func NewHTTPRouteLister(indexer cache.Indexer) HTTPRouteLister {
- return &hTTPRouteLister{indexer: indexer}
-}
-
-// List lists all HTTPRoutes in the indexer.
-func (s *hTTPRouteLister) List(selector labels.Selector) (ret []*v1.HTTPRoute, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.HTTPRoute))
- })
- return ret, err
+ return &hTTPRouteLister{listers.New[*v1.HTTPRoute](indexer, v1.Resource("httproute"))}
}
// HTTPRoutes returns an object that can list and get HTTPRoutes.
func (s *hTTPRouteLister) HTTPRoutes(namespace string) HTTPRouteNamespaceLister {
- return hTTPRouteNamespaceLister{indexer: s.indexer, namespace: namespace}
+ return hTTPRouteNamespaceLister{listers.NewNamespaced[*v1.HTTPRoute](s.ResourceIndexer, namespace)}
}
// HTTPRouteNamespaceLister helps list and get HTTPRoutes.
@@ -74,26 +66,5 @@ type HTTPRouteNamespaceLister interface {
// hTTPRouteNamespaceLister implements the HTTPRouteNamespaceLister
// interface.
type hTTPRouteNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all HTTPRoutes in the indexer for a given namespace.
-func (s hTTPRouteNamespaceLister) List(selector labels.Selector) (ret []*v1.HTTPRoute, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1.HTTPRoute))
- })
- return ret, err
-}
-
-// Get retrieves the HTTPRoute from the indexer for a given namespace and name.
-func (s hTTPRouteNamespaceLister) Get(name string) (*v1.HTTPRoute, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1.Resource("httproute"), name)
- }
- return obj.(*v1.HTTPRoute), nil
+ listers.ResourceIndexer[*v1.HTTPRoute]
}
diff --git a/pkg/client/listers/apis/v1alpha2/backendlbpolicy.go b/pkg/client/listers/apis/v1alpha2/backendlbpolicy.go
index 1b01f4ec3f..3b09cd2d43 100644
--- a/pkg/client/listers/apis/v1alpha2/backendlbpolicy.go
+++ b/pkg/client/listers/apis/v1alpha2/backendlbpolicy.go
@@ -19,8 +19,8 @@ limitations under the License.
package v1alpha2
import (
- "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
+ "k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
v1alpha2 "sigs.k8s.io/gateway-api/apis/v1alpha2"
)
@@ -38,25 +38,17 @@ type BackendLBPolicyLister interface {
// backendLBPolicyLister implements the BackendLBPolicyLister interface.
type backendLBPolicyLister struct {
- indexer cache.Indexer
+ listers.ResourceIndexer[*v1alpha2.BackendLBPolicy]
}
// NewBackendLBPolicyLister returns a new BackendLBPolicyLister.
func NewBackendLBPolicyLister(indexer cache.Indexer) BackendLBPolicyLister {
- return &backendLBPolicyLister{indexer: indexer}
-}
-
-// List lists all BackendLBPolicies in the indexer.
-func (s *backendLBPolicyLister) List(selector labels.Selector) (ret []*v1alpha2.BackendLBPolicy, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1alpha2.BackendLBPolicy))
- })
- return ret, err
+ return &backendLBPolicyLister{listers.New[*v1alpha2.BackendLBPolicy](indexer, v1alpha2.Resource("backendlbpolicy"))}
}
// BackendLBPolicies returns an object that can list and get BackendLBPolicies.
func (s *backendLBPolicyLister) BackendLBPolicies(namespace string) BackendLBPolicyNamespaceLister {
- return backendLBPolicyNamespaceLister{indexer: s.indexer, namespace: namespace}
+ return backendLBPolicyNamespaceLister{listers.NewNamespaced[*v1alpha2.BackendLBPolicy](s.ResourceIndexer, namespace)}
}
// BackendLBPolicyNamespaceLister helps list and get BackendLBPolicies.
@@ -74,26 +66,5 @@ type BackendLBPolicyNamespaceLister interface {
// backendLBPolicyNamespaceLister implements the BackendLBPolicyNamespaceLister
// interface.
type backendLBPolicyNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all BackendLBPolicies in the indexer for a given namespace.
-func (s backendLBPolicyNamespaceLister) List(selector labels.Selector) (ret []*v1alpha2.BackendLBPolicy, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1alpha2.BackendLBPolicy))
- })
- return ret, err
-}
-
-// Get retrieves the BackendLBPolicy from the indexer for a given namespace and name.
-func (s backendLBPolicyNamespaceLister) Get(name string) (*v1alpha2.BackendLBPolicy, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1alpha2.Resource("backendlbpolicy"), name)
- }
- return obj.(*v1alpha2.BackendLBPolicy), nil
+ listers.ResourceIndexer[*v1alpha2.BackendLBPolicy]
}
diff --git a/pkg/client/listers/apis/v1alpha2/grpcroute.go b/pkg/client/listers/apis/v1alpha2/grpcroute.go
index 822cddba97..9ec44ce2b3 100644
--- a/pkg/client/listers/apis/v1alpha2/grpcroute.go
+++ b/pkg/client/listers/apis/v1alpha2/grpcroute.go
@@ -19,8 +19,8 @@ limitations under the License.
package v1alpha2
import (
- "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
+ "k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
v1alpha2 "sigs.k8s.io/gateway-api/apis/v1alpha2"
)
@@ -38,25 +38,17 @@ type GRPCRouteLister interface {
// gRPCRouteLister implements the GRPCRouteLister interface.
type gRPCRouteLister struct {
- indexer cache.Indexer
+ listers.ResourceIndexer[*v1alpha2.GRPCRoute]
}
// NewGRPCRouteLister returns a new GRPCRouteLister.
func NewGRPCRouteLister(indexer cache.Indexer) GRPCRouteLister {
- return &gRPCRouteLister{indexer: indexer}
-}
-
-// List lists all GRPCRoutes in the indexer.
-func (s *gRPCRouteLister) List(selector labels.Selector) (ret []*v1alpha2.GRPCRoute, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1alpha2.GRPCRoute))
- })
- return ret, err
+ return &gRPCRouteLister{listers.New[*v1alpha2.GRPCRoute](indexer, v1alpha2.Resource("grpcroute"))}
}
// GRPCRoutes returns an object that can list and get GRPCRoutes.
func (s *gRPCRouteLister) GRPCRoutes(namespace string) GRPCRouteNamespaceLister {
- return gRPCRouteNamespaceLister{indexer: s.indexer, namespace: namespace}
+ return gRPCRouteNamespaceLister{listers.NewNamespaced[*v1alpha2.GRPCRoute](s.ResourceIndexer, namespace)}
}
// GRPCRouteNamespaceLister helps list and get GRPCRoutes.
@@ -74,26 +66,5 @@ type GRPCRouteNamespaceLister interface {
// gRPCRouteNamespaceLister implements the GRPCRouteNamespaceLister
// interface.
type gRPCRouteNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all GRPCRoutes in the indexer for a given namespace.
-func (s gRPCRouteNamespaceLister) List(selector labels.Selector) (ret []*v1alpha2.GRPCRoute, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1alpha2.GRPCRoute))
- })
- return ret, err
-}
-
-// Get retrieves the GRPCRoute from the indexer for a given namespace and name.
-func (s gRPCRouteNamespaceLister) Get(name string) (*v1alpha2.GRPCRoute, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1alpha2.Resource("grpcroute"), name)
- }
- return obj.(*v1alpha2.GRPCRoute), nil
+ listers.ResourceIndexer[*v1alpha2.GRPCRoute]
}
diff --git a/pkg/client/listers/apis/v1alpha2/referencegrant.go b/pkg/client/listers/apis/v1alpha2/referencegrant.go
index eb8c7a5615..8df80e9252 100644
--- a/pkg/client/listers/apis/v1alpha2/referencegrant.go
+++ b/pkg/client/listers/apis/v1alpha2/referencegrant.go
@@ -19,8 +19,8 @@ limitations under the License.
package v1alpha2
import (
- "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
+ "k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
v1alpha2 "sigs.k8s.io/gateway-api/apis/v1alpha2"
)
@@ -38,25 +38,17 @@ type ReferenceGrantLister interface {
// referenceGrantLister implements the ReferenceGrantLister interface.
type referenceGrantLister struct {
- indexer cache.Indexer
+ listers.ResourceIndexer[*v1alpha2.ReferenceGrant]
}
// NewReferenceGrantLister returns a new ReferenceGrantLister.
func NewReferenceGrantLister(indexer cache.Indexer) ReferenceGrantLister {
- return &referenceGrantLister{indexer: indexer}
-}
-
-// List lists all ReferenceGrants in the indexer.
-func (s *referenceGrantLister) List(selector labels.Selector) (ret []*v1alpha2.ReferenceGrant, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1alpha2.ReferenceGrant))
- })
- return ret, err
+ return &referenceGrantLister{listers.New[*v1alpha2.ReferenceGrant](indexer, v1alpha2.Resource("referencegrant"))}
}
// ReferenceGrants returns an object that can list and get ReferenceGrants.
func (s *referenceGrantLister) ReferenceGrants(namespace string) ReferenceGrantNamespaceLister {
- return referenceGrantNamespaceLister{indexer: s.indexer, namespace: namespace}
+ return referenceGrantNamespaceLister{listers.NewNamespaced[*v1alpha2.ReferenceGrant](s.ResourceIndexer, namespace)}
}
// ReferenceGrantNamespaceLister helps list and get ReferenceGrants.
@@ -74,26 +66,5 @@ type ReferenceGrantNamespaceLister interface {
// referenceGrantNamespaceLister implements the ReferenceGrantNamespaceLister
// interface.
type referenceGrantNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all ReferenceGrants in the indexer for a given namespace.
-func (s referenceGrantNamespaceLister) List(selector labels.Selector) (ret []*v1alpha2.ReferenceGrant, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1alpha2.ReferenceGrant))
- })
- return ret, err
-}
-
-// Get retrieves the ReferenceGrant from the indexer for a given namespace and name.
-func (s referenceGrantNamespaceLister) Get(name string) (*v1alpha2.ReferenceGrant, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1alpha2.Resource("referencegrant"), name)
- }
- return obj.(*v1alpha2.ReferenceGrant), nil
+ listers.ResourceIndexer[*v1alpha2.ReferenceGrant]
}
diff --git a/pkg/client/listers/apis/v1alpha2/tcproute.go b/pkg/client/listers/apis/v1alpha2/tcproute.go
index f9582ed03e..4b34f9a2d9 100644
--- a/pkg/client/listers/apis/v1alpha2/tcproute.go
+++ b/pkg/client/listers/apis/v1alpha2/tcproute.go
@@ -19,8 +19,8 @@ limitations under the License.
package v1alpha2
import (
- "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
+ "k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
v1alpha2 "sigs.k8s.io/gateway-api/apis/v1alpha2"
)
@@ -38,25 +38,17 @@ type TCPRouteLister interface {
// tCPRouteLister implements the TCPRouteLister interface.
type tCPRouteLister struct {
- indexer cache.Indexer
+ listers.ResourceIndexer[*v1alpha2.TCPRoute]
}
// NewTCPRouteLister returns a new TCPRouteLister.
func NewTCPRouteLister(indexer cache.Indexer) TCPRouteLister {
- return &tCPRouteLister{indexer: indexer}
-}
-
-// List lists all TCPRoutes in the indexer.
-func (s *tCPRouteLister) List(selector labels.Selector) (ret []*v1alpha2.TCPRoute, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1alpha2.TCPRoute))
- })
- return ret, err
+ return &tCPRouteLister{listers.New[*v1alpha2.TCPRoute](indexer, v1alpha2.Resource("tcproute"))}
}
// TCPRoutes returns an object that can list and get TCPRoutes.
func (s *tCPRouteLister) TCPRoutes(namespace string) TCPRouteNamespaceLister {
- return tCPRouteNamespaceLister{indexer: s.indexer, namespace: namespace}
+ return tCPRouteNamespaceLister{listers.NewNamespaced[*v1alpha2.TCPRoute](s.ResourceIndexer, namespace)}
}
// TCPRouteNamespaceLister helps list and get TCPRoutes.
@@ -74,26 +66,5 @@ type TCPRouteNamespaceLister interface {
// tCPRouteNamespaceLister implements the TCPRouteNamespaceLister
// interface.
type tCPRouteNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all TCPRoutes in the indexer for a given namespace.
-func (s tCPRouteNamespaceLister) List(selector labels.Selector) (ret []*v1alpha2.TCPRoute, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1alpha2.TCPRoute))
- })
- return ret, err
-}
-
-// Get retrieves the TCPRoute from the indexer for a given namespace and name.
-func (s tCPRouteNamespaceLister) Get(name string) (*v1alpha2.TCPRoute, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1alpha2.Resource("tcproute"), name)
- }
- return obj.(*v1alpha2.TCPRoute), nil
+ listers.ResourceIndexer[*v1alpha2.TCPRoute]
}
diff --git a/pkg/client/listers/apis/v1alpha2/tlsroute.go b/pkg/client/listers/apis/v1alpha2/tlsroute.go
index 0c68c2e71f..ad021d0d14 100644
--- a/pkg/client/listers/apis/v1alpha2/tlsroute.go
+++ b/pkg/client/listers/apis/v1alpha2/tlsroute.go
@@ -19,8 +19,8 @@ limitations under the License.
package v1alpha2
import (
- "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
+ "k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
v1alpha2 "sigs.k8s.io/gateway-api/apis/v1alpha2"
)
@@ -38,25 +38,17 @@ type TLSRouteLister interface {
// tLSRouteLister implements the TLSRouteLister interface.
type tLSRouteLister struct {
- indexer cache.Indexer
+ listers.ResourceIndexer[*v1alpha2.TLSRoute]
}
// NewTLSRouteLister returns a new TLSRouteLister.
func NewTLSRouteLister(indexer cache.Indexer) TLSRouteLister {
- return &tLSRouteLister{indexer: indexer}
-}
-
-// List lists all TLSRoutes in the indexer.
-func (s *tLSRouteLister) List(selector labels.Selector) (ret []*v1alpha2.TLSRoute, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1alpha2.TLSRoute))
- })
- return ret, err
+ return &tLSRouteLister{listers.New[*v1alpha2.TLSRoute](indexer, v1alpha2.Resource("tlsroute"))}
}
// TLSRoutes returns an object that can list and get TLSRoutes.
func (s *tLSRouteLister) TLSRoutes(namespace string) TLSRouteNamespaceLister {
- return tLSRouteNamespaceLister{indexer: s.indexer, namespace: namespace}
+ return tLSRouteNamespaceLister{listers.NewNamespaced[*v1alpha2.TLSRoute](s.ResourceIndexer, namespace)}
}
// TLSRouteNamespaceLister helps list and get TLSRoutes.
@@ -74,26 +66,5 @@ type TLSRouteNamespaceLister interface {
// tLSRouteNamespaceLister implements the TLSRouteNamespaceLister
// interface.
type tLSRouteNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all TLSRoutes in the indexer for a given namespace.
-func (s tLSRouteNamespaceLister) List(selector labels.Selector) (ret []*v1alpha2.TLSRoute, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1alpha2.TLSRoute))
- })
- return ret, err
-}
-
-// Get retrieves the TLSRoute from the indexer for a given namespace and name.
-func (s tLSRouteNamespaceLister) Get(name string) (*v1alpha2.TLSRoute, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1alpha2.Resource("tlsroute"), name)
- }
- return obj.(*v1alpha2.TLSRoute), nil
+ listers.ResourceIndexer[*v1alpha2.TLSRoute]
}
diff --git a/pkg/client/listers/apis/v1alpha2/udproute.go b/pkg/client/listers/apis/v1alpha2/udproute.go
index ef47d5a105..e4e4a20643 100644
--- a/pkg/client/listers/apis/v1alpha2/udproute.go
+++ b/pkg/client/listers/apis/v1alpha2/udproute.go
@@ -19,8 +19,8 @@ limitations under the License.
package v1alpha2
import (
- "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
+ "k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
v1alpha2 "sigs.k8s.io/gateway-api/apis/v1alpha2"
)
@@ -38,25 +38,17 @@ type UDPRouteLister interface {
// uDPRouteLister implements the UDPRouteLister interface.
type uDPRouteLister struct {
- indexer cache.Indexer
+ listers.ResourceIndexer[*v1alpha2.UDPRoute]
}
// NewUDPRouteLister returns a new UDPRouteLister.
func NewUDPRouteLister(indexer cache.Indexer) UDPRouteLister {
- return &uDPRouteLister{indexer: indexer}
-}
-
-// List lists all UDPRoutes in the indexer.
-func (s *uDPRouteLister) List(selector labels.Selector) (ret []*v1alpha2.UDPRoute, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1alpha2.UDPRoute))
- })
- return ret, err
+ return &uDPRouteLister{listers.New[*v1alpha2.UDPRoute](indexer, v1alpha2.Resource("udproute"))}
}
// UDPRoutes returns an object that can list and get UDPRoutes.
func (s *uDPRouteLister) UDPRoutes(namespace string) UDPRouteNamespaceLister {
- return uDPRouteNamespaceLister{indexer: s.indexer, namespace: namespace}
+ return uDPRouteNamespaceLister{listers.NewNamespaced[*v1alpha2.UDPRoute](s.ResourceIndexer, namespace)}
}
// UDPRouteNamespaceLister helps list and get UDPRoutes.
@@ -74,26 +66,5 @@ type UDPRouteNamespaceLister interface {
// uDPRouteNamespaceLister implements the UDPRouteNamespaceLister
// interface.
type uDPRouteNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all UDPRoutes in the indexer for a given namespace.
-func (s uDPRouteNamespaceLister) List(selector labels.Selector) (ret []*v1alpha2.UDPRoute, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1alpha2.UDPRoute))
- })
- return ret, err
-}
-
-// Get retrieves the UDPRoute from the indexer for a given namespace and name.
-func (s uDPRouteNamespaceLister) Get(name string) (*v1alpha2.UDPRoute, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1alpha2.Resource("udproute"), name)
- }
- return obj.(*v1alpha2.UDPRoute), nil
+ listers.ResourceIndexer[*v1alpha2.UDPRoute]
}
diff --git a/pkg/client/listers/apis/v1alpha3/backendtlspolicy.go b/pkg/client/listers/apis/v1alpha3/backendtlspolicy.go
index 56ea817373..c881c849f4 100644
--- a/pkg/client/listers/apis/v1alpha3/backendtlspolicy.go
+++ b/pkg/client/listers/apis/v1alpha3/backendtlspolicy.go
@@ -19,8 +19,8 @@ limitations under the License.
package v1alpha3
import (
- "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
+ "k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
v1alpha3 "sigs.k8s.io/gateway-api/apis/v1alpha3"
)
@@ -38,25 +38,17 @@ type BackendTLSPolicyLister interface {
// backendTLSPolicyLister implements the BackendTLSPolicyLister interface.
type backendTLSPolicyLister struct {
- indexer cache.Indexer
+ listers.ResourceIndexer[*v1alpha3.BackendTLSPolicy]
}
// NewBackendTLSPolicyLister returns a new BackendTLSPolicyLister.
func NewBackendTLSPolicyLister(indexer cache.Indexer) BackendTLSPolicyLister {
- return &backendTLSPolicyLister{indexer: indexer}
-}
-
-// List lists all BackendTLSPolicies in the indexer.
-func (s *backendTLSPolicyLister) List(selector labels.Selector) (ret []*v1alpha3.BackendTLSPolicy, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1alpha3.BackendTLSPolicy))
- })
- return ret, err
+ return &backendTLSPolicyLister{listers.New[*v1alpha3.BackendTLSPolicy](indexer, v1alpha3.Resource("backendtlspolicy"))}
}
// BackendTLSPolicies returns an object that can list and get BackendTLSPolicies.
func (s *backendTLSPolicyLister) BackendTLSPolicies(namespace string) BackendTLSPolicyNamespaceLister {
- return backendTLSPolicyNamespaceLister{indexer: s.indexer, namespace: namespace}
+ return backendTLSPolicyNamespaceLister{listers.NewNamespaced[*v1alpha3.BackendTLSPolicy](s.ResourceIndexer, namespace)}
}
// BackendTLSPolicyNamespaceLister helps list and get BackendTLSPolicies.
@@ -74,26 +66,5 @@ type BackendTLSPolicyNamespaceLister interface {
// backendTLSPolicyNamespaceLister implements the BackendTLSPolicyNamespaceLister
// interface.
type backendTLSPolicyNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all BackendTLSPolicies in the indexer for a given namespace.
-func (s backendTLSPolicyNamespaceLister) List(selector labels.Selector) (ret []*v1alpha3.BackendTLSPolicy, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1alpha3.BackendTLSPolicy))
- })
- return ret, err
-}
-
-// Get retrieves the BackendTLSPolicy from the indexer for a given namespace and name.
-func (s backendTLSPolicyNamespaceLister) Get(name string) (*v1alpha3.BackendTLSPolicy, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1alpha3.Resource("backendtlspolicy"), name)
- }
- return obj.(*v1alpha3.BackendTLSPolicy), nil
+ listers.ResourceIndexer[*v1alpha3.BackendTLSPolicy]
}
diff --git a/pkg/client/listers/apis/v1beta1/gateway.go b/pkg/client/listers/apis/v1beta1/gateway.go
index 34a6707cb0..2b20013c17 100644
--- a/pkg/client/listers/apis/v1beta1/gateway.go
+++ b/pkg/client/listers/apis/v1beta1/gateway.go
@@ -19,8 +19,8 @@ limitations under the License.
package v1beta1
import (
- "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
+ "k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
v1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1"
)
@@ -38,25 +38,17 @@ type GatewayLister interface {
// gatewayLister implements the GatewayLister interface.
type gatewayLister struct {
- indexer cache.Indexer
+ listers.ResourceIndexer[*v1beta1.Gateway]
}
// NewGatewayLister returns a new GatewayLister.
func NewGatewayLister(indexer cache.Indexer) GatewayLister {
- return &gatewayLister{indexer: indexer}
-}
-
-// List lists all Gateways in the indexer.
-func (s *gatewayLister) List(selector labels.Selector) (ret []*v1beta1.Gateway, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.Gateway))
- })
- return ret, err
+ return &gatewayLister{listers.New[*v1beta1.Gateway](indexer, v1beta1.Resource("gateway"))}
}
// Gateways returns an object that can list and get Gateways.
func (s *gatewayLister) Gateways(namespace string) GatewayNamespaceLister {
- return gatewayNamespaceLister{indexer: s.indexer, namespace: namespace}
+ return gatewayNamespaceLister{listers.NewNamespaced[*v1beta1.Gateway](s.ResourceIndexer, namespace)}
}
// GatewayNamespaceLister helps list and get Gateways.
@@ -74,26 +66,5 @@ type GatewayNamespaceLister interface {
// gatewayNamespaceLister implements the GatewayNamespaceLister
// interface.
type gatewayNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all Gateways in the indexer for a given namespace.
-func (s gatewayNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.Gateway, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.Gateway))
- })
- return ret, err
-}
-
-// Get retrieves the Gateway from the indexer for a given namespace and name.
-func (s gatewayNamespaceLister) Get(name string) (*v1beta1.Gateway, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1beta1.Resource("gateway"), name)
- }
- return obj.(*v1beta1.Gateway), nil
+ listers.ResourceIndexer[*v1beta1.Gateway]
}
diff --git a/pkg/client/listers/apis/v1beta1/gatewayclass.go b/pkg/client/listers/apis/v1beta1/gatewayclass.go
index 2161270142..c2ae2ec025 100644
--- a/pkg/client/listers/apis/v1beta1/gatewayclass.go
+++ b/pkg/client/listers/apis/v1beta1/gatewayclass.go
@@ -19,8 +19,8 @@ limitations under the License.
package v1beta1
import (
- "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
+ "k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
v1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1"
)
@@ -39,30 +39,10 @@ type GatewayClassLister interface {
// gatewayClassLister implements the GatewayClassLister interface.
type gatewayClassLister struct {
- indexer cache.Indexer
+ listers.ResourceIndexer[*v1beta1.GatewayClass]
}
// NewGatewayClassLister returns a new GatewayClassLister.
func NewGatewayClassLister(indexer cache.Indexer) GatewayClassLister {
- return &gatewayClassLister{indexer: indexer}
-}
-
-// List lists all GatewayClasses in the indexer.
-func (s *gatewayClassLister) List(selector labels.Selector) (ret []*v1beta1.GatewayClass, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.GatewayClass))
- })
- return ret, err
-}
-
-// Get retrieves the GatewayClass from the index for a given name.
-func (s *gatewayClassLister) Get(name string) (*v1beta1.GatewayClass, error) {
- obj, exists, err := s.indexer.GetByKey(name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1beta1.Resource("gatewayclass"), name)
- }
- return obj.(*v1beta1.GatewayClass), nil
+ return &gatewayClassLister{listers.New[*v1beta1.GatewayClass](indexer, v1beta1.Resource("gatewayclass"))}
}
diff --git a/pkg/client/listers/apis/v1beta1/httproute.go b/pkg/client/listers/apis/v1beta1/httproute.go
index 6d27a03358..243226986c 100644
--- a/pkg/client/listers/apis/v1beta1/httproute.go
+++ b/pkg/client/listers/apis/v1beta1/httproute.go
@@ -19,8 +19,8 @@ limitations under the License.
package v1beta1
import (
- "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
+ "k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
v1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1"
)
@@ -38,25 +38,17 @@ type HTTPRouteLister interface {
// hTTPRouteLister implements the HTTPRouteLister interface.
type hTTPRouteLister struct {
- indexer cache.Indexer
+ listers.ResourceIndexer[*v1beta1.HTTPRoute]
}
// NewHTTPRouteLister returns a new HTTPRouteLister.
func NewHTTPRouteLister(indexer cache.Indexer) HTTPRouteLister {
- return &hTTPRouteLister{indexer: indexer}
-}
-
-// List lists all HTTPRoutes in the indexer.
-func (s *hTTPRouteLister) List(selector labels.Selector) (ret []*v1beta1.HTTPRoute, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.HTTPRoute))
- })
- return ret, err
+ return &hTTPRouteLister{listers.New[*v1beta1.HTTPRoute](indexer, v1beta1.Resource("httproute"))}
}
// HTTPRoutes returns an object that can list and get HTTPRoutes.
func (s *hTTPRouteLister) HTTPRoutes(namespace string) HTTPRouteNamespaceLister {
- return hTTPRouteNamespaceLister{indexer: s.indexer, namespace: namespace}
+ return hTTPRouteNamespaceLister{listers.NewNamespaced[*v1beta1.HTTPRoute](s.ResourceIndexer, namespace)}
}
// HTTPRouteNamespaceLister helps list and get HTTPRoutes.
@@ -74,26 +66,5 @@ type HTTPRouteNamespaceLister interface {
// hTTPRouteNamespaceLister implements the HTTPRouteNamespaceLister
// interface.
type hTTPRouteNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all HTTPRoutes in the indexer for a given namespace.
-func (s hTTPRouteNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.HTTPRoute, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.HTTPRoute))
- })
- return ret, err
-}
-
-// Get retrieves the HTTPRoute from the indexer for a given namespace and name.
-func (s hTTPRouteNamespaceLister) Get(name string) (*v1beta1.HTTPRoute, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1beta1.Resource("httproute"), name)
- }
- return obj.(*v1beta1.HTTPRoute), nil
+ listers.ResourceIndexer[*v1beta1.HTTPRoute]
}
diff --git a/pkg/client/listers/apis/v1beta1/referencegrant.go b/pkg/client/listers/apis/v1beta1/referencegrant.go
index 8144734b27..5263fef653 100644
--- a/pkg/client/listers/apis/v1beta1/referencegrant.go
+++ b/pkg/client/listers/apis/v1beta1/referencegrant.go
@@ -19,8 +19,8 @@ limitations under the License.
package v1beta1
import (
- "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels"
+ "k8s.io/client-go/listers"
"k8s.io/client-go/tools/cache"
v1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1"
)
@@ -38,25 +38,17 @@ type ReferenceGrantLister interface {
// referenceGrantLister implements the ReferenceGrantLister interface.
type referenceGrantLister struct {
- indexer cache.Indexer
+ listers.ResourceIndexer[*v1beta1.ReferenceGrant]
}
// NewReferenceGrantLister returns a new ReferenceGrantLister.
func NewReferenceGrantLister(indexer cache.Indexer) ReferenceGrantLister {
- return &referenceGrantLister{indexer: indexer}
-}
-
-// List lists all ReferenceGrants in the indexer.
-func (s *referenceGrantLister) List(selector labels.Selector) (ret []*v1beta1.ReferenceGrant, err error) {
- err = cache.ListAll(s.indexer, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.ReferenceGrant))
- })
- return ret, err
+ return &referenceGrantLister{listers.New[*v1beta1.ReferenceGrant](indexer, v1beta1.Resource("referencegrant"))}
}
// ReferenceGrants returns an object that can list and get ReferenceGrants.
func (s *referenceGrantLister) ReferenceGrants(namespace string) ReferenceGrantNamespaceLister {
- return referenceGrantNamespaceLister{indexer: s.indexer, namespace: namespace}
+ return referenceGrantNamespaceLister{listers.NewNamespaced[*v1beta1.ReferenceGrant](s.ResourceIndexer, namespace)}
}
// ReferenceGrantNamespaceLister helps list and get ReferenceGrants.
@@ -74,26 +66,5 @@ type ReferenceGrantNamespaceLister interface {
// referenceGrantNamespaceLister implements the ReferenceGrantNamespaceLister
// interface.
type referenceGrantNamespaceLister struct {
- indexer cache.Indexer
- namespace string
-}
-
-// List lists all ReferenceGrants in the indexer for a given namespace.
-func (s referenceGrantNamespaceLister) List(selector labels.Selector) (ret []*v1beta1.ReferenceGrant, err error) {
- err = cache.ListAllByNamespace(s.indexer, s.namespace, selector, func(m interface{}) {
- ret = append(ret, m.(*v1beta1.ReferenceGrant))
- })
- return ret, err
-}
-
-// Get retrieves the ReferenceGrant from the indexer for a given namespace and name.
-func (s referenceGrantNamespaceLister) Get(name string) (*v1beta1.ReferenceGrant, error) {
- obj, exists, err := s.indexer.GetByKey(s.namespace + "/" + name)
- if err != nil {
- return nil, err
- }
- if !exists {
- return nil, errors.NewNotFound(v1beta1.Resource("referencegrant"), name)
- }
- return obj.(*v1beta1.ReferenceGrant), nil
+ listers.ResourceIndexer[*v1beta1.ReferenceGrant]
}
diff --git a/pkg/generated/openapi/zz_generated.openapi.go b/pkg/generated/openapi/zz_generated.openapi.go
index 6508bd7717..ac2b615fa6 100644
--- a/pkg/generated/openapi/zz_generated.openapi.go
+++ b/pkg/generated/openapi/zz_generated.openapi.go
@@ -39,6 +39,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA
"k8s.io/apimachinery/pkg/apis/meta/v1.CreateOptions": schema_pkg_apis_meta_v1_CreateOptions(ref),
"k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions": schema_pkg_apis_meta_v1_DeleteOptions(ref),
"k8s.io/apimachinery/pkg/apis/meta/v1.Duration": schema_pkg_apis_meta_v1_Duration(ref),
+ "k8s.io/apimachinery/pkg/apis/meta/v1.FieldSelectorRequirement": schema_pkg_apis_meta_v1_FieldSelectorRequirement(ref),
"k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1": schema_pkg_apis_meta_v1_FieldsV1(ref),
"k8s.io/apimachinery/pkg/apis/meta/v1.GetOptions": schema_pkg_apis_meta_v1_GetOptions(ref),
"k8s.io/apimachinery/pkg/apis/meta/v1.GroupKind": schema_pkg_apis_meta_v1_GroupKind(ref),
@@ -844,6 +845,56 @@ func schema_pkg_apis_meta_v1_Duration(ref common.ReferenceCallback) common.OpenA
}
}
+func schema_pkg_apis_meta_v1_FieldSelectorRequirement(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "FieldSelectorRequirement is a selector that contains values, a key, and an operator that relates the key and values.",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "key": {
+ SchemaProps: spec.SchemaProps{
+ Description: "key is the field selector key that the requirement applies to.",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "operator": {
+ SchemaProps: spec.SchemaProps{
+ Description: "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. The list of operators may grow in the future.",
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "values": {
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: spec.Extensions{
+ "x-kubernetes-list-type": "atomic",
+ },
+ },
+ SchemaProps: spec.SchemaProps{
+ Description: "values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty.",
+ Type: []string{"array"},
+ Items: &spec.SchemaOrArray{
+ Schema: &spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Default: "",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ },
+ },
+ },
+ },
+ Required: []string{"key", "operator"},
+ },
+ },
+ }
+}
+
func schema_pkg_apis_meta_v1_FieldsV1(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{