Skip to content

Commit c548ac5

Browse files
committed
Add nested status
1 parent 2acfaab commit c548ac5

File tree

13 files changed

+512
-13
lines changed

13 files changed

+512
-13
lines changed

api/v1alpha2/doc.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2024 The Kubernetes Authors.
2+
Copyright 2025 The Kubernetes Authors.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -14,10 +14,10 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
// Package v1alpha1 contains API Schema definitions for the
17+
// Package v1alpha2 contains API Schema definitions for the
1818
// inference.networking.x-k8s.io API group.
1919
//
2020
// +k8s:openapi-gen=true
2121
// +kubebuilder:object:generate=true
2222
// +groupName=inference.networking.x-k8s.io
23-
package v1alpha1
23+
package v1alpha2

api/v1alpha2/groupversion_info.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2024 The Kubernetes Authors.
2+
Copyright 2025 The Kubernetes Authors.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -14,10 +14,10 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
// Package v1alpha1 contains API Schema definitions for the gateway v1alpha1 API group
17+
// Package v1alpha2 contains API Schema definitions for the gateway v1alpha2 API group
1818
// +kubebuilder:object:generate=true
1919
// +groupName=inference.networking.x-k8s.io
20-
package v1alpha1
20+
package v1alpha2
2121

2222
import (
2323
"k8s.io/apimachinery/pkg/runtime/schema"
@@ -26,7 +26,7 @@ import (
2626

2727
var (
2828
// GroupVersion is group version used to register these objects
29-
GroupVersion = schema.GroupVersion{Group: "inference.networking.x-k8s.io", Version: "v1alpha1"}
29+
GroupVersion = schema.GroupVersion{Group: "inference.networking.x-k8s.io", Version: "v1alpha2"}
3030

3131
// SchemeGroupVersion is alias to GroupVersion for client-go libraries.
3232
// It is required by pkg/client/informers/externalversions/...

api/v1alpha2/inferencemodel_types.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2024 The Kubernetes Authors.
2+
Copyright 2025 The Kubernetes Authors.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
package v1alpha1
17+
package v1alpha2
1818

1919
import (
2020
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -24,6 +24,7 @@ import (
2424
//
2525
// +kubebuilder:object:root=true
2626
// +kubebuilder:subresource:status
27+
// +kubebuilder:storageversion
2728
// +genclient
2829
type InferenceModel struct {
2930
metav1.TypeMeta `json:",inline"`

api/v1alpha2/inferencepool_types.go

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright 2024 The Kubernetes Authors.
2+
Copyright 2025 The Kubernetes Authors.
33
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
@@ -14,16 +14,18 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
package v1alpha1
17+
package v1alpha2
1818

1919
import (
20+
corev1 "k8s.io/api/core/v1"
2021
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2122
)
2223

2324
// InferencePool is the Schema for the InferencePools API.
2425
//
2526
// +kubebuilder:object:root=true
2627
// +kubebuilder:subresource:status
28+
// +kubebuilder:storageversion
2729
// +genclient
2830
type InferencePool struct {
2931
metav1.TypeMeta `json:",inline"`
@@ -112,13 +114,13 @@ type ExtensionReference struct {
112114
// +kubebuilder:validation:Required
113115
Name string `json:"name"`
114116

115-
// The port number on the pods running the extension. When unspecified, implementations SHOULD infer a
117+
// The port number on the service running the extension. When unspecified, implementations SHOULD infer a
116118
// default value of 9002 when the Kind is Service.
117119
//
118120
// +kubebuilder:validation:Minimum=1
119121
// +kubebuilder:validation:Maximum=65535
120122
// +optional
121-
TargetPortNumber *int32 `json:"targetPortNumber,omitempty"`
123+
PortNumber *int32 `json:"targetPortNumber,omitempty"`
122124
}
123125

124126
// ExtensionConnection encapsulates options that configures the connection to the extension.
@@ -186,6 +188,21 @@ type LabelValue string
186188

187189
// InferencePoolStatus defines the observed state of InferencePool
188190
type InferencePoolStatus struct {
191+
// Parents is a list of parent resources (usually Gateways) that are
192+
// associated with the route, and the status of the InferencePool with respect to
193+
// each parent.
194+
//
195+
// A maximum of 32 Gateways will be represented in this list. An empty list
196+
// means the route has not been attached to any Gateway.
197+
//
198+
// +kubebuilder:validation:MaxItems=32
199+
Parents []PoolStatus `json:"parent,omitempty"`
200+
}
201+
202+
// PoolStatus defines the observed state of InferencePool from a gateway.
203+
type PoolStatus struct {
204+
// GatewayRef indicates the gateway that observed state of InferencePool.
205+
GatewayRef corev1.ObjectReference `json:"parentRef"`
189206
// Conditions track the state of the InferencePool.
190207
//
191208
// Known condition types are:

client-go/applyconfiguration/utils.go

Lines changed: 28 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client-go/clientset/versioned/clientset.go

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client-go/clientset/versioned/fake/clientset_generated.go

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client-go/clientset/versioned/fake/register.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client-go/clientset/versioned/scheme/register.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client-go/informers/externalversions/api/interface.go

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client-go/informers/externalversions/generic.go

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)