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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion api/v1/inferencepool_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ type InferencePoolSpec struct {

// 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 *EndpointPickerConfig `json:"endpointPickerConfig,omitempty"`
}

// EndpointPickerConfig specifies the configuration needed by the proxy to discover and connect to the endpoint picker extension.
Expand Down
6 changes: 5 additions & 1 deletion api/v1/zz_generated.deepcopy.go

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

14 changes: 7 additions & 7 deletions client-go/applyconfiguration/api/v1/inferencepoolspec.go

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

107 changes: 57 additions & 50 deletions config/crd/bases/inference.networking.k8s.io_inferencepools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,59 +41,67 @@ spec:
spec:
description: InferencePoolSpec defines the desired state of InferencePool
properties:
extensionRef:
description: Extension configures an endpoint picker as an extension
service.
endpointPickerConfig:
description: |-
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.
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.
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.
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
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
required:
- name
- extensionRef
type: object
selector:
additionalProperties:
Expand Down Expand Up @@ -130,7 +138,6 @@ spec:
minimum: 1
type: integer
required:
- extensionRef
- selector
- targetPortNumber
type: object
Expand Down