@@ -31,7 +31,11 @@ type InferencePool struct {
31
31
metav1.TypeMeta `json:",inline"`
32
32
metav1.ObjectMeta `json:"metadata,omitempty"`
33
33
34
- Spec InferencePoolSpec `json:"spec,omitempty"`
34
+ Spec InferencePoolSpec `json:"spec,omitempty"`
35
+
36
+ // Status defines the observed state of InferencePool.
37
+ //
38
+ // +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"}}}}}
35
39
Status InferencePoolStatus `json:"status,omitempty"`
36
40
}
37
41
@@ -150,14 +154,19 @@ const (
150
154
FailClose ExtensionFailureMode = "FailClose"
151
155
)
152
156
153
- // InferencePoolStatus defines the observed state of InferencePool
157
+ // InferencePoolStatus defines the observed state of InferencePool.
154
158
type InferencePoolStatus struct {
155
159
// Parents is a list of parent resources (usually Gateways) that are
156
- // associated with the route , and the status of the InferencePool with respect to
160
+ // associated with the InferencePool , and the status of the InferencePool with respect to
157
161
// each parent.
158
162
//
159
- // A maximum of 32 Gateways will be represented in this list. An empty list
160
- // means the route has not been attached to any Gateway.
163
+ // A maximum of 32 Gateways will be represented in this list. When the list contains
164
+ // `kind: Status, name: default`, it indicates that the InferencePool is not
165
+ // associated with any Gateway and a controller must perform the following:
166
+ //
167
+ // - Remove the parent when setting the "Accepted" condition.
168
+ // - Add the parent when the controller will no longer manage the InferencePool
169
+ // and no other parents exist.
161
170
//
162
171
// +kubebuilder:validation:MaxItems=32
163
172
Parents []PoolStatus `json:"parent,omitempty"`
@@ -190,7 +199,7 @@ type InferencePoolConditionType string
190
199
type InferencePoolReason string
191
200
192
201
const (
193
- // This condition indicates whether the route has been accepted or rejected
202
+ // This condition indicates whether the InferencePool has been accepted or rejected
194
203
// by a Gateway, and why.
195
204
//
196
205
// Possible reasons for this condition to be True are:
@@ -209,7 +218,7 @@ const (
209
218
// prefer to use the reasons listed above to improve interoperability.
210
219
InferencePoolConditionAccepted InferencePoolConditionType = "Accepted"
211
220
212
- // This reason is used with the "Accepted" condition when the Route has been
221
+ // This reason is used with the "Accepted" condition when the InferencePool has been
213
222
// accepted by the Gateway.
214
223
InferencePoolReasonAccepted InferencePoolReason = "Accepted"
215
224
@@ -219,7 +228,7 @@ const (
219
228
InferencePoolReasonNotSupportedByGateway InferencePoolReason = "NotSupportedByGateway"
220
229
221
230
// This reason is used with the "Accepted" when a controller has not yet
222
- // reconciled the route .
231
+ // reconciled the InferencePool .
223
232
InferencePoolReasonPending InferencePoolReason = "Pending"
224
233
)
225
234
0 commit comments