Skip to content

cleanup: simplify endpointpickerconfig #1324

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 1 addition & 27 deletions api/v1/inferencepool_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,6 @@ type InferencePoolSpec struct {
// +kubebuilder:validation:Required
TargetPortNumber int32 `json:"targetPortNumber"`

// EndpointPickerConfig specifies the configuration needed by the proxy to discover and connect to the endpoint
// picker service that picks endpoints for the requests routed to this pool.
EndpointPickerConfig `json:",inline"`
}

// EndpointPickerConfig specifies the configuration needed by the proxy to discover and connect to the endpoint picker extension.
// This type is intended to be a union of mutually exclusive configuration options that we may add in the future.
type EndpointPickerConfig struct {
// Extension configures an endpoint picker as an extension service.
//
// +kubebuilder:validation:Required
Expand All @@ -85,21 +77,6 @@ type EndpointPickerConfig struct {

// Extension specifies how to configure an extension that runs the endpoint picker.
type Extension struct {
// Reference is a reference to a service extension. When ExtensionReference is invalid,
// a 5XX status code MUST be returned for the request that would have otherwise been routed
// to the invalid backend.
ExtensionReference `json:",inline"`

// ExtensionConnection configures the connection between the Gateway and the extension.
ExtensionConnection `json:",inline"`
}

// ExtensionReference is a reference to the extension.
//
// If a reference is invalid, the implementation MUST update the `ResolvedRefs`
// Condition on the InferencePool's status to `status: False`. A 5XX status code MUST be returned
// for the request that would have otherwise been routed to the invalid backend.
type ExtensionReference struct {
// Group is the group of the referent.
// The default value is "", representing the Core API group.
//
Expand Down Expand Up @@ -132,10 +109,7 @@ type ExtensionReference struct {
//
// +optional
PortNumber *PortNumber `json:"portNumber,omitempty"`
}

// ExtensionConnection encapsulates options that configures the connection to the extension.
type ExtensionConnection struct {
// Configures how the gateway handles the case when the extension is not responsive.
// Defaults to failClose.
//
Expand Down Expand Up @@ -261,7 +235,7 @@ const (
InferencePoolReasonResolvedRefs InferencePoolReason = "ResolvedRefs"

// This reason is used with the "ResolvedRefs" condition when the
// ExtensionRef is invalid in some way. This can include an unsupported kind
// 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"
)
Expand Down
74 changes: 13 additions & 61 deletions api/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 1 addition & 24 deletions apix/v1alpha2/inferencepool_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,26 +85,6 @@ type EndpointPickerConfig struct {

// Extension specifies how to configure an extension that runs the endpoint picker.
type Extension struct {
// Reference is a reference to a service extension. When ExtensionReference is invalid,
// a 5XX status code MUST be returned for the request that would have otherwise been routed
// to the invalid backend.
ExtensionReference `json:",inline"`

// ExtensionConnection configures the connection between the Gateway and the extension.
ExtensionConnection `json:",inline"`
}

// ExtensionReference is a reference to the extension.
//
// Connections to this extension MUST use TLS by default. Implementations MAY
// provide a way to customize this connection to use cleartext, a different
// protocol, or custom TLS configuration.
//
// If a reference is invalid, the implementation MUST update the `ResolvedRefs`
// Condition on the InferencePool's status to `status: False`. A 5XX status code
// MUST be returned for the request that would have otherwise been routed to the
// invalid backend.
type ExtensionReference struct {
// Group is the group of the referent.
// The default value is "", representing the Core API group.
//
Expand Down Expand Up @@ -137,10 +117,7 @@ type ExtensionReference struct {
//
// +optional
PortNumber *PortNumber `json:"portNumber,omitempty"`
}

// ExtensionConnection encapsulates options that configures the connection to the extension.
type ExtensionConnection struct {
// Configures how the gateway handles the case when the extension is not responsive.
// Defaults to failClose.
//
Expand Down Expand Up @@ -266,7 +243,7 @@ const (
InferencePoolReasonResolvedRefs InferencePoolReason = "ResolvedRefs"

// This reason is used with the "ResolvedRefs" condition when the
// ExtensionRef is invalid in some way. This can include an unsupported kind
// 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"
)
Expand Down
48 changes: 8 additions & 40 deletions apix/v1alpha2/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 0 additions & 39 deletions client-go/applyconfiguration/api/v1/endpointpickerconfig.go

This file was deleted.

17 changes: 10 additions & 7 deletions client-go/applyconfiguration/api/v1/extension.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading