diff --git a/api/v1/inferencepool_types.go b/api/v1/inferencepool_types.go index 98f45d5bb..b7036255e 100644 --- a/api/v1/inferencepool_types.go +++ b/api/v1/inferencepool_types.go @@ -69,14 +69,6 @@ type InferencePoolSpec struct { // +kubebuilder:validation:Required TargetPortNumber int32 `json:"targetPortNumber"` - // EndpointPickerConfig specifies the configuration needed by the proxy to discover and connect to the endpoint - // picker service that picks endpoints for the requests routed to this pool. - EndpointPickerConfig `json:",inline"` -} - -// EndpointPickerConfig specifies the configuration needed by the proxy to discover and connect to the endpoint picker extension. -// This type is intended to be a union of mutually exclusive configuration options that we may add in the future. -type EndpointPickerConfig struct { // Extension configures an endpoint picker as an extension service. // // +kubebuilder:validation:Required @@ -85,21 +77,6 @@ type EndpointPickerConfig struct { // Extension specifies how to configure an extension that runs the endpoint picker. type Extension struct { - // Reference is a reference to a service extension. When ExtensionReference is invalid, - // a 5XX status code MUST be returned for the request that would have otherwise been routed - // to the invalid backend. - ExtensionReference `json:",inline"` - - // ExtensionConnection configures the connection between the Gateway and the extension. - ExtensionConnection `json:",inline"` -} - -// ExtensionReference is a reference to the extension. -// -// If a reference is invalid, the implementation MUST update the `ResolvedRefs` -// Condition on the InferencePool's status to `status: False`. A 5XX status code MUST be returned -// for the request that would have otherwise been routed to the invalid backend. -type ExtensionReference struct { // Group is the group of the referent. // The default value is "", representing the Core API group. // @@ -132,10 +109,7 @@ type ExtensionReference struct { // // +optional PortNumber *PortNumber `json:"portNumber,omitempty"` -} -// ExtensionConnection encapsulates options that configures the connection to the extension. -type ExtensionConnection struct { // Configures how the gateway handles the case when the extension is not responsive. // Defaults to failClose. // @@ -261,7 +235,7 @@ const ( InferencePoolReasonResolvedRefs InferencePoolReason = "ResolvedRefs" // This reason is used with the "ResolvedRefs" condition when the - // ExtensionRef is invalid in some way. This can include an unsupported kind + // Extension is invalid in some way. This can include an unsupported kind // or API group, or a reference to a resource that can not be found. InferencePoolReasonInvalidExtensionRef InferencePoolReason = "InvalidExtensionRef" ) diff --git a/api/v1/zz_generated.deepcopy.go b/api/v1/zz_generated.deepcopy.go index adf19acbe..6f8037941 100644 --- a/api/v1/zz_generated.deepcopy.go +++ b/api/v1/zz_generated.deepcopy.go @@ -25,65 +25,8 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EndpointPickerConfig) DeepCopyInto(out *EndpointPickerConfig) { - *out = *in - if in.ExtensionRef != nil { - in, out := &in.ExtensionRef, &out.ExtensionRef - *out = new(Extension) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointPickerConfig. -func (in *EndpointPickerConfig) DeepCopy() *EndpointPickerConfig { - if in == nil { - return nil - } - out := new(EndpointPickerConfig) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Extension) DeepCopyInto(out *Extension) { - *out = *in - in.ExtensionReference.DeepCopyInto(&out.ExtensionReference) - in.ExtensionConnection.DeepCopyInto(&out.ExtensionConnection) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Extension. -func (in *Extension) DeepCopy() *Extension { - if in == nil { - return nil - } - out := new(Extension) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ExtensionConnection) DeepCopyInto(out *ExtensionConnection) { - *out = *in - if in.FailureMode != nil { - in, out := &in.FailureMode, &out.FailureMode - *out = new(ExtensionFailureMode) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtensionConnection. -func (in *ExtensionConnection) DeepCopy() *ExtensionConnection { - if in == nil { - return nil - } - out := new(ExtensionConnection) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ExtensionReference) DeepCopyInto(out *ExtensionReference) { *out = *in if in.Group != nil { in, out := &in.Group, &out.Group @@ -100,14 +43,19 @@ func (in *ExtensionReference) DeepCopyInto(out *ExtensionReference) { *out = new(PortNumber) **out = **in } + if in.FailureMode != nil { + in, out := &in.FailureMode, &out.FailureMode + *out = new(ExtensionFailureMode) + **out = **in + } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtensionReference. -func (in *ExtensionReference) DeepCopy() *ExtensionReference { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Extension. +func (in *Extension) DeepCopy() *Extension { if in == nil { return nil } - out := new(ExtensionReference) + out := new(Extension) in.DeepCopyInto(out) return out } @@ -181,7 +129,11 @@ func (in *InferencePoolSpec) DeepCopyInto(out *InferencePoolSpec) { (*out)[key] = val } } - in.EndpointPickerConfig.DeepCopyInto(&out.EndpointPickerConfig) + if in.ExtensionRef != nil { + in, out := &in.ExtensionRef, &out.ExtensionRef + *out = new(Extension) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InferencePoolSpec. diff --git a/apix/v1alpha2/inferencepool_types.go b/apix/v1alpha2/inferencepool_types.go index 0213d86e3..5ea3377df 100644 --- a/apix/v1alpha2/inferencepool_types.go +++ b/apix/v1alpha2/inferencepool_types.go @@ -85,26 +85,6 @@ type EndpointPickerConfig struct { // Extension specifies how to configure an extension that runs the endpoint picker. type Extension struct { - // Reference is a reference to a service extension. When ExtensionReference is invalid, - // a 5XX status code MUST be returned for the request that would have otherwise been routed - // to the invalid backend. - ExtensionReference `json:",inline"` - - // ExtensionConnection configures the connection between the Gateway and the extension. - ExtensionConnection `json:",inline"` -} - -// ExtensionReference is a reference to the extension. -// -// Connections to this extension MUST use TLS by default. Implementations MAY -// provide a way to customize this connection to use cleartext, a different -// protocol, or custom TLS configuration. -// -// If a reference is invalid, the implementation MUST update the `ResolvedRefs` -// Condition on the InferencePool's status to `status: False`. A 5XX status code -// MUST be returned for the request that would have otherwise been routed to the -// invalid backend. -type ExtensionReference struct { // Group is the group of the referent. // The default value is "", representing the Core API group. // @@ -137,10 +117,7 @@ type ExtensionReference struct { // // +optional PortNumber *PortNumber `json:"portNumber,omitempty"` -} -// ExtensionConnection encapsulates options that configures the connection to the extension. -type ExtensionConnection struct { // Configures how the gateway handles the case when the extension is not responsive. // Defaults to failClose. // @@ -266,7 +243,7 @@ const ( InferencePoolReasonResolvedRefs InferencePoolReason = "ResolvedRefs" // This reason is used with the "ResolvedRefs" condition when the - // ExtensionRef is invalid in some way. This can include an unsupported kind + // Extension is invalid in some way. This can include an unsupported kind // or API group, or a reference to a resource that can not be found. InferencePoolReasonInvalidExtensionRef InferencePoolReason = "InvalidExtensionRef" ) diff --git a/apix/v1alpha2/zz_generated.deepcopy.go b/apix/v1alpha2/zz_generated.deepcopy.go index 697c443c4..8ab3c469f 100644 --- a/apix/v1alpha2/zz_generated.deepcopy.go +++ b/apix/v1alpha2/zz_generated.deepcopy.go @@ -47,43 +47,6 @@ func (in *EndpointPickerConfig) DeepCopy() *EndpointPickerConfig { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Extension) DeepCopyInto(out *Extension) { - *out = *in - in.ExtensionReference.DeepCopyInto(&out.ExtensionReference) - in.ExtensionConnection.DeepCopyInto(&out.ExtensionConnection) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Extension. -func (in *Extension) DeepCopy() *Extension { - if in == nil { - return nil - } - out := new(Extension) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ExtensionConnection) DeepCopyInto(out *ExtensionConnection) { - *out = *in - if in.FailureMode != nil { - in, out := &in.FailureMode, &out.FailureMode - *out = new(ExtensionFailureMode) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtensionConnection. -func (in *ExtensionConnection) DeepCopy() *ExtensionConnection { - if in == nil { - return nil - } - out := new(ExtensionConnection) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ExtensionReference) DeepCopyInto(out *ExtensionReference) { *out = *in if in.Group != nil { in, out := &in.Group, &out.Group @@ -100,14 +63,19 @@ func (in *ExtensionReference) DeepCopyInto(out *ExtensionReference) { *out = new(PortNumber) **out = **in } + if in.FailureMode != nil { + in, out := &in.FailureMode, &out.FailureMode + *out = new(ExtensionFailureMode) + **out = **in + } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtensionReference. -func (in *ExtensionReference) DeepCopy() *ExtensionReference { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Extension. +func (in *Extension) DeepCopy() *Extension { if in == nil { return nil } - out := new(ExtensionReference) + out := new(Extension) in.DeepCopyInto(out) return out } diff --git a/client-go/applyconfiguration/api/v1/endpointpickerconfig.go b/client-go/applyconfiguration/api/v1/endpointpickerconfig.go deleted file mode 100644 index 9877d40d9..000000000 --- a/client-go/applyconfiguration/api/v1/endpointpickerconfig.go +++ /dev/null @@ -1,39 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// EndpointPickerConfigApplyConfiguration represents a declarative configuration of the EndpointPickerConfig type for use -// with apply. -type EndpointPickerConfigApplyConfiguration struct { - ExtensionRef *ExtensionApplyConfiguration `json:"extensionRef,omitempty"` -} - -// EndpointPickerConfigApplyConfiguration constructs a declarative configuration of the EndpointPickerConfig type for use with -// apply. -func EndpointPickerConfig() *EndpointPickerConfigApplyConfiguration { - return &EndpointPickerConfigApplyConfiguration{} -} - -// WithExtensionRef sets the ExtensionRef field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ExtensionRef field is set to the value of the last call. -func (b *EndpointPickerConfigApplyConfiguration) WithExtensionRef(value *ExtensionApplyConfiguration) *EndpointPickerConfigApplyConfiguration { - b.ExtensionRef = value - return b -} diff --git a/client-go/applyconfiguration/api/v1/extension.go b/client-go/applyconfiguration/api/v1/extension.go index b14ec837e..7e7d645c8 100644 --- a/client-go/applyconfiguration/api/v1/extension.go +++ b/client-go/applyconfiguration/api/v1/extension.go @@ -25,8 +25,11 @@ import ( // ExtensionApplyConfiguration represents a declarative configuration of the Extension type for use // with apply. type ExtensionApplyConfiguration struct { - ExtensionReferenceApplyConfiguration `json:",inline"` - ExtensionConnectionApplyConfiguration `json:",inline"` + Group *apiv1.Group `json:"group,omitempty"` + Kind *apiv1.Kind `json:"kind,omitempty"` + Name *apiv1.ObjectName `json:"name,omitempty"` + PortNumber *apiv1.PortNumber `json:"portNumber,omitempty"` + FailureMode *apiv1.ExtensionFailureMode `json:"failureMode,omitempty"` } // ExtensionApplyConfiguration constructs a declarative configuration of the Extension type for use with @@ -39,7 +42,7 @@ func Extension() *ExtensionApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Group field is set to the value of the last call. func (b *ExtensionApplyConfiguration) WithGroup(value apiv1.Group) *ExtensionApplyConfiguration { - b.ExtensionReferenceApplyConfiguration.Group = &value + b.Group = &value return b } @@ -47,7 +50,7 @@ func (b *ExtensionApplyConfiguration) WithGroup(value apiv1.Group) *ExtensionApp // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ExtensionApplyConfiguration) WithKind(value apiv1.Kind) *ExtensionApplyConfiguration { - b.ExtensionReferenceApplyConfiguration.Kind = &value + b.Kind = &value return b } @@ -55,7 +58,7 @@ func (b *ExtensionApplyConfiguration) WithKind(value apiv1.Kind) *ExtensionApply // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Name field is set to the value of the last call. func (b *ExtensionApplyConfiguration) WithName(value apiv1.ObjectName) *ExtensionApplyConfiguration { - b.ExtensionReferenceApplyConfiguration.Name = &value + b.Name = &value return b } @@ -63,7 +66,7 @@ func (b *ExtensionApplyConfiguration) WithName(value apiv1.ObjectName) *Extensio // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the PortNumber field is set to the value of the last call. func (b *ExtensionApplyConfiguration) WithPortNumber(value apiv1.PortNumber) *ExtensionApplyConfiguration { - b.ExtensionReferenceApplyConfiguration.PortNumber = &value + b.PortNumber = &value return b } @@ -71,6 +74,6 @@ func (b *ExtensionApplyConfiguration) WithPortNumber(value apiv1.PortNumber) *Ex // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the FailureMode field is set to the value of the last call. func (b *ExtensionApplyConfiguration) WithFailureMode(value apiv1.ExtensionFailureMode) *ExtensionApplyConfiguration { - b.ExtensionConnectionApplyConfiguration.FailureMode = &value + b.FailureMode = &value return b } diff --git a/client-go/applyconfiguration/api/v1/extensionconnection.go b/client-go/applyconfiguration/api/v1/extensionconnection.go deleted file mode 100644 index cc078272d..000000000 --- a/client-go/applyconfiguration/api/v1/extensionconnection.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - apiv1 "sigs.k8s.io/gateway-api-inference-extension/api/v1" -) - -// ExtensionConnectionApplyConfiguration represents a declarative configuration of the ExtensionConnection type for use -// with apply. -type ExtensionConnectionApplyConfiguration struct { - FailureMode *apiv1.ExtensionFailureMode `json:"failureMode,omitempty"` -} - -// ExtensionConnectionApplyConfiguration constructs a declarative configuration of the ExtensionConnection type for use with -// apply. -func ExtensionConnection() *ExtensionConnectionApplyConfiguration { - return &ExtensionConnectionApplyConfiguration{} -} - -// WithFailureMode sets the FailureMode field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the FailureMode field is set to the value of the last call. -func (b *ExtensionConnectionApplyConfiguration) WithFailureMode(value apiv1.ExtensionFailureMode) *ExtensionConnectionApplyConfiguration { - b.FailureMode = &value - return b -} diff --git a/client-go/applyconfiguration/api/v1/extensionreference.go b/client-go/applyconfiguration/api/v1/extensionreference.go deleted file mode 100644 index 21402d15a..000000000 --- a/client-go/applyconfiguration/api/v1/extensionreference.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - apiv1 "sigs.k8s.io/gateway-api-inference-extension/api/v1" -) - -// ExtensionReferenceApplyConfiguration represents a declarative configuration of the ExtensionReference type for use -// with apply. -type ExtensionReferenceApplyConfiguration struct { - Group *apiv1.Group `json:"group,omitempty"` - Kind *apiv1.Kind `json:"kind,omitempty"` - Name *apiv1.ObjectName `json:"name,omitempty"` - PortNumber *apiv1.PortNumber `json:"portNumber,omitempty"` -} - -// ExtensionReferenceApplyConfiguration constructs a declarative configuration of the ExtensionReference type for use with -// apply. -func ExtensionReference() *ExtensionReferenceApplyConfiguration { - return &ExtensionReferenceApplyConfiguration{} -} - -// WithGroup sets the Group field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Group field is set to the value of the last call. -func (b *ExtensionReferenceApplyConfiguration) WithGroup(value apiv1.Group) *ExtensionReferenceApplyConfiguration { - b.Group = &value - return b -} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *ExtensionReferenceApplyConfiguration) WithKind(value apiv1.Kind) *ExtensionReferenceApplyConfiguration { - b.Kind = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ExtensionReferenceApplyConfiguration) WithName(value apiv1.ObjectName) *ExtensionReferenceApplyConfiguration { - b.Name = &value - return b -} - -// WithPortNumber sets the PortNumber field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PortNumber field is set to the value of the last call. -func (b *ExtensionReferenceApplyConfiguration) WithPortNumber(value apiv1.PortNumber) *ExtensionReferenceApplyConfiguration { - b.PortNumber = &value - return b -} diff --git a/client-go/applyconfiguration/api/v1/inferencepoolspec.go b/client-go/applyconfiguration/api/v1/inferencepoolspec.go index d9c08b238..4831a4434 100644 --- a/client-go/applyconfiguration/api/v1/inferencepoolspec.go +++ b/client-go/applyconfiguration/api/v1/inferencepoolspec.go @@ -25,9 +25,9 @@ import ( // InferencePoolSpecApplyConfiguration represents a declarative configuration of the InferencePoolSpec type for use // with apply. type InferencePoolSpecApplyConfiguration struct { - Selector map[apiv1.LabelKey]apiv1.LabelValue `json:"selector,omitempty"` - TargetPortNumber *int32 `json:"targetPortNumber,omitempty"` - EndpointPickerConfigApplyConfiguration `json:",inline"` + Selector map[apiv1.LabelKey]apiv1.LabelValue `json:"selector,omitempty"` + TargetPortNumber *int32 `json:"targetPortNumber,omitempty"` + ExtensionRef *ExtensionApplyConfiguration `json:"extensionRef,omitempty"` } // InferencePoolSpecApplyConfiguration constructs a declarative configuration of the InferencePoolSpec type for use with @@ -62,6 +62,6 @@ func (b *InferencePoolSpecApplyConfiguration) WithTargetPortNumber(value int32) // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the ExtensionRef field is set to the value of the last call. func (b *InferencePoolSpecApplyConfiguration) WithExtensionRef(value *ExtensionApplyConfiguration) *InferencePoolSpecApplyConfiguration { - b.EndpointPickerConfigApplyConfiguration.ExtensionRef = value + b.ExtensionRef = value return b } diff --git a/client-go/applyconfiguration/apix/v1alpha2/extension.go b/client-go/applyconfiguration/apix/v1alpha2/extension.go index e3690f965..2f40a611d 100644 --- a/client-go/applyconfiguration/apix/v1alpha2/extension.go +++ b/client-go/applyconfiguration/apix/v1alpha2/extension.go @@ -25,8 +25,11 @@ import ( // ExtensionApplyConfiguration represents a declarative configuration of the Extension type for use // with apply. type ExtensionApplyConfiguration struct { - ExtensionReferenceApplyConfiguration `json:",inline"` - ExtensionConnectionApplyConfiguration `json:",inline"` + Group *apixv1alpha2.Group `json:"group,omitempty"` + Kind *apixv1alpha2.Kind `json:"kind,omitempty"` + Name *apixv1alpha2.ObjectName `json:"name,omitempty"` + PortNumber *apixv1alpha2.PortNumber `json:"portNumber,omitempty"` + FailureMode *apixv1alpha2.ExtensionFailureMode `json:"failureMode,omitempty"` } // ExtensionApplyConfiguration constructs a declarative configuration of the Extension type for use with @@ -39,7 +42,7 @@ func Extension() *ExtensionApplyConfiguration { // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Group field is set to the value of the last call. func (b *ExtensionApplyConfiguration) WithGroup(value apixv1alpha2.Group) *ExtensionApplyConfiguration { - b.ExtensionReferenceApplyConfiguration.Group = &value + b.Group = &value return b } @@ -47,7 +50,7 @@ func (b *ExtensionApplyConfiguration) WithGroup(value apixv1alpha2.Group) *Exten // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Kind field is set to the value of the last call. func (b *ExtensionApplyConfiguration) WithKind(value apixv1alpha2.Kind) *ExtensionApplyConfiguration { - b.ExtensionReferenceApplyConfiguration.Kind = &value + b.Kind = &value return b } @@ -55,7 +58,7 @@ func (b *ExtensionApplyConfiguration) WithKind(value apixv1alpha2.Kind) *Extensi // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the Name field is set to the value of the last call. func (b *ExtensionApplyConfiguration) WithName(value apixv1alpha2.ObjectName) *ExtensionApplyConfiguration { - b.ExtensionReferenceApplyConfiguration.Name = &value + b.Name = &value return b } @@ -63,7 +66,7 @@ func (b *ExtensionApplyConfiguration) WithName(value apixv1alpha2.ObjectName) *E // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the PortNumber field is set to the value of the last call. func (b *ExtensionApplyConfiguration) WithPortNumber(value apixv1alpha2.PortNumber) *ExtensionApplyConfiguration { - b.ExtensionReferenceApplyConfiguration.PortNumber = &value + b.PortNumber = &value return b } @@ -71,6 +74,6 @@ func (b *ExtensionApplyConfiguration) WithPortNumber(value apixv1alpha2.PortNumb // and returns the receiver, so that objects can be built by chaining "With" function invocations. // If called multiple times, the FailureMode field is set to the value of the last call. func (b *ExtensionApplyConfiguration) WithFailureMode(value apixv1alpha2.ExtensionFailureMode) *ExtensionApplyConfiguration { - b.ExtensionConnectionApplyConfiguration.FailureMode = &value + b.FailureMode = &value return b } diff --git a/client-go/applyconfiguration/apix/v1alpha2/extensionconnection.go b/client-go/applyconfiguration/apix/v1alpha2/extensionconnection.go deleted file mode 100644 index 17c1c6f72..000000000 --- a/client-go/applyconfiguration/apix/v1alpha2/extensionconnection.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - apixv1alpha2 "sigs.k8s.io/gateway-api-inference-extension/apix/v1alpha2" -) - -// ExtensionConnectionApplyConfiguration represents a declarative configuration of the ExtensionConnection type for use -// with apply. -type ExtensionConnectionApplyConfiguration struct { - FailureMode *apixv1alpha2.ExtensionFailureMode `json:"failureMode,omitempty"` -} - -// ExtensionConnectionApplyConfiguration constructs a declarative configuration of the ExtensionConnection type for use with -// apply. -func ExtensionConnection() *ExtensionConnectionApplyConfiguration { - return &ExtensionConnectionApplyConfiguration{} -} - -// WithFailureMode sets the FailureMode field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the FailureMode field is set to the value of the last call. -func (b *ExtensionConnectionApplyConfiguration) WithFailureMode(value apixv1alpha2.ExtensionFailureMode) *ExtensionConnectionApplyConfiguration { - b.FailureMode = &value - return b -} diff --git a/client-go/applyconfiguration/apix/v1alpha2/extensionreference.go b/client-go/applyconfiguration/apix/v1alpha2/extensionreference.go deleted file mode 100644 index 1142cf208..000000000 --- a/client-go/applyconfiguration/apix/v1alpha2/extensionreference.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -Copyright The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - apixv1alpha2 "sigs.k8s.io/gateway-api-inference-extension/apix/v1alpha2" -) - -// ExtensionReferenceApplyConfiguration represents a declarative configuration of the ExtensionReference type for use -// with apply. -type ExtensionReferenceApplyConfiguration struct { - Group *apixv1alpha2.Group `json:"group,omitempty"` - Kind *apixv1alpha2.Kind `json:"kind,omitempty"` - Name *apixv1alpha2.ObjectName `json:"name,omitempty"` - PortNumber *apixv1alpha2.PortNumber `json:"portNumber,omitempty"` -} - -// ExtensionReferenceApplyConfiguration constructs a declarative configuration of the ExtensionReference type for use with -// apply. -func ExtensionReference() *ExtensionReferenceApplyConfiguration { - return &ExtensionReferenceApplyConfiguration{} -} - -// WithGroup sets the Group field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Group field is set to the value of the last call. -func (b *ExtensionReferenceApplyConfiguration) WithGroup(value apixv1alpha2.Group) *ExtensionReferenceApplyConfiguration { - b.Group = &value - return b -} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *ExtensionReferenceApplyConfiguration) WithKind(value apixv1alpha2.Kind) *ExtensionReferenceApplyConfiguration { - b.Kind = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ExtensionReferenceApplyConfiguration) WithName(value apixv1alpha2.ObjectName) *ExtensionReferenceApplyConfiguration { - b.Name = &value - return b -} - -// WithPortNumber sets the PortNumber field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PortNumber field is set to the value of the last call. -func (b *ExtensionReferenceApplyConfiguration) WithPortNumber(value apixv1alpha2.PortNumber) *ExtensionReferenceApplyConfiguration { - b.PortNumber = &value - return b -} diff --git a/client-go/applyconfiguration/utils.go b/client-go/applyconfiguration/utils.go index 46895d8f0..2f0ce2d38 100644 --- a/client-go/applyconfiguration/utils.go +++ b/client-go/applyconfiguration/utils.go @@ -34,14 +34,8 @@ import ( func ForKind(kind schema.GroupVersionKind) interface{} { switch kind { // Group=inference.networking.k8s.io, Version=v1 - case v1.SchemeGroupVersion.WithKind("EndpointPickerConfig"): - return &apiv1.EndpointPickerConfigApplyConfiguration{} case v1.SchemeGroupVersion.WithKind("Extension"): return &apiv1.ExtensionApplyConfiguration{} - case v1.SchemeGroupVersion.WithKind("ExtensionConnection"): - return &apiv1.ExtensionConnectionApplyConfiguration{} - case v1.SchemeGroupVersion.WithKind("ExtensionReference"): - return &apiv1.ExtensionReferenceApplyConfiguration{} case v1.SchemeGroupVersion.WithKind("InferencePool"): return &apiv1.InferencePoolApplyConfiguration{} case v1.SchemeGroupVersion.WithKind("InferencePoolSpec"): @@ -58,10 +52,6 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &apixv1alpha2.EndpointPickerConfigApplyConfiguration{} case v1alpha2.SchemeGroupVersion.WithKind("Extension"): return &apixv1alpha2.ExtensionApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("ExtensionConnection"): - return &apixv1alpha2.ExtensionConnectionApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("ExtensionReference"): - return &apixv1alpha2.ExtensionReferenceApplyConfiguration{} case v1alpha2.SchemeGroupVersion.WithKind("InferenceObjective"): return &apixv1alpha2.InferenceObjectiveApplyConfiguration{} case v1alpha2.SchemeGroupVersion.WithKind("InferenceObjectiveSpec"): diff --git a/conformance/conformance.go b/conformance/conformance.go index 6aebd6973..9a7cad300 100644 --- a/conformance/conformance.go +++ b/conformance/conformance.go @@ -15,7 +15,7 @@ limitations under the License. */ // Package conformance contains the core setup and execution logic -// for the Gateway API Inference Extension conformance test suite. +// for the Gateway API Inference ExtensionRef conformance test suite. package conformance import ( @@ -54,7 +54,7 @@ import ( ) // GatewayLayerProfileName defines the name for the conformance profile that tests -// the Gateway API layer aspects of the Inference Extension (e.g., InferencePool, InferenceObjective CRDs). +// the Gateway API layer aspects of the Inference ExtensionRef (e.g., InferencePool, InferenceObjective CRDs). // Future profiles will cover EPP and ModelServer layers. const GatewayLayerProfileName confsuite.ConformanceProfileName = "Gateway" @@ -66,7 +66,7 @@ const GatewayLayerProfileName confsuite.ConformanceProfileName = "Gateway" const SupportInferencePool features.FeatureName = "SupportInferencePool" // InferenceCoreFeatures defines the core features that implementations -// of the "Gateway" profile for the Inference Extension MUST support. +// of the "Gateway" profile for the Inference ExtensionRef MUST support. var InferenceCoreFeatures = sets.New( features.SupportGateway, // This is needed to ensure manifest gets applied during setup. features.SupportHTTPRoute, @@ -104,7 +104,7 @@ func DefaultOptions(t *testing.T) confsuite.ConformanceOptions { // Add APIExtensions types (for CRDs) require.NoError(t, apiextensionsv1.AddToScheme(scheme), "failed to add apiextensionsv1 types to scheme") - // Register Inference Extension API types + // Register Inference ExtensionRef API types t.Logf("Attempting to install inferencev1alpha2 types into scheme from package: %s", inferencev1alpha2.GroupName) require.NoError(t, inferencev1alpha2.Install(scheme), "failed to install inferencev1alpha2 types into scheme") t.Logf("Attempting to install inferencev1 types into scheme from package: %s", inferencev1.GroupName) @@ -134,7 +134,7 @@ func DefaultOptions(t *testing.T) confsuite.ConformanceOptions { *confflags.ImplementationContact, ) - // Inference Extension Specific Report Fields + // Inference ExtensionRef Specific Report Fields inferenceExtensionVersion := "v0.3.0" _ = inferenceExtensionVersion // Avoid unused variable error until implemented @@ -189,15 +189,15 @@ func DefaultOptions(t *testing.T) confsuite.ConformanceOptions { return opts } -// RunConformance runs the Inference Extension conformance tests using default options. +// RunConformance runs the Inference ExtensionRef conformance tests using default options. func RunConformance(t *testing.T) { RunConformanceWithOptions(t, DefaultOptions(t)) } -// RunConformanceWithOptions runs the Inference Extension conformance tests with specific options. +// RunConformanceWithOptions runs the Inference ExtensionRef conformance tests with specific options. func RunConformanceWithOptions(t *testing.T, opts confsuite.ConformanceOptions) { t.Helper() - t.Logf("Running Inference Extension conformance tests with GatewayClass %s", opts.GatewayClassName) + t.Logf("Running Inference ExtensionRef conformance tests with GatewayClass %s", opts.GatewayClassName) logDebugf(t, opts.Debug, "RunConformanceWithOptions: BaseManifests path being used by opts: %q", opts.BaseManifests) // Register the GatewayLayerProfile with the suite runner. @@ -211,13 +211,13 @@ func RunConformanceWithOptions(t *testing.T, opts confsuite.ConformanceOptions) SetupConformanceTestSuite(t, cSuite, opts, tests.ConformanceTests) - t.Log("Running Inference Extension conformance tests against all registered tests") + t.Log("Running Inference ExtensionRef conformance tests against all registered tests") err = cSuite.Run(t, tests.ConformanceTests) require.NoError(t, err, "error running conformance tests") // Generate and write the report if requested. if opts.ReportOutputPath != "" { - t.Log("Generating Inference Extension conformance report") + t.Log("Generating Inference ExtensionRef conformance report") report, err := cSuite.Report() // Use the existing report generation logic. require.NoError(t, err, "error generating conformance report") inferenceReport := GatewayAPIInferenceExtensionConformanceReport{ diff --git a/conformance/conformancereport.go b/conformance/conformancereport.go index 46df3acaa..b9421867f 100644 --- a/conformance/conformancereport.go +++ b/conformance/conformancereport.go @@ -15,7 +15,7 @@ limitations under the License. */ // Package conformance contains the core setup and execution logic -// for the Gateway API Inference Extension conformance test suite. +// for the Gateway API Inference ExtensionRef conformance test suite. package conformance import ( diff --git a/conformance/tests/main.go b/conformance/tests/main.go index fc66c7652..50a7d256a 100644 --- a/conformance/tests/main.go +++ b/conformance/tests/main.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Package tests is the root package for all Gateway API Inference Extension +// Package tests is the root package for all Gateway API Inference ExtensionRef // conformance test implementations. package tests @@ -30,6 +30,6 @@ import ( ) // ConformanceTests holds all the conformance tests definitions for the -// Gateway API Inference Extension suite. Tests are registered from other packages +// Gateway API Inference ExtensionRef suite. Tests are registered from other packages // using init() functions like the one in the basic package. var ConformanceTests []suite.ConformanceTest diff --git a/conformance/utils/assertions.go b/conformance/utils/assertions.go index ccd786556..2de784fbe 100644 --- a/conformance/utils/assertions.go +++ b/conformance/utils/assertions.go @@ -15,10 +15,10 @@ limitations under the License. */ // Package assertions contains custom assertion helper functions used within -// the Gateway API Inference Extension conformance test suite. +// the Gateway API Inference ExtensionRef conformance test suite. package assertions -// TODO: Implement custom assertion functions specific to Inference Extension testing. +// TODO: Implement custom assertion functions specific to Inference ExtensionRef testing. // Examples might include: // - Asserting specific fields or structures within an inference API response body. // - Asserting specific metrics reported by mock model servers or EPPs. diff --git a/pkg/epp/flowcontrol/controller/doc.go b/pkg/epp/flowcontrol/controller/doc.go index 8c96bbc18..25dbfb36e 100644 --- a/pkg/epp/flowcontrol/controller/doc.go +++ b/pkg/epp/flowcontrol/controller/doc.go @@ -47,7 +47,7 @@ limitations under the License. // # Architectural Deep Dive: The `EnqueueAndWait` Model // // A fundamental design choice is the synchronous, blocking `EnqueueAndWait` method. In the context of the Gateway API -// Inference Extension's Endpoint Picker (EPP), which operates as an Envoy External Processing (`ext_proc`) server, this +// Inference ExtensionRef's Endpoint Picker (EPP), which operates as an Envoy External Processing (`ext_proc`) server, this // model is deliberately chosen for its simplicity and robustness. // // - Alignment with `ext_proc`: The `ext_proc` protocol is stream-based. A single goroutine within the EPP manages the diff --git a/pkg/epp/metrics/metrics.go b/pkg/epp/metrics/metrics.go index acb2f0304..f563ccba5 100644 --- a/pkg/epp/metrics/metrics.go +++ b/pkg/epp/metrics/metrics.go @@ -231,7 +231,7 @@ var ( prometheus.GaugeOpts{ Subsystem: InferenceExtension, Name: "info", - Help: metricsutil.HelpMsgWithStability("General information of the current build of Inference Extension.", compbasemetrics.ALPHA), + Help: metricsutil.HelpMsgWithStability("General information of the current build of Inference ExtensionRef.", compbasemetrics.ALPHA), }, []string{"commit", "build_ref"}, ) diff --git a/pkg/epp/util/testing/wrappers.go b/pkg/epp/util/testing/wrappers.go index ce1b24b7d..ea8b94c2c 100644 --- a/pkg/epp/util/testing/wrappers.go +++ b/pkg/epp/util/testing/wrappers.go @@ -200,7 +200,7 @@ func (m *InferencePoolWrapper) TargetPortNumber(p int32) *InferencePoolWrapper { } func (m *InferencePoolWrapper) ExtensionRef(name string) *InferencePoolWrapper { - m.Spec.ExtensionRef = &v1.Extension{ExtensionReference: v1.ExtensionReference{Name: v1.ObjectName(name)}} + m.Spec.ExtensionRef = &v1.Extension{Name: v1.ObjectName(name)} return m } @@ -246,7 +246,7 @@ func (m *XInferencePoolWrapper) TargetPortNumber(p int32) *XInferencePoolWrapper } func (m *XInferencePoolWrapper) ExtensionRef(name string) *XInferencePoolWrapper { - m.Spec.ExtensionRef = &v1alpha2.Extension{ExtensionReference: v1alpha2.ExtensionReference{Name: v1alpha2.ObjectName(name)}} + m.Spec.ExtensionRef = &v1alpha2.Extension{Name: v1alpha2.ObjectName(name)} return m } diff --git a/test/e2e/epp/e2e_suite_test.go b/test/e2e/epp/e2e_suite_test.go index a40d586ef..273428a16 100644 --- a/test/e2e/epp/e2e_suite_test.go +++ b/test/e2e/epp/e2e_suite_test.go @@ -251,7 +251,7 @@ func getYamlsFromModelServerManifest(modelServerManifestPath string) []string { return modelServerManifestArray } -// createCRDs creates the Inference Extension CRDs used for testing. +// createCRDs creates the Inference ExtensionRef CRDs used for testing. func createCRDs(k8sClient client.Client, crds map[string]string) { for name, path := range crds { ginkgo.By("Creating CRD resource from manifest: " + path) diff --git a/test/e2e/epp/e2e_test.go b/test/e2e/epp/e2e_test.go index f94ca450e..5b19323c1 100644 --- a/test/e2e/epp/e2e_test.go +++ b/test/e2e/epp/e2e_test.go @@ -70,7 +70,7 @@ var _ = ginkgo.Describe("InferencePool", func() { }, existsTimeout, interval).Should(gomega.Succeed()) }) - ginkgo.When("The Inference Extension is running", func() { + ginkgo.When("The Inference ExtensionRef is running", func() { ginkgo.It("Should route traffic to target model servers", func() { for _, t := range []struct { api string