Skip to content

Commit b20b999

Browse files
authored
API: Refine ResolvedRefs condition for invalid ExtensionReference and expand InferencePoolReason values (#1070)
* refine ExtensionReference invalid case. * refine. * extend types. * refine InferencePoolReason * refine more. * refine more. * remove service and update proposals. * remove service and update proposals.
1 parent 80171af commit b20b999

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

api/v1alpha2/inferencepool_types.go

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,11 @@ type Extension struct {
9393
ExtensionConnection `json:",inline"`
9494
}
9595

96-
// ExtensionReference is a reference to the extension deployment. When ExtensionReference is invalid,
97-
// a 5XX status code MUST be returned for the request that would have otherwise been routed to the
98-
// invalid backend.
96+
// ExtensionReference is a reference to the extension.
97+
//
98+
// If a reference is invalid, the implementation MUST update the `ResolvedRefs`
99+
// Condition on the InferencePool's status to `status: False`. A 5XX status code MUST be returned
100+
// for the request that would have otherwise been routed to the invalid backend.
99101
type ExtensionReference struct {
100102
// Group is the group of the referent.
101103
// The default value is "", representing the Core API group.
@@ -209,6 +211,7 @@ const (
209211
// Possible reasons for this condition to be False are:
210212
//
211213
// * "NotSupportedByGateway"
214+
// * "HTTPRouteNotAccepted"
212215
//
213216
// Possible reasons for this condition to be Unknown are:
214217
//
@@ -227,6 +230,11 @@ const (
227230
// InferencePool as a backend.
228231
InferencePoolReasonNotSupportedByGateway InferencePoolReason = "NotSupportedByGateway"
229232

233+
// This reason is used with the "Accepted" condition when the InferencePool is
234+
// referenced by an HTTPRoute that has been rejected by the Gateway. The user
235+
// should inspect the status of the referring HTTPRoute for the specific reason.
236+
InferencePoolReasonHTTPRouteNotAccepted InferencePoolReason = "HTTPRouteNotAccepted"
237+
230238
// This reason is used with the "Accepted" when a controller has not yet
231239
// reconciled the InferencePool.
232240
InferencePoolReasonPending InferencePoolReason = "Pending"
@@ -236,7 +244,7 @@ const (
236244
// This condition indicates whether the controller was able to resolve all
237245
// the object references for the InferencePool.
238246
//
239-
// Possible reasons for this condition to be true are:
247+
// Possible reasons for this condition to be True are:
240248
//
241249
// * "ResolvedRefs"
242250
//

docs/proposals/002-api-proposal/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,11 @@ type Extension struct {
160160
ExtensionConnection `json:",inline"`
161161
}
162162

163-
// ExtensionReference is a reference to the extension deployment.
163+
// ExtensionReference is a reference to the extension.
164+
//
165+
// If a reference is invalid, the implementation MUST update the `ResolvedRefs`
166+
// Condition on the InferencePool's status to `status: False`. A 5XX status code MUST be returned
167+
// for the request that would have otherwise been routed to the invalid backend.
164168
type ExtensionReference struct {
165169
// Group is the group of the referent.
166170
// The default value is "", representing the Core API group.

0 commit comments

Comments
 (0)