From 678486d33ee2c527d51f9d2c22ae4e461b08169d Mon Sep 17 00:00:00 2001 From: Xiyue Yu Date: Mon, 21 Jul 2025 17:58:57 -0700 Subject: [PATCH 1/3] v1 crd only # Conflicts: # config/crd/bases/inference.networking.x-k8s.io_inferencepools.yaml --- apix/v1alpha2/inferencepool_types.go | 261 +----------------- apix/v1alpha2/zz_generated.deepcopy.go | 185 ------------- .../apix/v1alpha2/endpointpickerconfig.go | 39 --- .../apix/v1alpha2/extension.go | 76 ----- .../apix/v1alpha2/extensionconnection.go | 43 --- .../apix/v1alpha2/extensionreference.go | 70 ----- .../apix/v1alpha2/inferencepool.go | 9 +- .../apix/v1alpha2/inferencepoolspec.go | 67 ----- .../apix/v1alpha2/inferencepoolstatus.go | 44 --- .../apix/v1alpha2/parentgatewayreference.go | 70 ----- .../apix/v1alpha2/poolstatus.go | 57 ---- client-go/applyconfiguration/utils.go | 16 -- ...ce.networking.x-k8s.io_inferencepools.yaml | 2 +- config/crd/kustomization.yaml | 1 - test/e2e/epp/e2e_suite_test.go | 3 - 15 files changed, 8 insertions(+), 935 deletions(-) delete mode 100644 client-go/applyconfiguration/apix/v1alpha2/endpointpickerconfig.go delete mode 100644 client-go/applyconfiguration/apix/v1alpha2/extension.go delete mode 100644 client-go/applyconfiguration/apix/v1alpha2/extensionconnection.go delete mode 100644 client-go/applyconfiguration/apix/v1alpha2/extensionreference.go delete mode 100644 client-go/applyconfiguration/apix/v1alpha2/inferencepoolspec.go delete mode 100644 client-go/applyconfiguration/apix/v1alpha2/inferencepoolstatus.go delete mode 100644 client-go/applyconfiguration/apix/v1alpha2/parentgatewayreference.go delete mode 100644 client-go/applyconfiguration/apix/v1alpha2/poolstatus.go diff --git a/apix/v1alpha2/inferencepool_types.go b/apix/v1alpha2/inferencepool_types.go index 0213d86e3..255544f7d 100644 --- a/apix/v1alpha2/inferencepool_types.go +++ b/apix/v1alpha2/inferencepool_types.go @@ -18,6 +18,7 @@ package v1alpha2 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "sigs.k8s.io/gateway-api-inference-extension/api/v1" ) // InferencePool is the Schema for the InferencePools API. @@ -28,17 +29,7 @@ import ( // +kubebuilder:subresource:status // +kubebuilder:storageversion // +genclient -type InferencePool struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec InferencePoolSpec `json:"spec,omitempty"` - - // Status defines the observed state of InferencePool. - // - // +kubebuilder:default={parent: {{parentRef: {kind: "Status", name: "default"}, conditions: {{type: "Accepted", status: "Unknown", reason: "Pending", message: "Waiting for controller", lastTransitionTime: "1970-01-01T00:00:00Z"}}}}} - Status InferencePoolStatus `json:"status,omitempty"` -} +type InferencePool v1.InferencePool // InferencePoolList contains a list of InferencePool. // @@ -48,251 +39,3 @@ type InferencePoolList struct { metav1.ListMeta `json:"metadata,omitempty"` Items []InferencePool `json:"items"` } - -// InferencePoolSpec defines the desired state of InferencePool -type InferencePoolSpec struct { - // Selector defines a map of labels to watch model server Pods - // that should be included in the InferencePool. - // In some cases, implementations may translate this field to a Service selector, so this matches the simple - // map used for Service selectors instead of the full Kubernetes LabelSelector type. - // If specified, it will be applied to match the model server pods in the same namespace as the InferencePool. - // Cross namesoace selector is not supported. - // - // +kubebuilder:validation:Required - Selector map[LabelKey]LabelValue `json:"selector"` - - // TargetPortNumber defines the port number to access the selected model server Pods. - // The number must be in the range 1 to 65535. - // - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=65535 - // +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 - ExtensionRef *Extension `json:"extensionRef,omitempty"` -} - -// 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. - // - // +optional - // +kubebuilder:default="" - Group *Group `json:"group,omitempty"` - - // Kind is the Kubernetes resource kind of the referent. - // - // 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 MUST NOT - // support ExternalName Services. - // - // +optional - // +kubebuilder:default=Service - Kind *Kind `json:"kind,omitempty"` - - // Name is the name of the referent. - // - // +kubebuilder:validation:Required - Name ObjectName `json:"name"` - - // The port number on the service running the extension. When unspecified, - // implementations SHOULD infer a default value of 9002 when the Kind is - // Service. - // - // +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. - // - // +optional - // +kubebuilder:default="FailClose" - FailureMode *ExtensionFailureMode `json:"failureMode"` -} - -// ExtensionFailureMode defines the options for how the gateway handles the case when the extension is not -// responsive. -// +kubebuilder:validation:Enum=FailOpen;FailClose -type ExtensionFailureMode string - -const ( - // FailOpen specifies that the proxy should forward the request to an endpoint of its picking when the Endpoint Picker fails. - FailOpen ExtensionFailureMode = "FailOpen" - // FailClose specifies that the proxy should drop the request when the Endpoint Picker fails. - FailClose ExtensionFailureMode = "FailClose" -) - -// InferencePoolStatus defines the observed state of InferencePool. -type InferencePoolStatus struct { - // Parents is a list of parent resources (usually Gateways) that are - // associated with the InferencePool, and the status of the InferencePool with respect to - // each parent. - // - // A maximum of 32 Gateways will be represented in this list. When the list contains - // `kind: Status, name: default`, it indicates that the InferencePool is not - // associated with any Gateway and a controller must perform the following: - // - // - Remove the parent when setting the "Accepted" condition. - // - Add the parent when the controller will no longer manage the InferencePool - // and no other parents exist. - // - // +kubebuilder:validation:MaxItems=32 - Parents []PoolStatus `json:"parent,omitempty"` -} - -// PoolStatus defines the observed state of InferencePool from a Gateway. -type PoolStatus struct { - // GatewayRef indicates the gateway that observed state of InferencePool. - GatewayRef ParentGatewayReference `json:"parentRef"` - - // Conditions track the state of the InferencePool. - // - // Known condition types are: - // - // * "Accepted" - // * "ResolvedRefs" - // - // +optional - // +listType=map - // +listMapKey=type - // +kubebuilder:validation:MaxItems=8 - // +kubebuilder:default={{type: "Accepted", status: "Unknown", reason:"Pending", message:"Waiting for controller", lastTransitionTime: "1970-01-01T00:00:00Z"}} - Conditions []metav1.Condition `json:"conditions,omitempty"` -} - -// InferencePoolConditionType is a type of condition for the InferencePool -type InferencePoolConditionType string - -// InferencePoolReason is the reason for a given InferencePoolConditionType -type InferencePoolReason string - -const ( - // This condition indicates whether the InferencePool has been accepted or rejected - // by a Gateway, and why. - // - // Possible reasons for this condition to be True are: - // - // * "Accepted" - // - // Possible reasons for this condition to be False are: - // - // * "NotSupportedByGateway" - // * "HTTPRouteNotAccepted" - // - // Possible reasons for this condition to be Unknown are: - // - // * "Pending" - // - // Controllers MAY raise this condition with other reasons, but should - // prefer to use the reasons listed above to improve interoperability. - InferencePoolConditionAccepted InferencePoolConditionType = "Accepted" - - // This reason is used with the "Accepted" condition when the InferencePool has been - // accepted by the Gateway. - InferencePoolReasonAccepted InferencePoolReason = "Accepted" - - // This reason is used with the "Accepted" condition when the InferencePool - // has not been accepted by a Gateway because the Gateway does not support - // InferencePool as a backend. - InferencePoolReasonNotSupportedByGateway InferencePoolReason = "NotSupportedByGateway" - - // This reason is used with the "Accepted" condition when the InferencePool is - // referenced by an HTTPRoute that has been rejected by the Gateway. The user - // should inspect the status of the referring HTTPRoute for the specific reason. - InferencePoolReasonHTTPRouteNotAccepted InferencePoolReason = "HTTPRouteNotAccepted" - - // This reason is used with the "Accepted" when a controller has not yet - // reconciled the InferencePool. - InferencePoolReasonPending InferencePoolReason = "Pending" -) - -const ( - // This condition indicates whether the controller was able to resolve all - // the object references for the InferencePool. - // - // Possible reasons for this condition to be True are: - // - // * "ResolvedRefs" - // - // Possible reasons for this condition to be False are: - // - // * "InvalidExtensionRef" - // - // Controllers MAY raise this condition with other reasons, but should - // prefer to use the reasons listed above to improve interoperability. - InferencePoolConditionResolvedRefs InferencePoolConditionType = "ResolvedRefs" - - // This reason is used with the "ResolvedRefs" condition when the condition - // is true. - 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 - // or API group, or a reference to a resource that can not be found. - InferencePoolReasonInvalidExtensionRef InferencePoolReason = "InvalidExtensionRef" -) - -// ParentGatewayReference identifies an API object including its namespace, -// defaulting to Gateway. -type ParentGatewayReference struct { - // Group is the group of the referent. - // - // +optional - // +kubebuilder:default="gateway.networking.k8s.io" - Group *Group `json:"group"` - - // Kind is kind of the referent. For example "Gateway". - // - // +optional - // +kubebuilder:default=Gateway - Kind *Kind `json:"kind"` - - // Name is the name of the referent. - Name ObjectName `json:"name"` - - // Namespace is the namespace of the referent. If not present, - // the namespace of the referent is assumed to be the same as - // the namespace of the referring object. - // - // +optional - Namespace *Namespace `json:"namespace,omitempty"` -} diff --git a/apix/v1alpha2/zz_generated.deepcopy.go b/apix/v1alpha2/zz_generated.deepcopy.go index f064480e1..c4c20f611 100644 --- a/apix/v1alpha2/zz_generated.deepcopy.go +++ b/apix/v1alpha2/zz_generated.deepcopy.go @@ -25,93 +25,6 @@ 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 - *out = new(Group) - **out = **in - } - if in.Kind != nil { - in, out := &in.Kind, &out.Kind - *out = new(Kind) - **out = **in - } - if in.PortNumber != nil { - in, out := &in.PortNumber, &out.PortNumber - *out = new(PortNumber) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtensionReference. -func (in *ExtensionReference) DeepCopy() *ExtensionReference { - if in == nil { - return nil - } - out := new(ExtensionReference) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *InferenceModel) DeepCopyInto(out *InferenceModel) { *out = *in @@ -280,81 +193,6 @@ func (in *InferencePoolList) DeepCopyObject() runtime.Object { return nil } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *InferencePoolSpec) DeepCopyInto(out *InferencePoolSpec) { - *out = *in - if in.Selector != nil { - in, out := &in.Selector, &out.Selector - *out = make(map[LabelKey]LabelValue, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - in.EndpointPickerConfig.DeepCopyInto(&out.EndpointPickerConfig) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InferencePoolSpec. -func (in *InferencePoolSpec) DeepCopy() *InferencePoolSpec { - if in == nil { - return nil - } - out := new(InferencePoolSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *InferencePoolStatus) DeepCopyInto(out *InferencePoolStatus) { - *out = *in - if in.Parents != nil { - in, out := &in.Parents, &out.Parents - *out = make([]PoolStatus, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InferencePoolStatus. -func (in *InferencePoolStatus) DeepCopy() *InferencePoolStatus { - if in == nil { - return nil - } - out := new(InferencePoolStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ParentGatewayReference) DeepCopyInto(out *ParentGatewayReference) { - *out = *in - if in.Group != nil { - in, out := &in.Group, &out.Group - *out = new(Group) - **out = **in - } - if in.Kind != nil { - in, out := &in.Kind, &out.Kind - *out = new(Kind) - **out = **in - } - if in.Namespace != nil { - in, out := &in.Namespace, &out.Namespace - *out = new(Namespace) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ParentGatewayReference. -func (in *ParentGatewayReference) DeepCopy() *ParentGatewayReference { - if in == nil { - return nil - } - out := new(ParentGatewayReference) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PoolObjectReference) DeepCopyInto(out *PoolObjectReference) { *out = *in @@ -370,29 +208,6 @@ func (in *PoolObjectReference) DeepCopy() *PoolObjectReference { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PoolStatus) DeepCopyInto(out *PoolStatus) { - *out = *in - in.GatewayRef.DeepCopyInto(&out.GatewayRef) - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]v1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PoolStatus. -func (in *PoolStatus) DeepCopy() *PoolStatus { - if in == nil { - return nil - } - out := new(PoolStatus) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TargetModel) DeepCopyInto(out *TargetModel) { *out = *in diff --git a/client-go/applyconfiguration/apix/v1alpha2/endpointpickerconfig.go b/client-go/applyconfiguration/apix/v1alpha2/endpointpickerconfig.go deleted file mode 100644 index 39d4d8de6..000000000 --- a/client-go/applyconfiguration/apix/v1alpha2/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 v1alpha2 - -// 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/apix/v1alpha2/extension.go b/client-go/applyconfiguration/apix/v1alpha2/extension.go deleted file mode 100644 index e3690f965..000000000 --- a/client-go/applyconfiguration/apix/v1alpha2/extension.go +++ /dev/null @@ -1,76 +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" -) - -// ExtensionApplyConfiguration represents a declarative configuration of the Extension type for use -// with apply. -type ExtensionApplyConfiguration struct { - ExtensionReferenceApplyConfiguration `json:",inline"` - ExtensionConnectionApplyConfiguration `json:",inline"` -} - -// ExtensionApplyConfiguration constructs a declarative configuration of the Extension type for use with -// apply. -func Extension() *ExtensionApplyConfiguration { - return &ExtensionApplyConfiguration{} -} - -// 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 *ExtensionApplyConfiguration) WithGroup(value apixv1alpha2.Group) *ExtensionApplyConfiguration { - b.ExtensionReferenceApplyConfiguration.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 *ExtensionApplyConfiguration) WithKind(value apixv1alpha2.Kind) *ExtensionApplyConfiguration { - b.ExtensionReferenceApplyConfiguration.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 *ExtensionApplyConfiguration) WithName(value apixv1alpha2.ObjectName) *ExtensionApplyConfiguration { - b.ExtensionReferenceApplyConfiguration.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 *ExtensionApplyConfiguration) WithPortNumber(value apixv1alpha2.PortNumber) *ExtensionApplyConfiguration { - b.ExtensionReferenceApplyConfiguration.PortNumber = &value - return b -} - -// 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 *ExtensionApplyConfiguration) WithFailureMode(value apixv1alpha2.ExtensionFailureMode) *ExtensionApplyConfiguration { - b.ExtensionConnectionApplyConfiguration.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/apix/v1alpha2/inferencepool.go b/client-go/applyconfiguration/apix/v1alpha2/inferencepool.go index 8cbd4e522..28425f7d5 100644 --- a/client-go/applyconfiguration/apix/v1alpha2/inferencepool.go +++ b/client-go/applyconfiguration/apix/v1alpha2/inferencepool.go @@ -22,6 +22,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" v1 "k8s.io/client-go/applyconfigurations/meta/v1" + apiv1 "sigs.k8s.io/gateway-api-inference-extension/client-go/applyconfiguration/api/v1" ) // InferencePoolApplyConfiguration represents a declarative configuration of the InferencePool type for use @@ -29,8 +30,8 @@ import ( type InferencePoolApplyConfiguration struct { v1.TypeMetaApplyConfiguration `json:",inline"` *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *InferencePoolSpecApplyConfiguration `json:"spec,omitempty"` - Status *InferencePoolStatusApplyConfiguration `json:"status,omitempty"` + Spec *apiv1.InferencePoolSpecApplyConfiguration `json:"spec,omitempty"` + Status *apiv1.InferencePoolStatusApplyConfiguration `json:"status,omitempty"` } // InferencePool constructs a declarative configuration of the InferencePool type for use with @@ -205,7 +206,7 @@ func (b *InferencePoolApplyConfiguration) ensureObjectMetaApplyConfigurationExis // WithSpec sets the Spec 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 Spec field is set to the value of the last call. -func (b *InferencePoolApplyConfiguration) WithSpec(value *InferencePoolSpecApplyConfiguration) *InferencePoolApplyConfiguration { +func (b *InferencePoolApplyConfiguration) WithSpec(value *apiv1.InferencePoolSpecApplyConfiguration) *InferencePoolApplyConfiguration { b.Spec = value return b } @@ -213,7 +214,7 @@ func (b *InferencePoolApplyConfiguration) WithSpec(value *InferencePoolSpecApply // WithStatus sets the Status 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 Status field is set to the value of the last call. -func (b *InferencePoolApplyConfiguration) WithStatus(value *InferencePoolStatusApplyConfiguration) *InferencePoolApplyConfiguration { +func (b *InferencePoolApplyConfiguration) WithStatus(value *apiv1.InferencePoolStatusApplyConfiguration) *InferencePoolApplyConfiguration { b.Status = value return b } diff --git a/client-go/applyconfiguration/apix/v1alpha2/inferencepoolspec.go b/client-go/applyconfiguration/apix/v1alpha2/inferencepoolspec.go deleted file mode 100644 index 8773d9c03..000000000 --- a/client-go/applyconfiguration/apix/v1alpha2/inferencepoolspec.go +++ /dev/null @@ -1,67 +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" -) - -// InferencePoolSpecApplyConfiguration represents a declarative configuration of the InferencePoolSpec type for use -// with apply. -type InferencePoolSpecApplyConfiguration struct { - Selector map[apixv1alpha2.LabelKey]apixv1alpha2.LabelValue `json:"selector,omitempty"` - TargetPortNumber *int32 `json:"targetPortNumber,omitempty"` - EndpointPickerConfigApplyConfiguration `json:",inline"` -} - -// InferencePoolSpecApplyConfiguration constructs a declarative configuration of the InferencePoolSpec type for use with -// apply. -func InferencePoolSpec() *InferencePoolSpecApplyConfiguration { - return &InferencePoolSpecApplyConfiguration{} -} - -// WithSelector puts the entries into the Selector field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Selector field, -// overwriting an existing map entries in Selector field with the same key. -func (b *InferencePoolSpecApplyConfiguration) WithSelector(entries map[apixv1alpha2.LabelKey]apixv1alpha2.LabelValue) *InferencePoolSpecApplyConfiguration { - if b.Selector == nil && len(entries) > 0 { - b.Selector = make(map[apixv1alpha2.LabelKey]apixv1alpha2.LabelValue, len(entries)) - } - for k, v := range entries { - b.Selector[k] = v - } - return b -} - -// WithTargetPortNumber sets the TargetPortNumber 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 TargetPortNumber field is set to the value of the last call. -func (b *InferencePoolSpecApplyConfiguration) WithTargetPortNumber(value int32) *InferencePoolSpecApplyConfiguration { - b.TargetPortNumber = &value - return b -} - -// 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 *InferencePoolSpecApplyConfiguration) WithExtensionRef(value *ExtensionApplyConfiguration) *InferencePoolSpecApplyConfiguration { - b.EndpointPickerConfigApplyConfiguration.ExtensionRef = value - return b -} diff --git a/client-go/applyconfiguration/apix/v1alpha2/inferencepoolstatus.go b/client-go/applyconfiguration/apix/v1alpha2/inferencepoolstatus.go deleted file mode 100644 index 831059e2f..000000000 --- a/client-go/applyconfiguration/apix/v1alpha2/inferencepoolstatus.go +++ /dev/null @@ -1,44 +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 - -// InferencePoolStatusApplyConfiguration represents a declarative configuration of the InferencePoolStatus type for use -// with apply. -type InferencePoolStatusApplyConfiguration struct { - Parents []PoolStatusApplyConfiguration `json:"parent,omitempty"` -} - -// InferencePoolStatusApplyConfiguration constructs a declarative configuration of the InferencePoolStatus type for use with -// apply. -func InferencePoolStatus() *InferencePoolStatusApplyConfiguration { - return &InferencePoolStatusApplyConfiguration{} -} - -// WithParents adds the given value to the Parents field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Parents field. -func (b *InferencePoolStatusApplyConfiguration) WithParents(values ...*PoolStatusApplyConfiguration) *InferencePoolStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithParents") - } - b.Parents = append(b.Parents, *values[i]) - } - return b -} diff --git a/client-go/applyconfiguration/apix/v1alpha2/parentgatewayreference.go b/client-go/applyconfiguration/apix/v1alpha2/parentgatewayreference.go deleted file mode 100644 index dd02dcadb..000000000 --- a/client-go/applyconfiguration/apix/v1alpha2/parentgatewayreference.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" -) - -// ParentGatewayReferenceApplyConfiguration represents a declarative configuration of the ParentGatewayReference type for use -// with apply. -type ParentGatewayReferenceApplyConfiguration struct { - Group *apixv1alpha2.Group `json:"group,omitempty"` - Kind *apixv1alpha2.Kind `json:"kind,omitempty"` - Name *apixv1alpha2.ObjectName `json:"name,omitempty"` - Namespace *apixv1alpha2.Namespace `json:"namespace,omitempty"` -} - -// ParentGatewayReferenceApplyConfiguration constructs a declarative configuration of the ParentGatewayReference type for use with -// apply. -func ParentGatewayReference() *ParentGatewayReferenceApplyConfiguration { - return &ParentGatewayReferenceApplyConfiguration{} -} - -// 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 *ParentGatewayReferenceApplyConfiguration) WithGroup(value apixv1alpha2.Group) *ParentGatewayReferenceApplyConfiguration { - 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 *ParentGatewayReferenceApplyConfiguration) WithKind(value apixv1alpha2.Kind) *ParentGatewayReferenceApplyConfiguration { - 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 *ParentGatewayReferenceApplyConfiguration) WithName(value apixv1alpha2.ObjectName) *ParentGatewayReferenceApplyConfiguration { - b.Name = &value - return b -} - -// WithNamespace sets the Namespace 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 Namespace field is set to the value of the last call. -func (b *ParentGatewayReferenceApplyConfiguration) WithNamespace(value apixv1alpha2.Namespace) *ParentGatewayReferenceApplyConfiguration { - b.Namespace = &value - return b -} diff --git a/client-go/applyconfiguration/apix/v1alpha2/poolstatus.go b/client-go/applyconfiguration/apix/v1alpha2/poolstatus.go deleted file mode 100644 index fcc0ddfb2..000000000 --- a/client-go/applyconfiguration/apix/v1alpha2/poolstatus.go +++ /dev/null @@ -1,57 +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 ( - v1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// PoolStatusApplyConfiguration represents a declarative configuration of the PoolStatus type for use -// with apply. -type PoolStatusApplyConfiguration struct { - GatewayRef *ParentGatewayReferenceApplyConfiguration `json:"parentRef,omitempty"` - Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` -} - -// PoolStatusApplyConfiguration constructs a declarative configuration of the PoolStatus type for use with -// apply. -func PoolStatus() *PoolStatusApplyConfiguration { - return &PoolStatusApplyConfiguration{} -} - -// WithGatewayRef sets the GatewayRef 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 GatewayRef field is set to the value of the last call. -func (b *PoolStatusApplyConfiguration) WithGatewayRef(value *ParentGatewayReferenceApplyConfiguration) *PoolStatusApplyConfiguration { - b.GatewayRef = value - return b -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *PoolStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *PoolStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.Conditions = append(b.Conditions, *values[i]) - } - return b -} diff --git a/client-go/applyconfiguration/utils.go b/client-go/applyconfiguration/utils.go index bdcbad045..4b6e07420 100644 --- a/client-go/applyconfiguration/utils.go +++ b/client-go/applyconfiguration/utils.go @@ -54,14 +54,6 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &apiv1.PoolStatusApplyConfiguration{} // Group=inference.networking.x-k8s.io, Version=v1alpha2 - case v1alpha2.SchemeGroupVersion.WithKind("EndpointPickerConfig"): - 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("InferenceModel"): return &apixv1alpha2.InferenceModelApplyConfiguration{} case v1alpha2.SchemeGroupVersion.WithKind("InferenceModelSpec"): @@ -70,16 +62,8 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &apixv1alpha2.InferenceModelStatusApplyConfiguration{} case v1alpha2.SchemeGroupVersion.WithKind("InferencePool"): return &apixv1alpha2.InferencePoolApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("InferencePoolSpec"): - return &apixv1alpha2.InferencePoolSpecApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("InferencePoolStatus"): - return &apixv1alpha2.InferencePoolStatusApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("ParentGatewayReference"): - return &apixv1alpha2.ParentGatewayReferenceApplyConfiguration{} case v1alpha2.SchemeGroupVersion.WithKind("PoolObjectReference"): return &apixv1alpha2.PoolObjectReferenceApplyConfiguration{} - case v1alpha2.SchemeGroupVersion.WithKind("PoolStatus"): - return &apixv1alpha2.PoolStatusApplyConfiguration{} case v1alpha2.SchemeGroupVersion.WithKind("TargetModel"): return &apixv1alpha2.TargetModelApplyConfiguration{} diff --git a/config/crd/bases/inference.networking.x-k8s.io_inferencepools.yaml b/config/crd/bases/inference.networking.x-k8s.io_inferencepools.yaml index 138734e7e..68144f906 100644 --- a/config/crd/bases/inference.networking.x-k8s.io_inferencepools.yaml +++ b/config/crd/bases/inference.networking.x-k8s.io_inferencepools.yaml @@ -3,7 +3,7 @@ kind: CustomResourceDefinition metadata: annotations: api-approved.kubernetes.io: unapproved, experimental-only - inference.networking.k8s.io/bundle-version: main-dev + inference.networking.k8s.io/bundle-version: v1.0.0-dev creationTimestamp: null name: inferencepools.inference.networking.x-k8s.io spec: diff --git a/config/crd/kustomization.yaml b/config/crd/kustomization.yaml index d8d64ae34..ab280fe5a 100644 --- a/config/crd/kustomization.yaml +++ b/config/crd/kustomization.yaml @@ -2,7 +2,6 @@ # since it depends on service name and namespace that are out of this kustomize package. # It should be run by config/default resources: -- bases/inference.networking.x-k8s.io_inferencepools.yaml - bases/inference.networking.x-k8s.io_inferencemodels.yaml - bases/inference.networking.k8s.io_inferencepools.yaml # +kubebuilder:scaffold:crdkustomizeresource diff --git a/test/e2e/epp/e2e_suite_test.go b/test/e2e/epp/e2e_suite_test.go index e4ca60475..b3e37871c 100644 --- a/test/e2e/epp/e2e_suite_test.go +++ b/test/e2e/epp/e2e_suite_test.go @@ -79,8 +79,6 @@ const ( clientManifest = "../../testdata/client.yaml" // modelServerSecretManifest is the manifest for the model server secret resource. modelServerSecretManifest = "../../testdata/model-secret.yaml" - // xInferPoolManifest is the manifest for the inference pool CRD with 'inference.networking.x-k8s.io' group. - xInferPoolManifest = "../../../config/crd/bases/inference.networking.x-k8s.io_inferencepools.yaml" // xInferModelManifest is the manifest for the inference model CRD with 'inference.networking.x-k8s.io' group. xInferModelManifest = "../../../config/crd/bases/inference.networking.x-k8s.io_inferencemodels.yaml" // inferPoolManifest is the manifest for the inference pool CRD with 'inference.networking.k8s.io' group. @@ -140,7 +138,6 @@ func setupInfra() { createHfSecret(cli, modelServerSecretManifest) } crds := map[string]string{ - "inferencepools.inference.networking.x-k8s.io": xInferPoolManifest, "inferencemodels.inference.networking.x-k8s.io": xInferModelManifest, "inferencepools.inference.networking.k8s.io": inferPoolManifest, } From 2800ae8dee0bb0cf57f3fab6651ede4a1e8609de Mon Sep 17 00:00:00 2001 From: Xiyue Yu Date: Tue, 22 Jul 2025 09:53:29 -0700 Subject: [PATCH 2/3] fixed verify pipeline --- apix/v1alpha2/inferencepool_types.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apix/v1alpha2/inferencepool_types.go b/apix/v1alpha2/inferencepool_types.go index 255544f7d..356eaba8e 100644 --- a/apix/v1alpha2/inferencepool_types.go +++ b/apix/v1alpha2/inferencepool_types.go @@ -18,7 +18,7 @@ package v1alpha2 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "sigs.k8s.io/gateway-api-inference-extension/api/v1" + v1 "sigs.k8s.io/gateway-api-inference-extension/api/v1" ) // InferencePool is the Schema for the InferencePools API. From b988eac3e2b55496e2642e11385b7db1a4492b23 Mon Sep 17 00:00:00 2001 From: Xiyue Yu Date: Mon, 28 Jul 2025 14:37:42 -0700 Subject: [PATCH 3/3] resolve merge conflicts --- ...ce.networking.x-k8s.io_inferencepools.yaml | 292 ------------------ 1 file changed, 292 deletions(-) delete mode 100644 config/crd/bases/inference.networking.x-k8s.io_inferencepools.yaml diff --git a/config/crd/bases/inference.networking.x-k8s.io_inferencepools.yaml b/config/crd/bases/inference.networking.x-k8s.io_inferencepools.yaml deleted file mode 100644 index 68144f906..000000000 --- a/config/crd/bases/inference.networking.x-k8s.io_inferencepools.yaml +++ /dev/null @@ -1,292 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - api-approved.kubernetes.io: unapproved, experimental-only - inference.networking.k8s.io/bundle-version: v1.0.0-dev - creationTimestamp: null - name: inferencepools.inference.networking.x-k8s.io -spec: - group: inference.networking.x-k8s.io - names: - kind: InferencePool - listKind: InferencePoolList - plural: inferencepools - singular: inferencepool - scope: Namespaced - versions: - - name: v1alpha2 - schema: - openAPIV3Schema: - description: | - InferencePool is the Schema for the InferencePools API. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: InferencePoolSpec defines the desired state of InferencePool - properties: - extensionRef: - description: Extension configures an endpoint picker as an extension - service. - properties: - failureMode: - default: FailClose - description: |- - Configures how the gateway handles the case when the extension is not responsive. - Defaults to failClose. - enum: - - FailOpen - - FailClose - type: string - group: - default: "" - description: |- - Group is the group of the referent. - The default value is "", representing the Core API group. - maxLength: 253 - pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ - type: string - kind: - default: Service - description: |- - Kind is the Kubernetes resource kind of the referent. - - 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 MUST NOT - support ExternalName Services. - maxLength: 63 - minLength: 1 - pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ - type: string - name: - description: Name is the name of the referent. - maxLength: 253 - minLength: 1 - type: string - portNumber: - description: |- - The port number on the service running the extension. When unspecified, - implementations SHOULD infer a default value of 9002 when the Kind is - Service. - format: int32 - maximum: 65535 - minimum: 1 - type: integer - required: - - name - type: object - selector: - additionalProperties: - description: |- - LabelValue is the value of a label. This is used for validation - of maps. This matches the Kubernetes label validation rules: - * must be 63 characters or less (can be empty), - * unless empty, must begin and end with an alphanumeric character ([a-z0-9A-Z]), - * could contain dashes (-), underscores (_), dots (.), and alphanumerics between. - - Valid values include: - - * MyValue - * my.name - * 123-my-value - maxLength: 63 - minLength: 0 - pattern: ^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$ - type: string - description: |- - Selector defines a map of labels to watch model server Pods - that should be included in the InferencePool. - In some cases, implementations may translate this field to a Service selector, so this matches the simple - map used for Service selectors instead of the full Kubernetes LabelSelector type. - If specified, it will be applied to match the model server pods in the same namespace as the InferencePool. - Cross namesoace selector is not supported. - type: object - targetPortNumber: - description: |- - TargetPortNumber defines the port number to access the selected model server Pods. - The number must be in the range 1 to 65535. - format: int32 - maximum: 65535 - minimum: 1 - type: integer - required: - - extensionRef - - selector - - targetPortNumber - type: object - status: - default: - parent: - - conditions: - - lastTransitionTime: "1970-01-01T00:00:00Z" - message: Waiting for controller - reason: Pending - status: Unknown - type: Accepted - parentRef: - kind: Status - name: default - description: Status defines the observed state of InferencePool. - properties: - parent: - description: |- - Parents is a list of parent resources (usually Gateways) that are - associated with the InferencePool, and the status of the InferencePool with respect to - each parent. - - A maximum of 32 Gateways will be represented in this list. When the list contains - `kind: Status, name: default`, it indicates that the InferencePool is not - associated with any Gateway and a controller must perform the following: - - - Remove the parent when setting the "Accepted" condition. - - Add the parent when the controller will no longer manage the InferencePool - and no other parents exist. - items: - description: PoolStatus defines the observed state of InferencePool - from a Gateway. - properties: - conditions: - default: - - lastTransitionTime: "1970-01-01T00:00:00Z" - message: Waiting for controller - reason: Pending - status: Unknown - type: Accepted - description: |- - Conditions track the state of the InferencePool. - - Known condition types are: - - * "Accepted" - * "ResolvedRefs" - items: - description: Condition contains details for one aspect of - the current state of this API Resource. - properties: - lastTransitionTime: - description: |- - lastTransitionTime is the last time the condition transitioned from one status to another. - This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ - type: string - status: - description: status of the condition, one of True, False, - Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: type of condition in CamelCase or in foo.example.com/CamelCase. - maxLength: 316 - pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ - type: string - required: - - lastTransitionTime - - message - - reason - - status - - type - type: object - maxItems: 8 - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - parentRef: - description: GatewayRef indicates the gateway that observed - state of InferencePool. - properties: - group: - default: gateway.networking.k8s.io - description: Group is the group of the referent. - maxLength: 253 - pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ - type: string - kind: - default: Gateway - description: Kind is kind of the referent. For example "Gateway". - maxLength: 63 - minLength: 1 - pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ - type: string - name: - description: Name is the name of the referent. - maxLength: 253 - minLength: 1 - type: string - namespace: - description: |- - Namespace is the namespace of the referent. If not present, - the namespace of the referent is assumed to be the same as - the namespace of the referring object. - maxLength: 63 - minLength: 1 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - required: - - name - type: object - required: - - parentRef - type: object - maxItems: 32 - type: array - type: object - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: null - storedVersions: null