Skip to content

Commit dab81b1

Browse files
committed
TargetPortNumber int32 to become TargetPorts []Port
1 parent 2d7613c commit dab81b1

File tree

6 files changed

+106
-20
lines changed

6 files changed

+106
-20
lines changed

api/v1/inferencepool_types.go

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,19 +61,28 @@ type InferencePoolSpec struct {
6161
// +kubebuilder:validation:Required
6262
Selector map[LabelKey]LabelValue `json:"selector"`
6363

64-
// TargetPortNumber defines the port number to access the selected model server Pods.
65-
// The number must be in the range 1 to 65535.
64+
// TargetPorts defines the ports to access the selected model server Pods.
6665
//
67-
// +kubebuilder:validation:Minimum=1
68-
// +kubebuilder:validation:Maximum=65535
6966
// +kubebuilder:validation:Required
70-
TargetPortNumber int32 `json:"targetPortNumber"`
67+
// +kubebuilder:validation:MinItems=1
68+
// +kubebuilder:validation:MaxItems=1
69+
TargetPorts []Port `json:"targetPorts"`
7170

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

76+
type Port struct {
77+
// PortNumber defines the port number to access the selected model server Pods.
78+
// The number must be in the range 1 to 65535.
79+
//
80+
// +kubebuilder:validation:Minimum=1
81+
// +kubebuilder:validation:Maximum=65535
82+
// +kubebuilder:validation:Required
83+
PortNumber int32 `json:"portNumber"`
84+
}
85+
7786
// EndpointPickerConfig specifies the configuration needed by the proxy to discover and connect to the endpoint picker extension.
7887
// This type is intended to be a union of mutually exclusive configuration options that we may add in the future.
7988
type EndpointPickerConfig struct {

api/v1/zz_generated.deepcopy.go

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

client-go/applyconfiguration/api/v1/inferencepoolspec.go

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

client-go/applyconfiguration/api/v1/port.go

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

client-go/applyconfiguration/utils.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.

config/crd/bases/inference.networking.k8s.io_inferencepools.yaml

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -121,18 +121,29 @@ spec:
121121
If specified, it will be applied to match the model server pods in the same namespace as the InferencePool.
122122
Cross namesoace selector is not supported.
123123
type: object
124-
targetPortNumber:
125-
description: |-
126-
TargetPortNumber defines the port number to access the selected model server Pods.
127-
The number must be in the range 1 to 65535.
128-
format: int32
129-
maximum: 65535
130-
minimum: 1
131-
type: integer
124+
targetPorts:
125+
description: TargetPorts defines the ports to access the selected
126+
model server Pods.
127+
items:
128+
properties:
129+
portNumber:
130+
description: |-
131+
PortNumber defines the port number to access the selected model server Pods.
132+
The number must be in the range 1 to 65535.
133+
format: int32
134+
maximum: 65535
135+
minimum: 1
136+
type: integer
137+
required:
138+
- portNumber
139+
type: object
140+
maxItems: 1
141+
minItems: 1
142+
type: array
132143
required:
133144
- extensionRef
134145
- selector
135-
- targetPortNumber
146+
- targetPorts
136147
type: object
137148
status:
138149
default:

0 commit comments

Comments
 (0)