diff --git a/apix/v1alpha2/inferencepool_conversion.go b/apix/v1alpha2/inferencepool_conversion.go
deleted file mode 100644
index 01520dc4b..000000000
--- a/apix/v1alpha2/inferencepool_conversion.go
+++ /dev/null
@@ -1,285 +0,0 @@
-/*
-Copyright 2025 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.
-*/
-
-package v1alpha2
-
-import (
- "errors"
-
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- "k8s.io/utils/ptr"
-
- v1 "sigs.k8s.io/gateway-api-inference-extension/api/v1"
-)
-
-// ConvertTo converts this InferencePool (v1alpha2) to the v1 version.
-func (src *InferencePool) ConvertTo(dst *v1.InferencePool) error {
- if dst == nil {
- return errors.New("dst cannot be nil")
- }
- endpointPickRef, err := convertExtensionRefToV1(&src.Spec.ExtensionRef)
- if err != nil {
- return err
- }
- v1Status, err := convertStatusToV1(&src.Status)
- if err != nil {
- return err
- }
-
- meta := metav1.TypeMeta{
- Kind: src.Kind,
- APIVersion: v1.GroupVersion.String(), // Ensure the API version is set correctly.
- }
- dst.TypeMeta = meta
- dst.ObjectMeta = src.ObjectMeta
- dst.Spec.TargetPorts = []v1.Port{{Number: v1.PortNumber(src.Spec.TargetPortNumber)}}
- dst.Spec.EndpointPickerRef = endpointPickRef
- dst.Status = *v1Status
-
- if src.Spec.Selector != nil {
- dst.Spec.Selector.MatchLabels = make(map[v1.LabelKey]v1.LabelValue, len(src.Spec.Selector))
- for k, v := range src.Spec.Selector {
- dst.Spec.Selector.MatchLabels[v1.LabelKey(k)] = v1.LabelValue(v)
- }
- }
- return nil
-}
-
-// ConvertFrom converts from the v1 version to this version (v1alpha2).
-func (dst *InferencePool) ConvertFrom(src *v1.InferencePool) error {
- if src == nil {
- return errors.New("src cannot be nil")
- }
- extensionRef, err := convertEndpointPickerRefFromV1(&src.Spec.EndpointPickerRef)
- if err != nil {
- return err
- }
- status, err := convertStatusFromV1(&src.Status)
- if err != nil {
- return err
- }
-
- meta := metav1.TypeMeta{
- Kind: src.Kind,
- APIVersion: GroupVersion.String(), // Ensure the API version is set correctly.
- }
- dst.TypeMeta = meta
- dst.ObjectMeta = src.ObjectMeta
- dst.Spec.TargetPortNumber = int32(src.Spec.TargetPorts[0].Number)
- dst.Spec.ExtensionRef = extensionRef
- dst.Status = *status
-
- if src.Spec.Selector.MatchLabels != nil {
- dst.Spec.Selector = make(map[LabelKey]LabelValue, len(src.Spec.Selector.MatchLabels))
- for k, v := range src.Spec.Selector.MatchLabels {
- dst.Spec.Selector[LabelKey(k)] = LabelValue(v)
- }
- }
- return nil
-}
-
-func convertStatusToV1(src *InferencePoolStatus) (*v1.InferencePoolStatus, error) {
- if src == nil {
- return nil, errors.New("src cannot be nil")
- }
- if len(src.Parents) == 0 {
- return &v1.InferencePoolStatus{}, nil
- }
- out := &v1.InferencePoolStatus{
- Parents: make([]v1.ParentStatus, 0, len(src.Parents)),
- }
- for _, p := range src.Parents {
- // Drop the synthetic "status/default" parent entirely.
- if isV1Alpha2DefaultParent(p) {
- continue
- }
- ps := v1.ParentStatus{
- ParentRef: toV1ParentRef(p.GatewayRef),
- Conditions: nil, // start nil; only allocate if we actually keep any
- }
- for _, c := range p.Conditions {
- // Drop the synthetic default condition.
- if isV1Alpha2DefaultCondition(c) {
- continue
- }
- cc := c
- if cc.Type == string(v1.InferencePoolConditionAccepted) {
- cc.Reason = mapAcceptedReasonToV1(cc.Reason)
- }
- ps.Conditions = append(ps.Conditions, cc)
- }
-
- // If no real conditions remain, leave nil (omitted in JSON).
- out.Parents = append(out.Parents, ps)
- }
-
- // If all parents were synthetic and were dropped, normalize to empty status.
- if len(out.Parents) == 0 {
- return &v1.InferencePoolStatus{}, nil
- }
- return out, nil
-}
-
-func convertStatusFromV1(src *v1.InferencePoolStatus) (*InferencePoolStatus, error) {
- if src == nil {
- return nil, errors.New("src cannot be nil")
- }
- if len(src.Parents) == 0 {
- // Do not synthesize the default parent here; v1alpha2 CRD defaults cover creation-time,
- // and conversion should reflect the true empty set.
- return &InferencePoolStatus{}, nil
- }
- out := &InferencePoolStatus{
- Parents: make([]PoolStatus, 0, len(src.Parents)),
- }
- for _, p := range src.Parents {
- ps := PoolStatus{
- GatewayRef: fromV1ParentRef(p.ParentRef),
- }
- if n := len(p.Conditions); n > 0 {
- ps.Conditions = make([]metav1.Condition, 0, n)
- for _, c := range p.Conditions {
- cc := c
- if cc.Type == string(v1.InferencePoolConditionAccepted) {
- cc.Reason = mapAcceptedReasonFromV1(cc.Reason)
- }
- ps.Conditions = append(ps.Conditions, cc)
- }
- }
- out.Parents = append(out.Parents, ps)
- }
- return out, nil
-}
-
-// isV1Alpha2DefaultParent returns true for the synthetic "no parents yet" entry.
-func isV1Alpha2DefaultParent(p PoolStatus) bool {
- if p.GatewayRef.Kind == nil || p.GatewayRef.Name == "" {
- return false
- }
- return *p.GatewayRef.Kind == "Status" && p.GatewayRef.Name == "default"
-}
-
-// Map v1alpha2 -> v1 reasons for the "Accepted" condition.
-func mapAcceptedReasonToV1(r string) string {
- switch InferencePoolReason(r) {
- case InferencePoolReasonAccepted:
- return string(v1.InferencePoolReasonAccepted)
- case InferencePoolReasonNotSupportedByGateway:
- return string(v1.InferencePoolReasonNotSupportedByParent)
- default:
- // Keep other reasons like "HTTPRouteNotAccepted" or "Pending" as-is.
- return r
- }
-}
-
-// Map v1 -> v1alpha2 reasons for the "Accepted" condition.
-func mapAcceptedReasonFromV1(r string) string {
- switch v1.InferencePoolReason(r) {
- case v1.InferencePoolReasonAccepted:
- return string(InferencePoolReasonAccepted)
- case v1.InferencePoolReasonNotSupportedByParent:
- return string(InferencePoolReasonNotSupportedByGateway)
- default:
- return r
- }
-}
-
-func isV1Alpha2DefaultCondition(c metav1.Condition) bool {
- return InferencePoolConditionType(c.Type) == InferencePoolConditionAccepted &&
- c.Status == metav1.ConditionUnknown &&
- InferencePoolReason(c.Reason) == InferencePoolReasonPending
-}
-
-func toV1ParentRef(in ParentGatewayReference) v1.ParentReference {
- out := v1.ParentReference{
- Name: v1.ObjectName(in.Name),
- }
- if in.Group != nil {
- g := v1.Group(*in.Group)
- out.Group = &g
- }
- if in.Kind != nil {
- k := v1.Kind(*in.Kind)
- out.Kind = k
- }
- if in.Namespace != nil {
- ns := v1.Namespace(*in.Namespace)
- out.Namespace = ns
- }
- return out
-}
-
-func fromV1ParentRef(in v1.ParentReference) ParentGatewayReference {
- out := ParentGatewayReference{
- Name: ObjectName(in.Name),
- }
- if in.Group != nil {
- g := Group(*in.Group)
- out.Group = &g
- }
- if in.Kind != "" {
- k := Kind(in.Kind)
- out.Kind = &k
- }
- if in.Namespace != "" {
- ns := Namespace(in.Namespace)
- out.Namespace = &ns
- }
- return out
-}
-
-func convertExtensionRefToV1(src *Extension) (v1.EndpointPickerRef, error) {
- endpointPickerRef := v1.EndpointPickerRef{}
- if src == nil {
- return endpointPickerRef, errors.New("src cannot be nil")
- }
- if src.Group != nil {
- endpointPickerRef.Group = ptr.To(v1.Group(*src.Group))
- }
- if src.Kind != nil {
- endpointPickerRef.Kind = v1.Kind(*src.Kind)
- }
- endpointPickerRef.Name = v1.ObjectName(src.Name)
- if src.PortNumber != nil {
- endpointPickerRef.Port = ptr.To(v1.Port{Number: v1.PortNumber(*src.PortNumber)})
- }
- if src.FailureMode != nil {
- endpointPickerRef.FailureMode = v1.EndpointPickerFailureMode(*src.FailureMode)
- }
-
- return endpointPickerRef, nil
-}
-
-func convertEndpointPickerRefFromV1(src *v1.EndpointPickerRef) (Extension, error) {
- extension := Extension{}
- if src == nil {
- return extension, errors.New("src cannot be nil")
- }
- if src.Group != nil {
- extension.Group = ptr.To(Group(*src.Group))
- }
- if src.Kind != "" {
- extension.Kind = ptr.To(Kind(src.Kind))
- }
- extension.Name = ObjectName(src.Name)
- if src.Port != nil {
- extension.PortNumber = ptr.To(PortNumber(src.Port.Number))
- }
- if src.FailureMode != "" {
- extension.FailureMode = ptr.To(ExtensionFailureMode(src.FailureMode))
- }
- return extension, nil
-}
diff --git a/apix/v1alpha2/inferencepool_conversion_test.go b/apix/v1alpha2/inferencepool_conversion_test.go
deleted file mode 100644
index 64b222fed..000000000
--- a/apix/v1alpha2/inferencepool_conversion_test.go
+++ /dev/null
@@ -1,686 +0,0 @@
-/*
-Copyright 2025 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.
-*/
-
-package v1alpha2
-
-import (
- "testing"
-
- "github.com/google/go-cmp/cmp"
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-
- v1 "sigs.k8s.io/gateway-api-inference-extension/api/v1"
-)
-
-var (
- group = Group("my-group")
- kind = Kind("MyKind")
- failureMode = ExtensionFailureMode("Deny")
- portNumber = PortNumber(9000)
- timestamp = metav1.Unix(0, 0)
-
- v1Group = v1.Group("my-group")
- v1Kind = v1.Kind("MyKind")
- v1FailureMode = v1.EndpointPickerFailureMode("Deny")
- v1Port = v1.Port{Number: 9000}
-)
-
-func TestInferencePoolConvertTo(t *testing.T) {
- tests := []struct {
- name string
- src *InferencePool
- want *v1.InferencePool
- wantErr bool
- }{
- {
- name: "full conversion from v1alpha2 to v1 including status",
- src: &InferencePool{
- TypeMeta: metav1.TypeMeta{
- Kind: "InferencePool",
- APIVersion: GroupVersion.String(),
- },
- ObjectMeta: metav1.ObjectMeta{
- Name: "test-pool",
- Namespace: "test-ns",
- },
- Spec: InferencePoolSpec{
- Selector: map[LabelKey]LabelValue{
- "app": "my-model-server",
- },
- TargetPortNumber: 8080,
- ExtensionRef: Extension{
- Group: &group,
- Kind: &kind,
- Name: "my-epp-service",
- PortNumber: &portNumber,
- FailureMode: &failureMode,
- },
- },
- Status: InferencePoolStatus{
- Parents: []PoolStatus{
- {
- GatewayRef: ParentGatewayReference{Name: "my-gateway"},
- Conditions: []metav1.Condition{
- { // v1alpha2 default condition is skipped from conversion.
- Type: string(v1.InferencePoolConditionAccepted),
- Status: metav1.ConditionUnknown,
- Reason: string(InferencePoolReasonPending),
- LastTransitionTime: timestamp,
- },
- {
- Type: string(InferencePoolConditionAccepted),
- Status: metav1.ConditionTrue,
- Reason: string(InferencePoolReasonAccepted),
- LastTransitionTime: timestamp,
- },
- },
- },
- },
- },
- },
- want: &v1.InferencePool{
- TypeMeta: metav1.TypeMeta{
- Kind: "InferencePool",
- APIVersion: v1.GroupVersion.String(),
- },
- ObjectMeta: metav1.ObjectMeta{
- Name: "test-pool",
- Namespace: "test-ns",
- },
- Spec: v1.InferencePoolSpec{
- Selector: v1.LabelSelector{
- MatchLabels: map[v1.LabelKey]v1.LabelValue{
- "app": "my-model-server",
- },
- },
- TargetPorts: []v1.Port{{Number: v1.PortNumber(int32(8080))}},
- EndpointPickerRef: v1.EndpointPickerRef{
- Group: &v1Group,
- Kind: v1Kind,
- Name: "my-epp-service",
- Port: &v1Port,
- FailureMode: v1FailureMode,
- },
- },
- Status: v1.InferencePoolStatus{
- Parents: []v1.ParentStatus{
- {
- ParentRef: v1.ParentReference{Name: "my-gateway"},
- Conditions: []metav1.Condition{
- {
- Type: string(v1.InferencePoolConditionAccepted),
- Status: metav1.ConditionTrue,
- Reason: string(v1.InferencePoolReasonAccepted),
- LastTransitionTime: timestamp,
- },
- },
- },
- },
- },
- },
- wantErr: false,
- },
- {
- name: "conversion from v1alpha2 to v1 with empty extensionRef and default v1alpha2 status condition",
- src: &InferencePool{
- TypeMeta: metav1.TypeMeta{
- Kind: "InferencePool",
- APIVersion: GroupVersion.String(),
- },
- ObjectMeta: metav1.ObjectMeta{
- Name: "test-pool",
- Namespace: "test-ns",
- },
- Spec: InferencePoolSpec{
- Selector: map[LabelKey]LabelValue{
- "app": "my-model-server",
- },
- TargetPortNumber: 8080,
- },
- Status: InferencePoolStatus{
- Parents: []PoolStatus{
- {
- GatewayRef: ParentGatewayReference{Name: "my-gateway"},
- Conditions: []metav1.Condition{
- {
- Type: string(v1.InferencePoolConditionAccepted),
- Status: metav1.ConditionUnknown,
- Reason: string(InferencePoolReasonPending),
- LastTransitionTime: timestamp,
- },
- },
- },
- },
- },
- },
- want: &v1.InferencePool{
- TypeMeta: metav1.TypeMeta{
- Kind: "InferencePool",
- APIVersion: v1.GroupVersion.String(),
- },
- ObjectMeta: metav1.ObjectMeta{
- Name: "test-pool",
- Namespace: "test-ns",
- },
- Spec: v1.InferencePoolSpec{
- Selector: v1.LabelSelector{
- MatchLabels: map[v1.LabelKey]v1.LabelValue{
- "app": "my-model-server",
- },
- },
- TargetPorts: []v1.Port{{Number: v1.PortNumber(int32(8080))}},
- },
- Status: v1.InferencePoolStatus{
- Parents: []v1.ParentStatus{
- {
- ParentRef: v1.ParentReference{Name: "my-gateway"},
- // Conditions omitted (nil) after dropping the synthetic default.
- },
- },
- },
- },
- wantErr: false,
- },
- {
- name: "v1alpha2 -> v1 maps NotSupportedByGateway to NotSupportedByParent",
- src: &InferencePool{
- TypeMeta: metav1.TypeMeta{
- Kind: "InferencePool",
- APIVersion: GroupVersion.String(),
- },
- ObjectMeta: metav1.ObjectMeta{
- Name: "pool",
- Namespace: "ns",
- },
- Spec: InferencePoolSpec{
- Selector: map[LabelKey]LabelValue{"app": "m"},
- TargetPortNumber: 8080,
- },
- Status: InferencePoolStatus{
- Parents: []PoolStatus{
- {
- GatewayRef: ParentGatewayReference{Name: "gw"},
- Conditions: []metav1.Condition{
- {
- Type: string(InferencePoolConditionAccepted),
- Status: metav1.ConditionFalse,
- Reason: string(InferencePoolReasonNotSupportedByGateway),
- LastTransitionTime: timestamp,
- },
- },
- },
- },
- },
- },
- want: &v1.InferencePool{
- TypeMeta: metav1.TypeMeta{
- Kind: "InferencePool",
- APIVersion: v1.GroupVersion.String(),
- },
- ObjectMeta: metav1.ObjectMeta{
- Name: "pool",
- Namespace: "ns",
- },
- Spec: v1.InferencePoolSpec{
- Selector: v1.LabelSelector{MatchLabels: map[v1.LabelKey]v1.LabelValue{"app": "m"}},
- TargetPorts: []v1.Port{
- {Number: v1.PortNumber(8080)},
- },
- },
- Status: v1.InferencePoolStatus{
- Parents: []v1.ParentStatus{
- {
- ParentRef: v1.ParentReference{Name: "gw"},
- Conditions: []metav1.Condition{
- {
- Type: string(v1.InferencePoolConditionAccepted),
- Status: metav1.ConditionFalse,
- Reason: string(v1.InferencePoolReasonNotSupportedByParent),
- LastTransitionTime: timestamp,
- },
- },
- },
- },
- },
- },
- wantErr: false,
- },
- {
- name: "v1alpha2 -> v1 drops synthetic default parent",
- src: &InferencePool{
- TypeMeta: metav1.TypeMeta{
- Kind: "InferencePool",
- APIVersion: GroupVersion.String(),
- },
- ObjectMeta: metav1.ObjectMeta{
- Name: "pool",
- Namespace: "ns",
- },
- Spec: InferencePoolSpec{
- Selector: map[LabelKey]LabelValue{"app": "m"},
- TargetPortNumber: 8080,
- },
- Status: InferencePoolStatus{
- Parents: []PoolStatus{
- {
- GatewayRef: func() ParentGatewayReference {
- k := Kind("Status")
- return ParentGatewayReference{
- Kind: &k, Name: "default",
- }
- }(),
- Conditions: []metav1.Condition{
- {
- Type: string(InferencePoolConditionAccepted),
- Status: metav1.ConditionUnknown,
- Reason: string(InferencePoolReasonPending),
- LastTransitionTime: timestamp,
- },
- },
- },
- },
- },
- },
- want: &v1.InferencePool{
- TypeMeta: metav1.TypeMeta{
- Kind: "InferencePool",
- APIVersion: v1.GroupVersion.String(),
- },
- ObjectMeta: metav1.ObjectMeta{
- Name: "pool",
- Namespace: "ns",
- },
- Spec: v1.InferencePoolSpec{
- Selector: v1.LabelSelector{MatchLabels: map[v1.LabelKey]v1.LabelValue{"app": "m"}},
- TargetPorts: []v1.Port{{Number: v1.PortNumber(8080)}},
- },
- Status: v1.InferencePoolStatus{
- // All parents dropped -> empty status.
- },
- },
- wantErr: false,
- },
- {
- name: "v1alpha2 -> v1 drops synthetic default parent but keeps real parent",
- src: &InferencePool{
- TypeMeta: metav1.TypeMeta{
- Kind: "InferencePool",
- APIVersion: GroupVersion.String(),
- },
- ObjectMeta: metav1.ObjectMeta{
- Name: "pool",
- Namespace: "ns",
- },
- Spec: InferencePoolSpec{
- Selector: map[LabelKey]LabelValue{"app": "m"},
- TargetPortNumber: 8080,
- },
- Status: InferencePoolStatus{
- Parents: []PoolStatus{
- {
- GatewayRef: func() ParentGatewayReference {
- k := Kind("Status")
- return ParentGatewayReference{Kind: &k, Name: "default"}
- }(),
- Conditions: []metav1.Condition{
- {
- Type: string(InferencePoolConditionAccepted),
- Status: metav1.ConditionUnknown,
- Reason: string(InferencePoolReasonPending),
- LastTransitionTime: timestamp,
- },
- },
- },
- {
- GatewayRef: ParentGatewayReference{Name: "real-gw"},
- Conditions: []metav1.Condition{
- {
- Type: string(InferencePoolConditionResolvedRefs),
- Status: metav1.ConditionTrue,
- Reason: string(InferencePoolReasonResolvedRefs),
- LastTransitionTime: timestamp,
- },
- },
- },
- },
- },
- },
- want: &v1.InferencePool{
- TypeMeta: metav1.TypeMeta{
- Kind: "InferencePool",
- APIVersion: v1.GroupVersion.String(),
- },
- ObjectMeta: metav1.ObjectMeta{
- Name: "pool",
- Namespace: "ns",
- },
- Spec: v1.InferencePoolSpec{
- Selector: v1.LabelSelector{MatchLabels: map[v1.LabelKey]v1.LabelValue{"app": "m"}},
- TargetPorts: []v1.Port{{Number: v1.PortNumber(8080)}},
- },
- Status: v1.InferencePoolStatus{
- Parents: []v1.ParentStatus{
- {
- ParentRef: v1.ParentReference{Name: "real-gw"},
- Conditions: []metav1.Condition{
- {
- Type: string(v1.InferencePoolConditionResolvedRefs),
- Status: metav1.ConditionTrue,
- Reason: string(v1.InferencePoolReasonResolvedRefs),
- LastTransitionTime: timestamp,
- },
- },
- },
- },
- },
- },
- wantErr: false,
- },
- }
-
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- got := &v1.InferencePool{}
- err := tt.src.ConvertTo(got)
- if (err != nil) != tt.wantErr {
- t.Fatalf("ConvertTo() error = %v, wantErr %v", err, tt.wantErr)
- }
- if diff := cmp.Diff(tt.want, got); diff != "" {
- t.Errorf("ConvertTo() mismatch (-want +got):\n%s", diff)
- }
- })
- }
-}
-
-func TestInferencePoolConvertFrom(t *testing.T) {
- tests := []struct {
- name string
- src *v1.InferencePool
- want *InferencePool
- wantErr bool
- }{
- {
- name: "full conversion from v1 to v1alpha2 including status",
- src: &v1.InferencePool{
- TypeMeta: metav1.TypeMeta{
- Kind: "InferencePool",
- APIVersion: v1.GroupVersion.String(),
- },
- ObjectMeta: metav1.ObjectMeta{
- Name: "test-pool",
- Namespace: "test-ns",
- },
- Spec: v1.InferencePoolSpec{
- Selector: v1.LabelSelector{
- MatchLabels: map[v1.LabelKey]v1.LabelValue{
- "app": "my-model-server",
- },
- },
- TargetPorts: []v1.Port{{Number: v1.PortNumber(int32(8080))}},
- EndpointPickerRef: v1.EndpointPickerRef{
- Group: &v1Group,
- Kind: v1Kind,
- Name: "my-epp-service",
- Port: &v1Port,
- FailureMode: v1FailureMode,
- },
- },
- Status: v1.InferencePoolStatus{
- Parents: []v1.ParentStatus{
- {
- ParentRef: v1.ParentReference{Name: "my-gateway"},
- Conditions: []metav1.Condition{
- {
- Type: string(v1.InferencePoolConditionAccepted),
- Status: metav1.ConditionTrue,
- Reason: string(v1.InferencePoolReasonAccepted),
- LastTransitionTime: timestamp,
- },
- },
- },
- },
- },
- },
- want: &InferencePool{
- TypeMeta: metav1.TypeMeta{
- Kind: "InferencePool",
- APIVersion: GroupVersion.String(),
- },
- ObjectMeta: metav1.ObjectMeta{
- Name: "test-pool",
- Namespace: "test-ns",
- },
- Spec: InferencePoolSpec{
- Selector: map[LabelKey]LabelValue{
- "app": "my-model-server",
- },
- TargetPortNumber: 8080,
- ExtensionRef: Extension{
- Group: &group,
- Kind: &kind,
- Name: "my-epp-service",
- PortNumber: &portNumber,
- FailureMode: &failureMode,
- },
- },
- Status: InferencePoolStatus{
- Parents: []PoolStatus{
- {
- GatewayRef: ParentGatewayReference{Name: "my-gateway"},
- Conditions: []metav1.Condition{
- {
- Type: string(InferencePoolConditionAccepted),
- Status: metav1.ConditionTrue,
- Reason: string(InferencePoolReasonAccepted),
- LastTransitionTime: timestamp,
- },
- },
- },
- },
- },
- },
- wantErr: false,
- },
- {
- name: "conversion from v1 to v1alpha2 with empty extensionRef and nil status condition",
- src: &v1.InferencePool{
- TypeMeta: metav1.TypeMeta{
- Kind: "InferencePool",
- APIVersion: v1.GroupVersion.String(),
- },
- ObjectMeta: metav1.ObjectMeta{
- Name: "test-pool",
- Namespace: "test-ns",
- },
- Spec: v1.InferencePoolSpec{
- Selector: v1.LabelSelector{
- MatchLabels: map[v1.LabelKey]v1.LabelValue{
- "app": "my-model-server",
- },
- },
- TargetPorts: []v1.Port{{Number: v1.PortNumber(int32(8080))}},
- },
- Status: v1.InferencePoolStatus{
- Parents: []v1.ParentStatus{
- {
- ParentRef: v1.ParentReference{Name: "my-gateway"},
- },
- },
- },
- },
- want: &InferencePool{
- TypeMeta: metav1.TypeMeta{
- Kind: "InferencePool",
- APIVersion: GroupVersion.String(),
- },
- ObjectMeta: metav1.ObjectMeta{
- Name: "test-pool",
- Namespace: "test-ns",
- },
- Spec: InferencePoolSpec{
- Selector: map[LabelKey]LabelValue{
- "app": "my-model-server",
- },
- TargetPortNumber: 8080,
- },
- Status: InferencePoolStatus{
- Parents: []PoolStatus{
- {
- GatewayRef: ParentGatewayReference{Name: "my-gateway"},
- },
- },
- },
- },
- wantErr: false,
- },
- {
- name: "conversion from v1 to v1alpha2 with empty extensionRef and empty status condition",
- src: &v1.InferencePool{
- TypeMeta: metav1.TypeMeta{
- Kind: "InferencePool",
- APIVersion: v1.GroupVersion.String(),
- },
- ObjectMeta: metav1.ObjectMeta{
- Name: "test-pool",
- Namespace: "test-ns",
- },
- Spec: v1.InferencePoolSpec{
- Selector: v1.LabelSelector{
- MatchLabels: map[v1.LabelKey]v1.LabelValue{
- "app": "my-model-server",
- },
- },
- TargetPorts: []v1.Port{{Number: v1.PortNumber(int32(8080))}},
- },
- Status: v1.InferencePoolStatus{
- Parents: []v1.ParentStatus{
- {
- ParentRef: v1.ParentReference{Name: "my-gateway"},
- Conditions: []metav1.Condition{},
- },
- },
- },
- },
- want: &InferencePool{
- TypeMeta: metav1.TypeMeta{
- Kind: "InferencePool",
- APIVersion: GroupVersion.String(),
- },
- ObjectMeta: metav1.ObjectMeta{
- Name: "test-pool",
- Namespace: "test-ns",
- },
- Spec: InferencePoolSpec{
- Selector: map[LabelKey]LabelValue{
- "app": "my-model-server",
- },
- TargetPortNumber: 8080,
- },
- Status: InferencePoolStatus{
- Parents: []PoolStatus{
- {
- GatewayRef: ParentGatewayReference{Name: "my-gateway"},
- Conditions: nil, // Conditions omitted because the converter leaves it nil when v1 had [].
-
- },
- },
- },
- },
- wantErr: false,
- },
- {
- name: "v1 -> v1alpha2 maps NotSupportedByParent to NotSupportedByGateway",
- src: &v1.InferencePool{
- TypeMeta: metav1.TypeMeta{
- Kind: "InferencePool",
- APIVersion: v1.GroupVersion.String(),
- },
- ObjectMeta: metav1.ObjectMeta{
- Name: "pool",
- Namespace: "ns",
- },
- Spec: v1.InferencePoolSpec{
- Selector: v1.LabelSelector{MatchLabels: map[v1.LabelKey]v1.LabelValue{"app": "m"}},
- TargetPorts: []v1.Port{{Number: v1.PortNumber(8080)}},
- },
- Status: v1.InferencePoolStatus{
- Parents: []v1.ParentStatus{
- {
- ParentRef: v1.ParentReference{Name: "gw"},
- Conditions: []metav1.Condition{
- {
- Type: string(v1.InferencePoolConditionAccepted),
- Status: metav1.ConditionFalse,
- Reason: string(v1.InferencePoolReasonNotSupportedByParent),
- LastTransitionTime: timestamp,
- },
- },
- },
- },
- },
- },
- want: &InferencePool{
- TypeMeta: metav1.TypeMeta{
- Kind: "InferencePool",
- APIVersion: GroupVersion.String(),
- },
- ObjectMeta: metav1.ObjectMeta{
- Name: "pool",
- Namespace: "ns",
- },
- Spec: InferencePoolSpec{
- Selector: map[LabelKey]LabelValue{"app": "m"},
- TargetPortNumber: 8080,
- },
- Status: InferencePoolStatus{
- Parents: []PoolStatus{
- {
- GatewayRef: ParentGatewayReference{Name: "gw"},
- Conditions: []metav1.Condition{
- {
- Type: string(InferencePoolConditionAccepted),
- Status: metav1.ConditionFalse,
- Reason: string(InferencePoolReasonNotSupportedByGateway),
- LastTransitionTime: timestamp,
- },
- },
- },
- },
- },
- },
- wantErr: false,
- },
- {
- name: "nil source",
- src: nil,
- want: &InferencePool{},
- wantErr: true,
- },
- }
-
- for _, tt := range tests {
- t.Run(tt.name, func(t *testing.T) {
- got := &InferencePool{}
- err := got.ConvertFrom(tt.src)
- if (err != nil) != tt.wantErr {
- t.Fatalf("ConvertFrom() error = %v, wantErr %v", err, tt.wantErr)
- }
- if diff := cmp.Diff(tt.want, got); diff != "" {
- t.Errorf("ConvertFrom() mismatch (-want +got):\n%s", diff)
- }
- })
- }
-}
diff --git a/apix/v1alpha2/inferencepool_types.go b/apix/v1alpha2/inferencepool_types.go
deleted file mode 100644
index 7ccf215e0..000000000
--- a/apix/v1alpha2/inferencepool_types.go
+++ /dev/null
@@ -1,265 +0,0 @@
-/*
-Copyright 2025 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.
-*/
-
-package v1alpha2
-
-import (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-)
-
-// InferencePool is the Schema for the InferencePools API.
-// +kubebuilder:object:root=true
-// +kubebuilder:metadata:annotations="api-approved.kubernetes.io=unapproved, experimental-only"
-// +kubebuilder:resource:shortName=xinfpool
-// +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"`
-}
-
-// InferencePoolList contains a list of InferencePool.
-//
-// +kubebuilder:object:root=true
-type InferencePoolList struct {
- metav1.TypeMeta `json:",inline"`
- 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"`
-
- // Extension configures an endpoint picker as an extension service.
- // +required
- ExtensionRef Extension `json:"extensionRef,omitempty"`
-}
-
-// Extension specifies how to configure an extension that runs the endpoint picker.
-type Extension 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"`
-
- // 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
- // 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"
-)
-
-// 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 0249d442d..b06281708 100644
--- a/apix/v1alpha2/zz_generated.deepcopy.go
+++ b/apix/v1alpha2/zz_generated.deepcopy.go
@@ -25,41 +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 *Extension) DeepCopyInto(out *Extension) {
- *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
- }
- 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 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 *InferenceObjective) DeepCopyInto(out *InferenceObjective) {
*out = *in
@@ -162,140 +127,6 @@ func (in *InferenceObjectiveStatus) DeepCopy() *InferenceObjectiveStatus {
return out
}
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *InferencePool) DeepCopyInto(out *InferencePool) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
- in.Spec.DeepCopyInto(&out.Spec)
- in.Status.DeepCopyInto(&out.Status)
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InferencePool.
-func (in *InferencePool) DeepCopy() *InferencePool {
- if in == nil {
- return nil
- }
- out := new(InferencePool)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *InferencePool) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- return nil
-}
-
-// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
-func (in *InferencePoolList) DeepCopyInto(out *InferencePoolList) {
- *out = *in
- out.TypeMeta = in.TypeMeta
- in.ListMeta.DeepCopyInto(&out.ListMeta)
- if in.Items != nil {
- in, out := &in.Items, &out.Items
- *out = make([]InferencePool, len(*in))
- for i := range *in {
- (*in)[i].DeepCopyInto(&(*out)[i])
- }
- }
-}
-
-// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InferencePoolList.
-func (in *InferencePoolList) DeepCopy() *InferencePoolList {
- if in == nil {
- return nil
- }
- out := new(InferencePoolList)
- in.DeepCopyInto(out)
- return out
-}
-
-// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
-func (in *InferencePoolList) DeepCopyObject() runtime.Object {
- if c := in.DeepCopy(); c != nil {
- return c
- }
- 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.ExtensionRef.DeepCopyInto(&out.ExtensionRef)
-}
-
-// 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
@@ -310,26 +141,3 @@ func (in *PoolObjectReference) DeepCopy() *PoolObjectReference {
in.DeepCopyInto(out)
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
-}
diff --git a/apix/v1alpha2/zz_generated.register.go b/apix/v1alpha2/zz_generated.register.go
index ae0e1dabe..b8a48d7f5 100644
--- a/apix/v1alpha2/zz_generated.register.go
+++ b/apix/v1alpha2/zz_generated.register.go
@@ -63,8 +63,6 @@ func addKnownTypes(scheme *runtime.Scheme) error {
scheme.AddKnownTypes(SchemeGroupVersion,
&InferenceObjective{},
&InferenceObjectiveList{},
- &InferencePool{},
- &InferencePoolList{},
)
// AddToGroupVersion allows the serialization of client types like ListOptions.
v1.AddToGroupVersion(scheme, SchemeGroupVersion)
diff --git a/client-go/applyconfiguration/apix/v1alpha2/extension.go b/client-go/applyconfiguration/apix/v1alpha2/extension.go
deleted file mode 100644
index 2f40a611d..000000000
--- a/client-go/applyconfiguration/apix/v1alpha2/extension.go
+++ /dev/null
@@ -1,79 +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 {
- 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
-// 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.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.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.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.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.FailureMode = &value
- return b
-}
diff --git a/client-go/applyconfiguration/apix/v1alpha2/inferencepool.go b/client-go/applyconfiguration/apix/v1alpha2/inferencepool.go
deleted file mode 100644
index 3b1c6226b..000000000
--- a/client-go/applyconfiguration/apix/v1alpha2/inferencepool.go
+++ /dev/null
@@ -1,242 +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 (
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- v1 "k8s.io/client-go/applyconfigurations/meta/v1"
-)
-
-// InferencePoolApplyConfiguration represents a declarative configuration of the InferencePool type for use
-// with apply.
-type InferencePoolApplyConfiguration struct {
- v1.TypeMetaApplyConfiguration `json:",inline"`
- *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"`
- Spec *InferencePoolSpecApplyConfiguration `json:"spec,omitempty"`
- Status *InferencePoolStatusApplyConfiguration `json:"status,omitempty"`
-}
-
-// InferencePool constructs a declarative configuration of the InferencePool type for use with
-// apply.
-func InferencePool(name, namespace string) *InferencePoolApplyConfiguration {
- b := &InferencePoolApplyConfiguration{}
- b.WithName(name)
- b.WithNamespace(namespace)
- b.WithKind("InferencePool")
- b.WithAPIVersion("inference.networking.x-k8s.io/v1alpha2")
- return b
-}
-func (b InferencePoolApplyConfiguration) IsApplyConfiguration() {}
-
-// 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 *InferencePoolApplyConfiguration) WithKind(value string) *InferencePoolApplyConfiguration {
- b.TypeMetaApplyConfiguration.Kind = &value
- return b
-}
-
-// WithAPIVersion sets the APIVersion 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 APIVersion field is set to the value of the last call.
-func (b *InferencePoolApplyConfiguration) WithAPIVersion(value string) *InferencePoolApplyConfiguration {
- b.TypeMetaApplyConfiguration.APIVersion = &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 *InferencePoolApplyConfiguration) WithName(value string) *InferencePoolApplyConfiguration {
- b.ensureObjectMetaApplyConfigurationExists()
- b.ObjectMetaApplyConfiguration.Name = &value
- return b
-}
-
-// WithGenerateName sets the GenerateName 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 GenerateName field is set to the value of the last call.
-func (b *InferencePoolApplyConfiguration) WithGenerateName(value string) *InferencePoolApplyConfiguration {
- b.ensureObjectMetaApplyConfigurationExists()
- b.ObjectMetaApplyConfiguration.GenerateName = &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 *InferencePoolApplyConfiguration) WithNamespace(value string) *InferencePoolApplyConfiguration {
- b.ensureObjectMetaApplyConfigurationExists()
- b.ObjectMetaApplyConfiguration.Namespace = &value
- return b
-}
-
-// WithUID sets the UID 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 UID field is set to the value of the last call.
-func (b *InferencePoolApplyConfiguration) WithUID(value types.UID) *InferencePoolApplyConfiguration {
- b.ensureObjectMetaApplyConfigurationExists()
- b.ObjectMetaApplyConfiguration.UID = &value
- return b
-}
-
-// WithResourceVersion sets the ResourceVersion 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 ResourceVersion field is set to the value of the last call.
-func (b *InferencePoolApplyConfiguration) WithResourceVersion(value string) *InferencePoolApplyConfiguration {
- b.ensureObjectMetaApplyConfigurationExists()
- b.ObjectMetaApplyConfiguration.ResourceVersion = &value
- return b
-}
-
-// WithGeneration sets the Generation 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 Generation field is set to the value of the last call.
-func (b *InferencePoolApplyConfiguration) WithGeneration(value int64) *InferencePoolApplyConfiguration {
- b.ensureObjectMetaApplyConfigurationExists()
- b.ObjectMetaApplyConfiguration.Generation = &value
- return b
-}
-
-// WithCreationTimestamp sets the CreationTimestamp 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 CreationTimestamp field is set to the value of the last call.
-func (b *InferencePoolApplyConfiguration) WithCreationTimestamp(value metav1.Time) *InferencePoolApplyConfiguration {
- b.ensureObjectMetaApplyConfigurationExists()
- b.ObjectMetaApplyConfiguration.CreationTimestamp = &value
- return b
-}
-
-// WithDeletionTimestamp sets the DeletionTimestamp 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 DeletionTimestamp field is set to the value of the last call.
-func (b *InferencePoolApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *InferencePoolApplyConfiguration {
- b.ensureObjectMetaApplyConfigurationExists()
- b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value
- return b
-}
-
-// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds 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 DeletionGracePeriodSeconds field is set to the value of the last call.
-func (b *InferencePoolApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *InferencePoolApplyConfiguration {
- b.ensureObjectMetaApplyConfigurationExists()
- b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value
- return b
-}
-
-// WithLabels puts the entries into the Labels 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 Labels field,
-// overwriting an existing map entries in Labels field with the same key.
-func (b *InferencePoolApplyConfiguration) WithLabels(entries map[string]string) *InferencePoolApplyConfiguration {
- b.ensureObjectMetaApplyConfigurationExists()
- if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 {
- b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries))
- }
- for k, v := range entries {
- b.ObjectMetaApplyConfiguration.Labels[k] = v
- }
- return b
-}
-
-// WithAnnotations puts the entries into the Annotations 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 Annotations field,
-// overwriting an existing map entries in Annotations field with the same key.
-func (b *InferencePoolApplyConfiguration) WithAnnotations(entries map[string]string) *InferencePoolApplyConfiguration {
- b.ensureObjectMetaApplyConfigurationExists()
- if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 {
- b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries))
- }
- for k, v := range entries {
- b.ObjectMetaApplyConfiguration.Annotations[k] = v
- }
- return b
-}
-
-// WithOwnerReferences adds the given value to the OwnerReferences 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 OwnerReferences field.
-func (b *InferencePoolApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *InferencePoolApplyConfiguration {
- b.ensureObjectMetaApplyConfigurationExists()
- for i := range values {
- if values[i] == nil {
- panic("nil value passed to WithOwnerReferences")
- }
- b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i])
- }
- return b
-}
-
-// WithFinalizers adds the given value to the Finalizers 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 Finalizers field.
-func (b *InferencePoolApplyConfiguration) WithFinalizers(values ...string) *InferencePoolApplyConfiguration {
- b.ensureObjectMetaApplyConfigurationExists()
- for i := range values {
- b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i])
- }
- return b
-}
-
-func (b *InferencePoolApplyConfiguration) ensureObjectMetaApplyConfigurationExists() {
- if b.ObjectMetaApplyConfiguration == nil {
- b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{}
- }
-}
-
-// 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 {
- b.Spec = value
- return b
-}
-
-// 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 {
- b.Status = value
- return b
-}
-
-// GetKind retrieves the value of the Kind field in the declarative configuration.
-func (b *InferencePoolApplyConfiguration) GetKind() *string {
- return b.TypeMetaApplyConfiguration.Kind
-}
-
-// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration.
-func (b *InferencePoolApplyConfiguration) GetAPIVersion() *string {
- return b.TypeMetaApplyConfiguration.APIVersion
-}
-
-// GetName retrieves the value of the Name field in the declarative configuration.
-func (b *InferencePoolApplyConfiguration) GetName() *string {
- b.ensureObjectMetaApplyConfigurationExists()
- return b.ObjectMetaApplyConfiguration.Name
-}
-
-// GetNamespace retrieves the value of the Namespace field in the declarative configuration.
-func (b *InferencePoolApplyConfiguration) GetNamespace() *string {
- b.ensureObjectMetaApplyConfigurationExists()
- return b.ObjectMetaApplyConfiguration.Namespace
-}
diff --git a/client-go/applyconfiguration/apix/v1alpha2/inferencepoolspec.go b/client-go/applyconfiguration/apix/v1alpha2/inferencepoolspec.go
deleted file mode 100644
index 1f59e887b..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"`
- ExtensionRef *ExtensionApplyConfiguration `json:"extensionRef,omitempty"`
-}
-
-// 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.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 7e4ea0915..f65733647 100644
--- a/client-go/applyconfiguration/utils.go
+++ b/client-go/applyconfiguration/utils.go
@@ -64,26 +64,14 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
return &apixv1alpha1.InferencePoolImportStatusApplyConfiguration{}
// Group=inference.networking.x-k8s.io, Version=v1alpha2
- case v1alpha2.SchemeGroupVersion.WithKind("Extension"):
- return &apixv1alpha2.ExtensionApplyConfiguration{}
case v1alpha2.SchemeGroupVersion.WithKind("InferenceObjective"):
return &apixv1alpha2.InferenceObjectiveApplyConfiguration{}
case v1alpha2.SchemeGroupVersion.WithKind("InferenceObjectiveSpec"):
return &apixv1alpha2.InferenceObjectiveSpecApplyConfiguration{}
case v1alpha2.SchemeGroupVersion.WithKind("InferenceObjectiveStatus"):
return &apixv1alpha2.InferenceObjectiveStatusApplyConfiguration{}
- 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{}
}
return nil
diff --git a/client-go/clientset/versioned/typed/apix/v1alpha2/apix_client.go b/client-go/clientset/versioned/typed/apix/v1alpha2/apix_client.go
index 84f636fb4..ef922f765 100644
--- a/client-go/clientset/versioned/typed/apix/v1alpha2/apix_client.go
+++ b/client-go/clientset/versioned/typed/apix/v1alpha2/apix_client.go
@@ -29,7 +29,6 @@ import (
type XInferenceV1alpha2Interface interface {
RESTClient() rest.Interface
InferenceObjectivesGetter
- InferencePoolsGetter
}
// XInferenceV1alpha2Client is used to interact with features provided by the inference.networking.x-k8s.io group.
@@ -41,10 +40,6 @@ func (c *XInferenceV1alpha2Client) InferenceObjectives(namespace string) Inferen
return newInferenceObjectives(c, namespace)
}
-func (c *XInferenceV1alpha2Client) InferencePools(namespace string) InferencePoolInterface {
- return newInferencePools(c, namespace)
-}
-
// NewForConfig creates a new XInferenceV1alpha2Client for the given config.
// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
// where httpClient was generated with rest.HTTPClientFor(c).
diff --git a/client-go/clientset/versioned/typed/apix/v1alpha2/fake/fake_apix_client.go b/client-go/clientset/versioned/typed/apix/v1alpha2/fake/fake_apix_client.go
index 54a5b047c..4154a30d5 100644
--- a/client-go/clientset/versioned/typed/apix/v1alpha2/fake/fake_apix_client.go
+++ b/client-go/clientset/versioned/typed/apix/v1alpha2/fake/fake_apix_client.go
@@ -32,10 +32,6 @@ func (c *FakeXInferenceV1alpha2) InferenceObjectives(namespace string) v1alpha2.
return newFakeInferenceObjectives(c, namespace)
}
-func (c *FakeXInferenceV1alpha2) InferencePools(namespace string) v1alpha2.InferencePoolInterface {
- return newFakeInferencePools(c, namespace)
-}
-
// RESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeXInferenceV1alpha2) RESTClient() rest.Interface {
diff --git a/client-go/clientset/versioned/typed/apix/v1alpha2/fake/fake_inferencepool.go b/client-go/clientset/versioned/typed/apix/v1alpha2/fake/fake_inferencepool.go
deleted file mode 100644
index 46c6163fd..000000000
--- a/client-go/clientset/versioned/typed/apix/v1alpha2/fake/fake_inferencepool.go
+++ /dev/null
@@ -1,53 +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 client-gen. DO NOT EDIT.
-
-package fake
-
-import (
- gentype "k8s.io/client-go/gentype"
- v1alpha2 "sigs.k8s.io/gateway-api-inference-extension/apix/v1alpha2"
- apixv1alpha2 "sigs.k8s.io/gateway-api-inference-extension/client-go/applyconfiguration/apix/v1alpha2"
- typedapixv1alpha2 "sigs.k8s.io/gateway-api-inference-extension/client-go/clientset/versioned/typed/apix/v1alpha2"
-)
-
-// fakeInferencePools implements InferencePoolInterface
-type fakeInferencePools struct {
- *gentype.FakeClientWithListAndApply[*v1alpha2.InferencePool, *v1alpha2.InferencePoolList, *apixv1alpha2.InferencePoolApplyConfiguration]
- Fake *FakeXInferenceV1alpha2
-}
-
-func newFakeInferencePools(fake *FakeXInferenceV1alpha2, namespace string) typedapixv1alpha2.InferencePoolInterface {
- return &fakeInferencePools{
- gentype.NewFakeClientWithListAndApply[*v1alpha2.InferencePool, *v1alpha2.InferencePoolList, *apixv1alpha2.InferencePoolApplyConfiguration](
- fake.Fake,
- namespace,
- v1alpha2.SchemeGroupVersion.WithResource("inferencepools"),
- v1alpha2.SchemeGroupVersion.WithKind("InferencePool"),
- func() *v1alpha2.InferencePool { return &v1alpha2.InferencePool{} },
- func() *v1alpha2.InferencePoolList { return &v1alpha2.InferencePoolList{} },
- func(dst, src *v1alpha2.InferencePoolList) { dst.ListMeta = src.ListMeta },
- func(list *v1alpha2.InferencePoolList) []*v1alpha2.InferencePool {
- return gentype.ToPointerSlice(list.Items)
- },
- func(list *v1alpha2.InferencePoolList, items []*v1alpha2.InferencePool) {
- list.Items = gentype.FromPointerSlice(items)
- },
- ),
- fake,
- }
-}
diff --git a/client-go/clientset/versioned/typed/apix/v1alpha2/generated_expansion.go b/client-go/clientset/versioned/typed/apix/v1alpha2/generated_expansion.go
index b85a89d83..544e0e9ab 100644
--- a/client-go/clientset/versioned/typed/apix/v1alpha2/generated_expansion.go
+++ b/client-go/clientset/versioned/typed/apix/v1alpha2/generated_expansion.go
@@ -19,5 +19,3 @@ limitations under the License.
package v1alpha2
type InferenceObjectiveExpansion interface{}
-
-type InferencePoolExpansion interface{}
diff --git a/client-go/clientset/versioned/typed/apix/v1alpha2/inferencepool.go b/client-go/clientset/versioned/typed/apix/v1alpha2/inferencepool.go
deleted file mode 100644
index f8f8ae698..000000000
--- a/client-go/clientset/versioned/typed/apix/v1alpha2/inferencepool.go
+++ /dev/null
@@ -1,74 +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 client-gen. DO NOT EDIT.
-
-package v1alpha2
-
-import (
- context "context"
-
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- types "k8s.io/apimachinery/pkg/types"
- watch "k8s.io/apimachinery/pkg/watch"
- gentype "k8s.io/client-go/gentype"
- apixv1alpha2 "sigs.k8s.io/gateway-api-inference-extension/apix/v1alpha2"
- applyconfigurationapixv1alpha2 "sigs.k8s.io/gateway-api-inference-extension/client-go/applyconfiguration/apix/v1alpha2"
- scheme "sigs.k8s.io/gateway-api-inference-extension/client-go/clientset/versioned/scheme"
-)
-
-// InferencePoolsGetter has a method to return a InferencePoolInterface.
-// A group's client should implement this interface.
-type InferencePoolsGetter interface {
- InferencePools(namespace string) InferencePoolInterface
-}
-
-// InferencePoolInterface has methods to work with InferencePool resources.
-type InferencePoolInterface interface {
- Create(ctx context.Context, inferencePool *apixv1alpha2.InferencePool, opts v1.CreateOptions) (*apixv1alpha2.InferencePool, error)
- Update(ctx context.Context, inferencePool *apixv1alpha2.InferencePool, opts v1.UpdateOptions) (*apixv1alpha2.InferencePool, error)
- // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
- UpdateStatus(ctx context.Context, inferencePool *apixv1alpha2.InferencePool, opts v1.UpdateOptions) (*apixv1alpha2.InferencePool, error)
- Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
- DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
- Get(ctx context.Context, name string, opts v1.GetOptions) (*apixv1alpha2.InferencePool, error)
- List(ctx context.Context, opts v1.ListOptions) (*apixv1alpha2.InferencePoolList, error)
- Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
- Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *apixv1alpha2.InferencePool, err error)
- Apply(ctx context.Context, inferencePool *applyconfigurationapixv1alpha2.InferencePoolApplyConfiguration, opts v1.ApplyOptions) (result *apixv1alpha2.InferencePool, err error)
- // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
- ApplyStatus(ctx context.Context, inferencePool *applyconfigurationapixv1alpha2.InferencePoolApplyConfiguration, opts v1.ApplyOptions) (result *apixv1alpha2.InferencePool, err error)
- InferencePoolExpansion
-}
-
-// inferencePools implements InferencePoolInterface
-type inferencePools struct {
- *gentype.ClientWithListAndApply[*apixv1alpha2.InferencePool, *apixv1alpha2.InferencePoolList, *applyconfigurationapixv1alpha2.InferencePoolApplyConfiguration]
-}
-
-// newInferencePools returns a InferencePools
-func newInferencePools(c *XInferenceV1alpha2Client, namespace string) *inferencePools {
- return &inferencePools{
- gentype.NewClientWithListAndApply[*apixv1alpha2.InferencePool, *apixv1alpha2.InferencePoolList, *applyconfigurationapixv1alpha2.InferencePoolApplyConfiguration](
- "inferencepools",
- c.RESTClient(),
- scheme.ParameterCodec,
- namespace,
- func() *apixv1alpha2.InferencePool { return &apixv1alpha2.InferencePool{} },
- func() *apixv1alpha2.InferencePoolList { return &apixv1alpha2.InferencePoolList{} },
- ),
- }
-}
diff --git a/client-go/informers/externalversions/apix/v1alpha2/inferencepool.go b/client-go/informers/externalversions/apix/v1alpha2/inferencepool.go
deleted file mode 100644
index 2587972cb..000000000
--- a/client-go/informers/externalversions/apix/v1alpha2/inferencepool.go
+++ /dev/null
@@ -1,102 +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 informer-gen. DO NOT EDIT.
-
-package v1alpha2
-
-import (
- context "context"
- time "time"
-
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
- runtime "k8s.io/apimachinery/pkg/runtime"
- watch "k8s.io/apimachinery/pkg/watch"
- cache "k8s.io/client-go/tools/cache"
- gatewayapiinferenceextensionapixv1alpha2 "sigs.k8s.io/gateway-api-inference-extension/apix/v1alpha2"
- versioned "sigs.k8s.io/gateway-api-inference-extension/client-go/clientset/versioned"
- internalinterfaces "sigs.k8s.io/gateway-api-inference-extension/client-go/informers/externalversions/internalinterfaces"
- apixv1alpha2 "sigs.k8s.io/gateway-api-inference-extension/client-go/listers/apix/v1alpha2"
-)
-
-// InferencePoolInformer provides access to a shared informer and lister for
-// InferencePools.
-type InferencePoolInformer interface {
- Informer() cache.SharedIndexInformer
- Lister() apixv1alpha2.InferencePoolLister
-}
-
-type inferencePoolInformer struct {
- factory internalinterfaces.SharedInformerFactory
- tweakListOptions internalinterfaces.TweakListOptionsFunc
- namespace string
-}
-
-// NewInferencePoolInformer constructs a new informer for InferencePool type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewInferencePoolInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {
- return NewFilteredInferencePoolInformer(client, namespace, resyncPeriod, indexers, nil)
-}
-
-// NewFilteredInferencePoolInformer constructs a new informer for InferencePool type.
-// Always prefer using an informer factory to get a shared informer instead of getting an independent
-// one. This reduces memory footprint and number of connections to the server.
-func NewFilteredInferencePoolInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {
- return cache.NewSharedIndexInformer(
- &cache.ListWatch{
- ListFunc: func(options v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.XInferenceV1alpha2().InferencePools(namespace).List(context.Background(), options)
- },
- WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.XInferenceV1alpha2().InferencePools(namespace).Watch(context.Background(), options)
- },
- ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.XInferenceV1alpha2().InferencePools(namespace).List(ctx, options)
- },
- WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) {
- if tweakListOptions != nil {
- tweakListOptions(&options)
- }
- return client.XInferenceV1alpha2().InferencePools(namespace).Watch(ctx, options)
- },
- },
- &gatewayapiinferenceextensionapixv1alpha2.InferencePool{},
- resyncPeriod,
- indexers,
- )
-}
-
-func (f *inferencePoolInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {
- return NewFilteredInferencePoolInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)
-}
-
-func (f *inferencePoolInformer) Informer() cache.SharedIndexInformer {
- return f.factory.InformerFor(&gatewayapiinferenceextensionapixv1alpha2.InferencePool{}, f.defaultInformer)
-}
-
-func (f *inferencePoolInformer) Lister() apixv1alpha2.InferencePoolLister {
- return apixv1alpha2.NewInferencePoolLister(f.Informer().GetIndexer())
-}
diff --git a/client-go/informers/externalversions/apix/v1alpha2/interface.go b/client-go/informers/externalversions/apix/v1alpha2/interface.go
index 9f6981658..0206b22d8 100644
--- a/client-go/informers/externalversions/apix/v1alpha2/interface.go
+++ b/client-go/informers/externalversions/apix/v1alpha2/interface.go
@@ -26,8 +26,6 @@ import (
type Interface interface {
// InferenceObjectives returns a InferenceObjectiveInformer.
InferenceObjectives() InferenceObjectiveInformer
- // InferencePools returns a InferencePoolInformer.
- InferencePools() InferencePoolInformer
}
type version struct {
@@ -45,8 +43,3 @@ func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakList
func (v *version) InferenceObjectives() InferenceObjectiveInformer {
return &inferenceObjectiveInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
}
-
-// InferencePools returns a InferencePoolInformer.
-func (v *version) InferencePools() InferencePoolInformer {
- return &inferencePoolInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions}
-}
diff --git a/client-go/informers/externalversions/generic.go b/client-go/informers/externalversions/generic.go
index 2fe29156b..9b75dcc4e 100644
--- a/client-go/informers/externalversions/generic.go
+++ b/client-go/informers/externalversions/generic.go
@@ -65,8 +65,6 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource
// Group=inference.networking.x-k8s.io, Version=v1alpha2
case v1alpha2.SchemeGroupVersion.WithResource("inferenceobjectives"):
return &genericInformer{resource: resource.GroupResource(), informer: f.XInference().V1alpha2().InferenceObjectives().Informer()}, nil
- case v1alpha2.SchemeGroupVersion.WithResource("inferencepools"):
- return &genericInformer{resource: resource.GroupResource(), informer: f.XInference().V1alpha2().InferencePools().Informer()}, nil
}
diff --git a/client-go/listers/apix/v1alpha2/expansion_generated.go b/client-go/listers/apix/v1alpha2/expansion_generated.go
index 09f6d1de3..212894daf 100644
--- a/client-go/listers/apix/v1alpha2/expansion_generated.go
+++ b/client-go/listers/apix/v1alpha2/expansion_generated.go
@@ -25,11 +25,3 @@ type InferenceObjectiveListerExpansion interface{}
// InferenceObjectiveNamespaceListerExpansion allows custom methods to be added to
// InferenceObjectiveNamespaceLister.
type InferenceObjectiveNamespaceListerExpansion interface{}
-
-// InferencePoolListerExpansion allows custom methods to be added to
-// InferencePoolLister.
-type InferencePoolListerExpansion interface{}
-
-// InferencePoolNamespaceListerExpansion allows custom methods to be added to
-// InferencePoolNamespaceLister.
-type InferencePoolNamespaceListerExpansion interface{}
diff --git a/client-go/listers/apix/v1alpha2/inferencepool.go b/client-go/listers/apix/v1alpha2/inferencepool.go
deleted file mode 100644
index 50c9c74c7..000000000
--- a/client-go/listers/apix/v1alpha2/inferencepool.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 lister-gen. DO NOT EDIT.
-
-package v1alpha2
-
-import (
- labels "k8s.io/apimachinery/pkg/labels"
- listers "k8s.io/client-go/listers"
- cache "k8s.io/client-go/tools/cache"
- apixv1alpha2 "sigs.k8s.io/gateway-api-inference-extension/apix/v1alpha2"
-)
-
-// InferencePoolLister helps list InferencePools.
-// All objects returned here must be treated as read-only.
-type InferencePoolLister interface {
- // List lists all InferencePools in the indexer.
- // Objects returned here must be treated as read-only.
- List(selector labels.Selector) (ret []*apixv1alpha2.InferencePool, err error)
- // InferencePools returns an object that can list and get InferencePools.
- InferencePools(namespace string) InferencePoolNamespaceLister
- InferencePoolListerExpansion
-}
-
-// inferencePoolLister implements the InferencePoolLister interface.
-type inferencePoolLister struct {
- listers.ResourceIndexer[*apixv1alpha2.InferencePool]
-}
-
-// NewInferencePoolLister returns a new InferencePoolLister.
-func NewInferencePoolLister(indexer cache.Indexer) InferencePoolLister {
- return &inferencePoolLister{listers.New[*apixv1alpha2.InferencePool](indexer, apixv1alpha2.Resource("inferencepool"))}
-}
-
-// InferencePools returns an object that can list and get InferencePools.
-func (s *inferencePoolLister) InferencePools(namespace string) InferencePoolNamespaceLister {
- return inferencePoolNamespaceLister{listers.NewNamespaced[*apixv1alpha2.InferencePool](s.ResourceIndexer, namespace)}
-}
-
-// InferencePoolNamespaceLister helps list and get InferencePools.
-// All objects returned here must be treated as read-only.
-type InferencePoolNamespaceLister interface {
- // List lists all InferencePools in the indexer for a given namespace.
- // Objects returned here must be treated as read-only.
- List(selector labels.Selector) (ret []*apixv1alpha2.InferencePool, err error)
- // Get retrieves the InferencePool from the indexer for a given namespace and name.
- // Objects returned here must be treated as read-only.
- Get(name string) (*apixv1alpha2.InferencePool, error)
- InferencePoolNamespaceListerExpansion
-}
-
-// inferencePoolNamespaceLister implements the InferencePoolNamespaceLister
-// interface.
-type inferencePoolNamespaceLister struct {
- listers.ResourceIndexer[*apixv1alpha2.InferencePool]
-}
diff --git a/cmd/epp/runner/runner.go b/cmd/epp/runner/runner.go
index cbd3ea024..00c858281 100644
--- a/cmd/epp/runner/runner.go
+++ b/cmd/epp/runner/runner.go
@@ -34,7 +34,6 @@ import (
"go.uber.org/zap/zapcore"
"google.golang.org/grpc"
healthPb "google.golang.org/grpc/health/grpc_health_v1"
- "k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/rest"
ctrl "sigs.k8s.io/controller-runtime"
@@ -98,7 +97,6 @@ var (
metricsEndpointAuth = flag.Bool("metrics-endpoint-auth", true, "Enables authentication and authorization of the metrics endpoint")
enablePprof = flag.Bool("enable-pprof", runserver.DefaultEnablePprof, "Enables pprof handlers. Defaults to true. Set to false to disable pprof handlers.")
poolName = flag.String("pool-name", runserver.DefaultPoolName, "Name of the InferencePool this Endpoint Picker is associated with.")
- poolGroup = flag.String("pool-group", runserver.DefaultPoolGroup, "group of the InferencePool this Endpoint Picker is associated with.")
poolNamespace = flag.String("pool-namespace", "", "Namespace of the InferencePool this Endpoint Picker is associated with.")
logVerbosity = flag.Int("v", logging.DEFAULT, "number for the log level verbosity")
secureServing = flag.Bool("secure-serving", runserver.DefaultSecureServing, "Enables secure serving. Defaults to true.")
@@ -238,13 +236,8 @@ func (r *Runner) Run(ctx context.Context) error {
Name: *poolName,
Namespace: resolvedPoolNamespace,
}
- poolGroupKind := schema.GroupKind{
- Group: *poolGroup,
- Kind: "InferencePool",
- }
poolGKNN := common.GKNN{
NamespacedName: poolNamespacedName,
- GroupKind: poolGroupKind,
}
isLeader := &atomic.Bool{}
diff --git a/config/charts/inferencepool/README.md b/config/charts/inferencepool/README.md
index 9fbbfb9bf..d892715bf 100644
--- a/config/charts/inferencepool/README.md
+++ b/config/charts/inferencepool/README.md
@@ -170,7 +170,6 @@ The following table list the configurable parameters of the chart.
| **Parameter Name** | **Description** |
|------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| `inferencePool.apiVersion` | The API version of the InferencePool resource. Defaults to `inference.networking.k8s.io/v1`. This can be changed to `inference.networking.x-k8s.io/v1alpha2` to support older API versions. |
| `inferencePool.targetPortNumber` | Target port number for the vllm backends, will be used to scrape metrics by the inference extension. Defaults to 8000. |
| `inferencePool.modelServerType` | Type of the model servers in the pool, valid options are [vllm, triton-tensorrt-llm], default is vllm. |
| `inferencePool.modelServers.matchLabels` | Label selector to match vllm backends managed by the inference pool. |
diff --git a/config/charts/inferencepool/templates/epp-deployment.yaml b/config/charts/inferencepool/templates/epp-deployment.yaml
index de892337d..0a1d34db6 100644
--- a/config/charts/inferencepool/templates/epp-deployment.yaml
+++ b/config/charts/inferencepool/templates/epp-deployment.yaml
@@ -38,10 +38,6 @@ spec:
# distros of EPP which may not have implemented the NAMESPACE env var defaulting behavior.
- --pool-namespace
- {{ .Release.Namespace }}
- {{- if ne .Values.inferencePool.apiVersion "inference.networking.k8s.io" }}
- - --pool-group
- - "{{ (split "/" .Values.inferencePool.apiVersion)._0 }}"
- {{- end }}
- --zap-encoder
- "json"
- --config-file
diff --git a/config/charts/inferencepool/templates/gke.yaml b/config/charts/inferencepool/templates/gke.yaml
index a2d8bbc87..f0fec5952 100644
--- a/config/charts/inferencepool/templates/gke.yaml
+++ b/config/charts/inferencepool/templates/gke.yaml
@@ -9,7 +9,7 @@ metadata:
{{- include "gateway-api-inference-extension.labels" . | nindent 4 }}
spec:
targetRef:
- group: "{{ (split "/" .Values.inferencePool.apiVersion)._0 }}"
+ group: inference.networking.k8s.io
kind: InferencePool
name: {{ .Release.Name }}
default:
@@ -21,7 +21,7 @@ spec:
type: HTTP
httpHealthCheck:
requestPath: /health
- port: {{ .Values.inferencePool.targetPortNumber }}
+ port: {{ (index .Values.inferencePool.targetPorts 0).number }}
---
apiVersion: networking.gke.io/v1
kind: GCPBackendPolicy
@@ -32,7 +32,7 @@ metadata:
{{- include "gateway-api-inference-extension.labels" . | nindent 4 }}
spec:
targetRef:
- group: "{{ (split "/" .Values.inferencePool.apiVersion)._0 }}"
+ group: inference.networking.k8s.io
kind: InferencePool
name: {{ .Release.Name }}
default:
diff --git a/config/charts/inferencepool/templates/inferencepool.yaml b/config/charts/inferencepool/templates/inferencepool.yaml
index 5c973b998..c8c35ffea 100644
--- a/config/charts/inferencepool/templates/inferencepool.yaml
+++ b/config/charts/inferencepool/templates/inferencepool.yaml
@@ -1,24 +1,3 @@
-{{ if eq .Values.inferencePool.apiVersion "inference.networking.x-k8s.io/v1alpha2"}}
-apiVersion: {{ .Values.inferencePool.apiVersion }}
-kind: InferencePool
-metadata:
- name: {{ .Release.Name }}
- namespace: {{ .Release.Namespace }}
- labels:
- {{- include "gateway-api-inference-extension.labels" . | nindent 4 }}
-spec:
- targetPortNumber: {{ .Values.inferencePool.targetPortNumber | default 8000 }}
- selector:
- {{- if .Values.inferencePool.modelServers.matchLabels }}
- {{- range $key, $value := .Values.inferencePool.modelServers.matchLabels }}
- {{ $key }}: {{ quote $value }}
- {{- end }}
- {{- end }}
- extensionRef:
- name: {{ include "gateway-api-inference-extension.name" . }}
- portNumber: {{ .Values.inferenceExtension.extProcPort | default 9002 }}
- failureMode: {{ .Values.inferenceExtension.failureMode | default "FailClose" }}
-{{ else }}
{{ include "gateway-api-inference-extension.validations.inferencepool.common" $ }}
apiVersion: "inference.networking.k8s.io/v1"
kind: InferencePool
@@ -43,6 +22,5 @@ spec:
name: {{ include "gateway-api-inference-extension.name" . }}
port:
number: {{ .Values.inferenceExtension.extProcPort | default 9002 }}
-{{- end }}
diff --git a/config/charts/inferencepool/templates/rbac.yaml b/config/charts/inferencepool/templates/rbac.yaml
index ebe68c3ea..945e7a528 100644
--- a/config/charts/inferencepool/templates/rbac.yaml
+++ b/config/charts/inferencepool/templates/rbac.yaml
@@ -48,7 +48,7 @@ rules:
- apiGroups: ["inference.networking.x-k8s.io"]
resources: ["inferenceobjectives"]
verbs: ["get", "watch", "list"]
-- apiGroups: ["{{ (split "/" .Values.inferencePool.apiVersion)._0 }}"]
+- apiGroups: ["inference.networking.k8s.io"]
resources: ["inferencepools"]
verbs: ["get", "watch", "list"]
- apiGroups: [""]
diff --git a/config/charts/inferencepool/values.yaml b/config/charts/inferencepool/values.yaml
index 8b3385ab1..6721e6aa3 100644
--- a/config/charts/inferencepool/values.yaml
+++ b/config/charts/inferencepool/values.yaml
@@ -67,15 +67,10 @@ inferencePool:
targetPorts:
- number: 8000
modelServerType: vllm # vllm, triton-tensorrt-llm
- apiVersion: inference.networking.k8s.io/v1
# modelServers: # REQUIRED
# matchLabels:
# app: vllm-llama3-8b-instruct
- # Should only used if apiVersion is inference.networking.x-k8s.io/v1alpha2,
- # This will soon be deprecated when upstream GW providers support v1, just doing something simple for now.
- targetPortNumber: 8000
-
# Options: ["gke", "istio", "none"]
provider:
name: none
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 e0a15b3a4..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: main-dev
- name: inferencepools.inference.networking.x-k8s.io
-spec:
- group: inference.networking.x-k8s.io
- names:
- kind: InferencePool
- listKind: InferencePoolList
- plural: inferencepools
- shortNames:
- - xinfpool
- 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
diff --git a/config/crd/kustomization.yaml b/config/crd/kustomization.yaml
index 61f7ec089..3287b0e26 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_inferenceobjectives.yaml
- bases/inference.networking.x-k8s.io_inferencepoolimports.yaml
- bases/inference.networking.k8s.io_inferencepools.yaml
diff --git a/conformance/scripts/istio/Makefile b/conformance/scripts/istio/Makefile
index cfce3cc9c..32315c471 100644
--- a/conformance/scripts/istio/Makefile
+++ b/conformance/scripts/istio/Makefile
@@ -423,7 +423,7 @@ setup-gateway-api-crds:
# Apply Inference Extension CRDs
setup-inference-extension-crds:
@echo "Applying Inference Extension CRDs version $(INFERENCE_EXTENSION_VERSION)..."
- kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/gateway-api-inference-extension/refs/tags/$(INFERENCE_EXTENSION_VERSION)/config/crd/bases/inference.networking.x-k8s.io_inferencepools.yaml
+ kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/gateway-api-inference-extension/refs/tags/$(INFERENCE_EXTENSION_VERSION)/config/crd/bases/inference.networking.k8s.io_inferencepools.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/gateway-api-inference-extension/refs/tags/$(INFERENCE_EXTENSION_VERSION)/config/crd/bases/inference.networking.x-k8s.io_inferenceobjectives.yaml
# Apply all CRDs (convenience target)
diff --git a/pkg/epp/controller/inferencepool_reconciler.go b/pkg/epp/controller/inferencepool_reconciler.go
index 3b52de0ae..38cb9ff3f 100644
--- a/pkg/epp/controller/inferencepool_reconciler.go
+++ b/pkg/epp/controller/inferencepool_reconciler.go
@@ -26,8 +26,6 @@ import (
"sigs.k8s.io/controller-runtime/pkg/log"
v1 "sigs.k8s.io/gateway-api-inference-extension/api/v1"
- "sigs.k8s.io/gateway-api-inference-extension/apix/v1alpha2"
- "sigs.k8s.io/gateway-api-inference-extension/pkg/common"
"sigs.k8s.io/gateway-api-inference-extension/pkg/epp/datastore"
logutil "sigs.k8s.io/gateway-api-inference-extension/pkg/epp/util/logging"
)
@@ -38,29 +36,15 @@ import (
type InferencePoolReconciler struct {
client.Reader
Datastore datastore.Datastore
- PoolGKNN common.GKNN
}
func (c *InferencePoolReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
- logger := log.FromContext(ctx).WithValues("group", c.PoolGKNN.Group).V(logutil.DEFAULT)
+ logger := log.FromContext(ctx).V(logutil.DEFAULT)
ctx = ctrl.LoggerInto(ctx, logger)
-
logger.Info("Reconciling InferencePool")
- // 1. Initialize a generic client.Object based on the group.
- var obj client.Object
- switch c.PoolGKNN.Group {
- case v1.GroupName:
- obj = &v1.InferencePool{}
- case v1alpha2.GroupName:
- obj = &v1alpha2.InferencePool{}
- default:
- // Handle unsupported groups gracefully.
- return ctrl.Result{}, fmt.Errorf("cannot reconcile InferencePool - unsupported API group: %s", c.PoolGKNN.Group)
- }
-
- // 2. Perform a single, generic fetch for the object.
- if err := c.Get(ctx, req.NamespacedName, obj); err != nil {
+ v1infPool := &v1.InferencePool{}
+ if err := c.Get(ctx, req.NamespacedName, v1infPool); err != nil {
if errors.IsNotFound(err) {
logger.Info("InferencePool not found. Clearing the datastore")
c.Datastore.Clear()
@@ -69,30 +53,12 @@ func (c *InferencePoolReconciler) Reconcile(ctx context.Context, req ctrl.Reques
return ctrl.Result{}, fmt.Errorf("unable to get InferencePool - %w", err)
}
- // 3. Perform common checks using the client.Object interface.
- if !obj.GetDeletionTimestamp().IsZero() {
+ if !v1infPool.GetDeletionTimestamp().IsZero() {
logger.Info("InferencePool is marked for deletion. Clearing the datastore")
c.Datastore.Clear()
return ctrl.Result{}, nil
}
- // 4. Convert the fetched object to the canonical v1.InferencePool.
- v1infPool := &v1.InferencePool{}
-
- switch pool := obj.(type) {
- case *v1.InferencePool:
- // If it's already a v1 object, just use it.
- v1infPool = pool
- case *v1alpha2.InferencePool:
- var err error
- err = pool.ConvertTo(v1infPool)
- if err != nil {
- return ctrl.Result{}, fmt.Errorf("failed to convert XInferencePool to InferencePool - %w", err)
- }
- default:
- return ctrl.Result{}, fmt.Errorf("unsupported API group: %s", c.PoolGKNN.Group)
- }
-
if err := c.Datastore.PoolSet(ctx, c.Reader, v1infPool); err != nil {
return ctrl.Result{}, fmt.Errorf("failed to update datastore - %w", err)
}
@@ -101,16 +67,7 @@ func (c *InferencePoolReconciler) Reconcile(ctx context.Context, req ctrl.Reques
}
func (c *InferencePoolReconciler) SetupWithManager(mgr ctrl.Manager) error {
- switch c.PoolGKNN.Group {
- case v1alpha2.GroupName:
- return ctrl.NewControllerManagedBy(mgr).
- For(&v1alpha2.InferencePool{}).
- Complete(c)
- case v1.GroupName:
- return ctrl.NewControllerManagedBy(mgr).
- For(&v1.InferencePool{}).
- Complete(c)
- default:
- return fmt.Errorf("unknown group %s", c.PoolGKNN.Group)
- }
+ return ctrl.NewControllerManagedBy(mgr).
+ For(&v1.InferencePool{}).
+ Complete(c)
}
diff --git a/pkg/epp/controller/inferencepool_reconciler_test.go b/pkg/epp/controller/inferencepool_reconciler_test.go
index a2bce1256..d5b2857af 100644
--- a/pkg/epp/controller/inferencepool_reconciler_test.go
+++ b/pkg/epp/controller/inferencepool_reconciler_test.go
@@ -35,7 +35,6 @@ import (
v1 "sigs.k8s.io/gateway-api-inference-extension/api/v1"
"sigs.k8s.io/gateway-api-inference-extension/apix/v1alpha2"
- "sigs.k8s.io/gateway-api-inference-extension/pkg/common"
backendmetrics "sigs.k8s.io/gateway-api-inference-extension/pkg/epp/backend/metrics"
"sigs.k8s.io/gateway-api-inference-extension/pkg/epp/datastore"
utiltest "sigs.k8s.io/gateway-api-inference-extension/pkg/epp/util/testing"
@@ -103,19 +102,12 @@ func TestInferencePoolReconciler(t *testing.T) {
// Create a request for the existing resource.
namespacedName := types.NamespacedName{Name: pool1.Name, Namespace: pool1.Namespace}
- gknn := common.GKNN{
- NamespacedName: namespacedName,
- GroupKind: schema.GroupKind{
- Group: pool1.GroupVersionKind().Group,
- Kind: pool1.GroupVersionKind().Kind,
- },
- }
req := ctrl.Request{NamespacedName: namespacedName}
ctx := context.Background()
pmf := backendmetrics.NewPodMetricsFactory(&backendmetrics.FakePodMetricsClient{}, time.Second)
ds := datastore.NewDatastore(ctx, pmf, 0)
- inferencePoolReconciler := &InferencePoolReconciler{Reader: fakeClient, Datastore: ds, PoolGKNN: gknn}
+ inferencePoolReconciler := &InferencePoolReconciler{Reader: fakeClient, Datastore: ds}
// Step 1: Inception, only ready pods matching pool1 are added to the store.
if _, err := inferencePoolReconciler.Reconcile(ctx, req); err != nil {
@@ -211,159 +203,3 @@ func diffStore(datastore datastore.Datastore, params diffStoreParams) string {
}
return ""
}
-
-// Duplicate it as it is just a temporary code
-// "inference.networking.x-k8s.io" InferencePool will get removed in the near future.
-func TestXInferencePoolReconciler(t *testing.T) {
- // The best practice is to use table-driven tests, however in this scaenario it seems
- // more logical to do a single test with steps that depend on each other.
- gvk := schema.GroupVersionKind{
- Group: v1alpha2.GroupVersion.Group,
- Version: v1alpha2.GroupVersion.Version,
- Kind: "InferencePool",
- }
- pool1 := utiltest.MakeAlphaInferencePool("pool1").
- Namespace("pool1-ns").
- Selector(selector_v1).
- ExtensionRef("epp-service").
- TargetPortNumber(8080).ObjRef()
- pool2 := utiltest.MakeAlphaInferencePool("pool2").
- Namespace("pool2-ns").
- ExtensionRef("epp-service").
- TargetPortNumber(8080).ObjRef()
- pool1.SetGroupVersionKind(gvk)
- pool2.SetGroupVersionKind(gvk)
-
- // Set up the scheme.
- scheme := runtime.NewScheme()
- _ = clientgoscheme.AddToScheme(scheme)
- _ = v1alpha2.Install(scheme)
- _ = v1.Install(scheme)
- initialObjects := []client.Object{pool1, pool2}
- for i := range pods {
- initialObjects = append(initialObjects, pods[i])
- }
- fakeClient := fake.NewClientBuilder().
- WithScheme(scheme).
- WithObjects(initialObjects...).
- Build()
-
- // Create a request for the existing resource.
- namespacedName := types.NamespacedName{Name: pool1.Name, Namespace: pool1.Namespace}
- gknn := common.GKNN{
- NamespacedName: namespacedName,
- GroupKind: schema.GroupKind{
- Group: pool1.GroupVersionKind().Group,
- Kind: pool1.GroupVersionKind().Kind,
- },
- }
- req := ctrl.Request{NamespacedName: namespacedName}
- ctx := context.Background()
-
- pmf := backendmetrics.NewPodMetricsFactory(&backendmetrics.FakePodMetricsClient{}, time.Second)
- ds := datastore.NewDatastore(ctx, pmf, 0)
- inferencePoolReconciler := &InferencePoolReconciler{Reader: fakeClient, Datastore: ds, PoolGKNN: gknn}
-
- // Step 1: Inception, only ready pods matching pool1 are added to the store.
- if _, err := inferencePoolReconciler.Reconcile(ctx, req); err != nil {
- t.Errorf("Unexpected InferencePool reconcile error: %v", err)
- }
- if diff := xDiffStore(t, ds, xDiffStoreParams{wantPool: pool1, wantPods: []string{"pod1-rank-0", "pod2-rank-0"}}); diff != "" {
- t.Errorf("Unexpected diff (+got/-want): %s", diff)
- }
-
- newPool1 := &v1alpha2.InferencePool{}
- if err := fakeClient.Get(ctx, req.NamespacedName, newPool1); err != nil {
- t.Errorf("Unexpected pool get error: %v", err)
- }
- newPool1.Spec.Selector = map[v1alpha2.LabelKey]v1alpha2.LabelValue{"app": "vllm_v2"}
- if err := fakeClient.Update(ctx, newPool1, &client.UpdateOptions{}); err != nil {
- t.Errorf("Unexpected pool update error: %v", err)
- }
-
- if _, err := inferencePoolReconciler.Reconcile(ctx, req); err != nil {
- t.Errorf("Unexpected InferencePool reconcile error: %v", err)
- }
- if diff := xDiffStore(t, ds, xDiffStoreParams{wantPool: newPool1, wantPods: []string{"pod5-rank-0"}}); diff != "" {
- t.Errorf("Unexpected diff (+got/-want): %s", diff)
- }
-
- // Step 3: update the pool port
- if err := fakeClient.Get(ctx, req.NamespacedName, newPool1); err != nil {
- t.Errorf("Unexpected pool get error: %v", err)
- }
- newPool1.Spec.TargetPortNumber = 9090
- if err := fakeClient.Update(ctx, newPool1, &client.UpdateOptions{}); err != nil {
- t.Errorf("Unexpected pool update error: %v", err)
- }
- if _, err := inferencePoolReconciler.Reconcile(ctx, req); err != nil {
- t.Errorf("Unexpected InferencePool reconcile error: %v", err)
- }
- if diff := xDiffStore(t, ds, xDiffStoreParams{wantPool: newPool1, wantPods: []string{"pod5-rank-0"}}); diff != "" {
- t.Errorf("Unexpected diff (+got/-want): %s", diff)
- }
-
- // Step 4: delete the pool to trigger a datastore clear
- if err := fakeClient.Get(ctx, req.NamespacedName, newPool1); err != nil {
- t.Errorf("Unexpected pool get error: %v", err)
- }
- if err := fakeClient.Delete(ctx, newPool1, &client.DeleteOptions{}); err != nil {
- t.Errorf("Unexpected pool delete error: %v", err)
- }
- if _, err := inferencePoolReconciler.Reconcile(ctx, req); err != nil {
- t.Errorf("Unexpected InferencePool reconcile error: %v", err)
- }
- if diff := xDiffStore(t, ds, xDiffStoreParams{wantPods: []string{}}); diff != "" {
- t.Errorf("Unexpected diff (+got/-want): %s", diff)
- }
-}
-
-type xDiffStoreParams struct {
- wantPool *v1alpha2.InferencePool
- wantPods []string
- wantObjectives []*v1alpha2.InferenceObjective
-}
-
-func xDiffStore(t *testing.T, datastore datastore.Datastore, params xDiffStoreParams) string {
- gotPool, _ := datastore.PoolGet()
- if gotPool == nil && params.wantPool == nil {
- return ""
- }
-
- gotXPool := &v1alpha2.InferencePool{}
-
- err := gotXPool.ConvertFrom(gotPool)
- if err != nil {
- t.Fatalf("failed to convert InferencePool to XInferencePool: %v", err)
- }
-
- // controller-runtime fake client may not populate TypeMeta (APIVersion/Kind).
- // Ignore it when comparing pools.
- if diff := cmp.Diff(params.wantPool, gotXPool, cmpopts.IgnoreTypes(metav1.TypeMeta{})); diff != "" {
- return "pool:" + diff
- }
-
- // Default wantPods if not set because PodGetAll returns an empty slice when empty.
- if params.wantPods == nil {
- params.wantPods = []string{}
- }
- gotPods := []string{}
- for _, pm := range datastore.PodList(backendmetrics.AllPodsPredicate) {
- gotPods = append(gotPods, pm.GetPod().NamespacedName.Name)
- }
- if diff := cmp.Diff(params.wantPods, gotPods, cmpopts.SortSlices(func(a, b string) bool { return a < b })); diff != "" {
- return "pods:" + diff
- }
-
- // Default wantModels if not set because ModelGetAll returns an empty slice when empty.
- if params.wantObjectives == nil {
- params.wantObjectives = []*v1alpha2.InferenceObjective{}
- }
-
- if diff := cmp.Diff(params.wantObjectives, datastore.ObjectiveGetAll(), cmpopts.SortSlices(func(a, b *v1alpha2.InferenceObjective) bool {
- return a.Name < b.Name
- })); diff != "" {
- return "models:" + diff
- }
- return ""
-}
diff --git a/pkg/epp/server/controller_manager.go b/pkg/epp/server/controller_manager.go
index 47e4f12d4..97d34cec0 100644
--- a/pkg/epp/server/controller_manager.go
+++ b/pkg/epp/server/controller_manager.go
@@ -45,7 +45,7 @@ func init() {
}
// defaultManagerOptions returns the default options used to create the manager.
-func defaultManagerOptions(gknn common.GKNN, metricsServerOptions metricsserver.Options) (ctrl.Options, error) {
+func defaultManagerOptions(gknn common.GKNN, metricsServerOptions metricsserver.Options) ctrl.Options {
opt := ctrl.Options{
Scheme: scheme,
Cache: cache.Options{
@@ -64,33 +64,17 @@ func defaultManagerOptions(gknn common.GKNN, metricsServerOptions metricsserver.
},
Metrics: metricsServerOptions,
}
- switch gknn.Group {
- case v1alpha2.GroupName:
- opt.Cache.ByObject[&v1alpha2.InferencePool{}] = cache.ByObject{
- Namespaces: map[string]cache.Config{gknn.Namespace: {FieldSelector: fields.SelectorFromSet(fields.Set{
- "metadata.name": gknn.Name,
- })}},
- }
- case v1.GroupName:
- opt.Cache.ByObject[&v1.InferencePool{}] = cache.ByObject{
- Namespaces: map[string]cache.Config{gknn.Namespace: {FieldSelector: fields.SelectorFromSet(fields.Set{
- "metadata.name": gknn.Name,
- })}},
- }
- default:
- return ctrl.Options{}, fmt.Errorf("unknown group: %s", gknn.Group)
+ opt.Cache.ByObject[&v1.InferencePool{}] = cache.ByObject{
+ Namespaces: map[string]cache.Config{gknn.Namespace: {FieldSelector: fields.SelectorFromSet(fields.Set{
+ "metadata.name": gknn.Name,
+ })}},
}
-
- return opt, nil
+ return opt
}
// NewDefaultManager creates a new controller manager with default configuration.
func NewDefaultManager(gknn common.GKNN, restConfig *rest.Config, metricsServerOptions metricsserver.Options, leaderElectionEnabled bool) (ctrl.Manager, error) {
- opt, err := defaultManagerOptions(gknn, metricsServerOptions)
- if err != nil {
- return nil, fmt.Errorf("failed to create controller manager options: %v", err)
- }
-
+ opt := defaultManagerOptions(gknn, metricsServerOptions)
if leaderElectionEnabled {
opt.LeaderElection = true
opt.LeaderElectionResourceLock = "leases"
diff --git a/pkg/epp/server/runserver.go b/pkg/epp/server/runserver.go
index c3037175e..400e9665b 100644
--- a/pkg/epp/server/runserver.go
+++ b/pkg/epp/server/runserver.go
@@ -116,7 +116,6 @@ func (r *ExtProcServerRunner) SetupWithManager(ctx context.Context, mgr ctrl.Man
if err := (&controller.InferencePoolReconciler{
Datastore: r.Datastore,
Reader: mgr.GetClient(),
- PoolGKNN: r.PoolGKNN,
}).SetupWithManager(mgr); err != nil {
return fmt.Errorf("failed setting up InferencePoolReconciler: %w", err)
}
diff --git a/pkg/epp/util/testing/wrappers.go b/pkg/epp/util/testing/wrappers.go
index 7621bff96..6e6642489 100644
--- a/pkg/epp/util/testing/wrappers.go
+++ b/pkg/epp/util/testing/wrappers.go
@@ -218,49 +218,3 @@ func (m *InferencePoolWrapper) EndpointPickerRef(name string) *InferencePoolWrap
func (m *InferencePoolWrapper) ObjRef() *v1.InferencePool {
return &m.InferencePool
}
-
-// AlphaInferencePoolWrapper wraps an group "inference.networking.x-k8s.io" InferencePool.
-type AlphaInferencePoolWrapper struct {
- v1alpha2.InferencePool
-}
-
-// MakeAlphaInferencePool creates a wrapper for a InferencePool.
-func MakeAlphaInferencePool(name string) *AlphaInferencePoolWrapper {
- return &AlphaInferencePoolWrapper{
- v1alpha2.InferencePool{
- ObjectMeta: metav1.ObjectMeta{
- Name: name,
- },
- Spec: v1alpha2.InferencePoolSpec{},
- },
- }
-}
-
-func (m *AlphaInferencePoolWrapper) Namespace(ns string) *AlphaInferencePoolWrapper {
- m.ObjectMeta.Namespace = ns
- return m
-}
-
-func (m *AlphaInferencePoolWrapper) Selector(selector map[string]string) *AlphaInferencePoolWrapper {
- s := make(map[v1alpha2.LabelKey]v1alpha2.LabelValue)
- for k, v := range selector {
- s[v1alpha2.LabelKey(k)] = v1alpha2.LabelValue(v)
- }
- m.Spec.Selector = s
- return m
-}
-
-func (m *AlphaInferencePoolWrapper) TargetPortNumber(p int32) *AlphaInferencePoolWrapper {
- m.Spec.TargetPortNumber = p
- return m
-}
-
-func (m *AlphaInferencePoolWrapper) ExtensionRef(name string) *AlphaInferencePoolWrapper {
- m.Spec.ExtensionRef = v1alpha2.Extension{Name: v1alpha2.ObjectName(name)}
- return m
-}
-
-// Obj returns the wrapped InferencePool.
-func (m *AlphaInferencePoolWrapper) ObjRef() *v1alpha2.InferencePool {
- return &m.InferencePool
-}
diff --git a/site-src/reference/x-v1a2-spec.md b/site-src/reference/x-v1a2-spec.md
index c1a57ce3f..ad3f71ccd 100644
--- a/site-src/reference/x-v1a2-spec.md
+++ b/site-src/reference/x-v1a2-spec.md
@@ -12,49 +12,9 @@ inference.networking.x-k8s.io API group.
### Resource Types
- [InferenceObjective](#inferenceobjective)
-- [InferencePool](#inferencepool)
-#### Extension
-
-
-
-Extension specifies how to configure an extension that runs the endpoint picker.
-
-
-
-_Appears in:_
-- [InferencePoolSpec](#inferencepoolspec)
-
-| Field | Description | Default | Validation |
-| --- | --- | --- | --- |
-| `group` _[Group](#group)_ | 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])?)*$`
|
-| `kind` _[Kind](#kind)_ | 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. | Service | MaxLength: 63
MinLength: 1
Pattern: `^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$`
|
-| `name` _[ObjectName](#objectname)_ | Name is the name of the referent. | | MaxLength: 253
MinLength: 1
Required: \{\}
|
-| `portNumber` _[PortNumber](#portnumber)_ | The port number on the service running the extension. When unspecified,
implementations SHOULD infer a default value of 9002 when the Kind is
Service. | | Maximum: 65535
Minimum: 1
|
-| `failureMode` _[ExtensionFailureMode](#extensionfailuremode)_ | Configures how the gateway handles the case when the extension is not responsive.
Defaults to failClose. | FailClose | Enum: [FailOpen FailClose]
|
-
-
-#### ExtensionFailureMode
-
-_Underlying type:_ _string_
-
-ExtensionFailureMode defines the options for how the gateway handles the case when the extension is not
-responsive.
-
-_Validation:_
-- Enum: [FailOpen FailClose]
-
-_Appears in:_
-- [Extension](#extension)
-
-| Field | Description |
-| --- | --- |
-| `FailOpen` | FailOpen specifies that the proxy should forward the request to an endpoint of its picking when the Endpoint Picker fails.
|
-| `FailClose` | FailClose specifies that the proxy should drop the request when the Endpoint Picker fails.
|
-
-
#### Group
_Underlying type:_ _string_
@@ -80,8 +40,6 @@ _Validation:_
- Pattern: `^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
_Appears in:_
-- [Extension](#extension)
-- [ParentGatewayReference](#parentgatewayreference)
- [PoolObjectReference](#poolobjectreference)
@@ -150,63 +108,6 @@ _Appears in:_
| `conditions` _[Condition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#condition-v1-meta) array_ | Conditions track the state of the InferenceObjective.
Known condition types are:
* "Accepted" | [map[lastTransitionTime:1970-01-01T00:00:00Z message:Waiting for controller reason:Pending status:Unknown type:Ready]] | MaxItems: 8
|
-#### InferencePool
-
-
-
-InferencePool is the Schema for the InferencePools API.
-
-
-
-
-
-| Field | Description | Default | Validation |
-| --- | --- | --- | --- |
-| `apiVersion` _string_ | `inference.networking.x-k8s.io/v1alpha2` | | |
-| `kind` _string_ | `InferencePool` | | |
-| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | | |
-| `spec` _[InferencePoolSpec](#inferencepoolspec)_ | | | |
-| `status` _[InferencePoolStatus](#inferencepoolstatus)_ | Status defines the observed state of InferencePool. | \{ parent:[map[conditions:[map[lastTransitionTime:1970-01-01T00:00:00Z message:Waiting for controller reason:Pending status:Unknown type:Accepted]] parentRef:map[kind:Status name:default]]] \} | |
-
-
-
-
-
-
-#### InferencePoolSpec
-
-
-
-InferencePoolSpec defines the desired state of InferencePool
-
-
-
-_Appears in:_
-- [InferencePool](#inferencepool)
-
-| Field | Description | Default | Validation |
-| --- | --- | --- | --- |
-| `selector` _object (keys:[LabelKey](#labelkey), values:[LabelValue](#labelvalue))_ | 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. | | Required: \{\}
|
-| `targetPortNumber` _integer_ | TargetPortNumber defines the port number to access the selected model server Pods.
The number must be in the range 1 to 65535. | | Maximum: 65535
Minimum: 1
Required: \{\}
|
-| `extensionRef` _[Extension](#extension)_ | Extension configures an endpoint picker as an extension service. | | |
-
-
-#### InferencePoolStatus
-
-
-
-InferencePoolStatus defines the observed state of InferencePool.
-
-
-
-_Appears in:_
-- [InferencePool](#inferencepool)
-
-| Field | Description | Default | Validation |
-| --- | --- | --- | --- |
-| `parent` _[PoolStatus](#poolstatus) array_ | 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. | | MaxItems: 32
|
-
-
#### Kind
_Underlying type:_ _string_
@@ -228,98 +129,13 @@ _Validation:_
- Pattern: `^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$`
_Appears in:_
-- [Extension](#extension)
-- [ParentGatewayReference](#parentgatewayreference)
- [PoolObjectReference](#poolobjectreference)
-#### LabelKey
-
-_Underlying type:_ _string_
-
-LabelKey was originally copied from: https://github.com/kubernetes-sigs/gateway-api/blob/99a3934c6bc1ce0874f3a4c5f20cafd8977ffcb4/apis/v1/shared_types.go#L694-L731
-Duplicated as to not take an unexpected dependency on gw's API.
-
-LabelKey is the key of a label. This is used for validation
-of maps. This matches the Kubernetes "qualified name" validation that is used for labels.
-Labels are case sensitive, so: my-label and My-Label are considered distinct.
-
-Valid values include:
-
-* example
-* example.com
-* example.com/path
-* example.com/path.html
-
-Invalid values include:
-
-* example~ - "~" is an invalid character
-* example.com. - can not start or end with "."
-
-_Validation:_
-- MaxLength: 253
-- MinLength: 1
-- 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_.]{0,61})?[A-Za-z0-9]$`
-
-_Appears in:_
-- [InferencePoolSpec](#inferencepoolspec)
-
-
-
-#### LabelValue
-
-_Underlying type:_ _string_
-
-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
-
-_Validation:_
-- MaxLength: 63
-- MinLength: 0
-- Pattern: `^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$`
-
-_Appears in:_
-- [InferencePoolSpec](#inferencepoolspec)
-
-
-
-#### Namespace
-
-_Underlying type:_ _string_
-
-Namespace refers to a Kubernetes namespace. It must be a RFC 1123 label.
-
-This validation is based off of the corresponding Kubernetes validation:
-https://github.com/kubernetes/apimachinery/blob/02cfb53916346d085a6c6c7c66f882e3c6b0eca6/pkg/util/validation/validation.go#L187
-
-This is used for Namespace name validation here:
-https://github.com/kubernetes/apimachinery/blob/02cfb53916346d085a6c6c7c66f882e3c6b0eca6/pkg/api/validation/generic.go#L63
-
-Valid values include:
-
-* "example"
-
-Invalid values include:
-* "example.com" - "." is an invalid character
-_Validation:_
-- MaxLength: 63
-- MinLength: 1
-- Pattern: `^[a-z0-9]([-a-z0-9]*[a-z0-9])?$`
-_Appears in:_
-- [ParentGatewayReference](#parentgatewayreference)
@@ -336,32 +152,10 @@ _Validation:_
- MinLength: 1
_Appears in:_
-- [Extension](#extension)
-- [ParentGatewayReference](#parentgatewayreference)
- [PoolObjectReference](#poolobjectreference)
-#### ParentGatewayReference
-
-
-
-ParentGatewayReference identifies an API object including its namespace,
-defaulting to Gateway.
-
-
-
-_Appears in:_
-- [PoolStatus](#poolstatus)
-
-| Field | Description | Default | Validation |
-| --- | --- | --- | --- |
-| `group` _[Group](#group)_ | Group is the group of the referent. | gateway.networking.k8s.io | MaxLength: 253
Pattern: `^$\|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
|
-| `kind` _[Kind](#kind)_ | Kind is kind of the referent. For example "Gateway". | Gateway | MaxLength: 63
MinLength: 1
Pattern: `^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$`
|
-| `name` _[ObjectName](#objectname)_ | Name is the name of the referent. | | MaxLength: 253
MinLength: 1
|
-| `namespace` _[Namespace](#namespace)_ | 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])?$`
|
-
-
#### PoolObjectReference
@@ -381,35 +175,5 @@ _Appears in:_
| `name` _[ObjectName](#objectname)_ | Name is the name of the referent. | | MaxLength: 253
MinLength: 1
Required: \{\}
|
-#### PoolStatus
-
-
-
-PoolStatus defines the observed state of InferencePool from a Gateway.
-
-
-
-_Appears in:_
-- [InferencePoolStatus](#inferencepoolstatus)
-
-| Field | Description | Default | Validation |
-| --- | --- | --- | --- |
-| `parentRef` _[ParentGatewayReference](#parentgatewayreference)_ | GatewayRef indicates the gateway that observed state of InferencePool. | | |
-| `conditions` _[Condition](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.31/#condition-v1-meta) array_ | Conditions track the state of the InferencePool.
Known condition types are:
* "Accepted"
* "ResolvedRefs" | [map[lastTransitionTime:1970-01-01T00:00:00Z message:Waiting for controller reason:Pending status:Unknown type:Accepted]] | MaxItems: 8
|
-
-
-#### PortNumber
-
-_Underlying type:_ _integer_
-
-PortNumber defines a network port.
-
-_Validation:_
-- Maximum: 65535
-- Minimum: 1
-
-_Appears in:_
-- [Extension](#extension)
-
diff --git a/test/e2e/epp/e2e_suite_test.go b/test/e2e/epp/e2e_suite_test.go
index b41f108f8..921d845a0 100644
--- a/test/e2e/epp/e2e_suite_test.go
+++ b/test/e2e/epp/e2e_suite_test.go
@@ -64,8 +64,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"
// xInferObjectiveManifest is the manifest for the inference model CRD with 'inference.networking.x-k8s.io' group.
xInferObjectiveManifest = "../../../config/crd/bases/inference.networking.x-k8s.io_inferenceobjectives.yaml"
// inferPoolManifest is the manifest for the inference pool CRD with 'inference.networking.k8s.io' group.
@@ -132,7 +130,6 @@ func setupInfra() {
createHfSecret(testConfig, modelServerSecretManifest)
}
crds := map[string]string{
- "inferencepools.inference.networking.x-k8s.io": xInferPoolManifest,
"inferenceobjectives.inference.networking.x-k8s.io": xInferObjectiveManifest,
"inferencepools.inference.networking.k8s.io": inferPoolManifest,
}
diff --git a/test/testdata/inferencepool-e2e.yaml b/test/testdata/inferencepool-e2e.yaml
index 77d454e6f..e1bb9b09e 100644
--- a/test/testdata/inferencepool-e2e.yaml
+++ b/test/testdata/inferencepool-e2e.yaml
@@ -44,7 +44,7 @@ metadata:
namespace: $E2E_NS
rules:
- apiGroups: [ "inference.networking.x-k8s.io" ]
- resources: [ "inferenceobjectives", "inferencepools" ]
+ resources: [ "inferenceobjectives" ]
verbs: [ "get", "watch", "list" ]
- apiGroups: [ "inference.networking.k8s.io" ]
resources: [ "inferencepools" ]
diff --git a/test/testdata/inferencepool-leader-election-e2e.yaml b/test/testdata/inferencepool-leader-election-e2e.yaml
index 976fbbd02..57a3002a2 100644
--- a/test/testdata/inferencepool-leader-election-e2e.yaml
+++ b/test/testdata/inferencepool-leader-election-e2e.yaml
@@ -42,7 +42,7 @@ metadata:
namespace: $E2E_NS
rules:
- apiGroups: [ "inference.networking.x-k8s.io" ]
- resources: [ "inferenceobjectives", "inferencepools" ]
+ resources: [ "inferenceobjectives"]
verbs: [ "get", "watch", "list" ]
- apiGroups: [ "inference.networking.k8s.io" ]
resources: [ "inferencepools" ]
diff --git a/test/utils/utils.go b/test/utils/utils.go
index b65834cb6..48715bca3 100644
--- a/test/utils/utils.go
+++ b/test/utils/utils.go
@@ -151,7 +151,7 @@ func DeleteClusterResources(testConfig *TestConfig) error {
}
pool := &apiextv1.CustomResourceDefinition{
ObjectMeta: metav1.ObjectMeta{
- Name: "inferencepools.inference.networking.x-k8s.io",
+ Name: "inferencepools.inference.networking.k8s.io",
},
}
err = testConfig.K8sClient.Delete(testConfig.Context, pool, client.PropagationPolicy(metav1.DeletePropagationForeground))