Skip to content

Commit 568e6e4

Browse files
authored
chore: fix BackendRuntime crds field Commands -> Command (#315)
* chore: fix BackendRuntime crds field Commands -> Command * add field in chart/ * revert yaml file Signed-off-by: googs1025 <[email protected]> --------- Signed-off-by: googs1025 <[email protected]>
1 parent 4b7e3ce commit 568e6e4

File tree

21 files changed

+273
-48
lines changed

21 files changed

+273
-48
lines changed

api/inference/v1alpha1/backendruntime_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ type RecommendedConfig struct {
7676

7777
// BackendRuntimeSpec defines the desired state of BackendRuntime
7878
type BackendRuntimeSpec struct {
79-
// Commands represents the default commands for the backendRuntime.
79+
// Command represents the default command for the backendRuntime.
8080
// +optional
81-
Commands []string `json:"commands,omitempty"`
81+
Command []string `json:"command,omitempty"`
8282
// Image represents the default image registry of the backendRuntime.
8383
// It will work together with version to make up a real image.
8484
Image string `json:"image"`

api/inference/v1alpha1/zz_generated.deepcopy.go

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

chart/crds/backendruntime-crd.yaml

Lines changed: 222 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ spec:
4040
spec:
4141
description: BackendRuntimeSpec defines the desired state of BackendRuntime
4242
properties:
43-
commands:
44-
description: Commands represents the default commands for the backendRuntime.
43+
command:
44+
description: Command represents the default command for the backendRuntime.
4545
items:
4646
type: string
4747
type: array
@@ -168,6 +168,226 @@ spec:
168168
Image represents the default image registry of the backendRuntime.
169169
It will work together with version to make up a real image.
170170
type: string
171+
lifecycle:
172+
description: Lifecycle represents hooks executed during the lifecycle
173+
of the container.
174+
properties:
175+
postStart:
176+
description: |-
177+
PostStart is called immediately after a container is created. If the handler fails,
178+
the container is terminated and restarted according to its restart policy.
179+
Other management of the container blocks until the hook completes.
180+
More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
181+
properties:
182+
exec:
183+
description: Exec specifies a command to execute in the container.
184+
properties:
185+
command:
186+
description: |-
187+
Command is the command line to execute inside the container, the working directory for the
188+
command is root ('/') in the container's filesystem. The command is simply exec'd, it is
189+
not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use
190+
a shell, you need to explicitly call out to that shell.
191+
Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
192+
items:
193+
type: string
194+
type: array
195+
x-kubernetes-list-type: atomic
196+
type: object
197+
httpGet:
198+
description: HTTPGet specifies an HTTP GET request to perform.
199+
properties:
200+
host:
201+
description: |-
202+
Host name to connect to, defaults to the pod IP. You probably want to set
203+
"Host" in httpHeaders instead.
204+
type: string
205+
httpHeaders:
206+
description: Custom headers to set in the request. HTTP
207+
allows repeated headers.
208+
items:
209+
description: HTTPHeader describes a custom header to
210+
be used in HTTP probes
211+
properties:
212+
name:
213+
description: |-
214+
The header field name.
215+
This will be canonicalized upon output, so case-variant names will be understood as the same header.
216+
type: string
217+
value:
218+
description: The header field value
219+
type: string
220+
required:
221+
- name
222+
- value
223+
type: object
224+
type: array
225+
x-kubernetes-list-type: atomic
226+
path:
227+
description: Path to access on the HTTP server.
228+
type: string
229+
port:
230+
anyOf:
231+
- type: integer
232+
- type: string
233+
description: |-
234+
Name or number of the port to access on the container.
235+
Number must be in the range 1 to 65535.
236+
Name must be an IANA_SVC_NAME.
237+
x-kubernetes-int-or-string: true
238+
scheme:
239+
description: |-
240+
Scheme to use for connecting to the host.
241+
Defaults to HTTP.
242+
type: string
243+
required:
244+
- port
245+
type: object
246+
sleep:
247+
description: Sleep represents a duration that the container
248+
should sleep.
249+
properties:
250+
seconds:
251+
description: Seconds is the number of seconds to sleep.
252+
format: int64
253+
type: integer
254+
required:
255+
- seconds
256+
type: object
257+
tcpSocket:
258+
description: |-
259+
Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept
260+
for backward compatibility. There is no validation of this field and
261+
lifecycle hooks will fail at runtime when it is specified.
262+
properties:
263+
host:
264+
description: 'Optional: Host name to connect to, defaults
265+
to the pod IP.'
266+
type: string
267+
port:
268+
anyOf:
269+
- type: integer
270+
- type: string
271+
description: |-
272+
Number or name of the port to access on the container.
273+
Number must be in the range 1 to 65535.
274+
Name must be an IANA_SVC_NAME.
275+
x-kubernetes-int-or-string: true
276+
required:
277+
- port
278+
type: object
279+
type: object
280+
preStop:
281+
description: |-
282+
PreStop is called immediately before a container is terminated due to an
283+
API request or management event such as liveness/startup probe failure,
284+
preemption, resource contention, etc. The handler is not called if the
285+
container crashes or exits. The Pod's termination grace period countdown begins before the
286+
PreStop hook is executed. Regardless of the outcome of the handler, the
287+
container will eventually terminate within the Pod's termination grace
288+
period (unless delayed by finalizers). Other management of the container blocks until the hook completes
289+
or until the termination grace period is reached.
290+
More info: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/#container-hooks
291+
properties:
292+
exec:
293+
description: Exec specifies a command to execute in the container.
294+
properties:
295+
command:
296+
description: |-
297+
Command is the command line to execute inside the container, the working directory for the
298+
command is root ('/') in the container's filesystem. The command is simply exec'd, it is
299+
not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use
300+
a shell, you need to explicitly call out to that shell.
301+
Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
302+
items:
303+
type: string
304+
type: array
305+
x-kubernetes-list-type: atomic
306+
type: object
307+
httpGet:
308+
description: HTTPGet specifies an HTTP GET request to perform.
309+
properties:
310+
host:
311+
description: |-
312+
Host name to connect to, defaults to the pod IP. You probably want to set
313+
"Host" in httpHeaders instead.
314+
type: string
315+
httpHeaders:
316+
description: Custom headers to set in the request. HTTP
317+
allows repeated headers.
318+
items:
319+
description: HTTPHeader describes a custom header to
320+
be used in HTTP probes
321+
properties:
322+
name:
323+
description: |-
324+
The header field name.
325+
This will be canonicalized upon output, so case-variant names will be understood as the same header.
326+
type: string
327+
value:
328+
description: The header field value
329+
type: string
330+
required:
331+
- name
332+
- value
333+
type: object
334+
type: array
335+
x-kubernetes-list-type: atomic
336+
path:
337+
description: Path to access on the HTTP server.
338+
type: string
339+
port:
340+
anyOf:
341+
- type: integer
342+
- type: string
343+
description: |-
344+
Name or number of the port to access on the container.
345+
Number must be in the range 1 to 65535.
346+
Name must be an IANA_SVC_NAME.
347+
x-kubernetes-int-or-string: true
348+
scheme:
349+
description: |-
350+
Scheme to use for connecting to the host.
351+
Defaults to HTTP.
352+
type: string
353+
required:
354+
- port
355+
type: object
356+
sleep:
357+
description: Sleep represents a duration that the container
358+
should sleep.
359+
properties:
360+
seconds:
361+
description: Seconds is the number of seconds to sleep.
362+
format: int64
363+
type: integer
364+
required:
365+
- seconds
366+
type: object
367+
tcpSocket:
368+
description: |-
369+
Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept
370+
for backward compatibility. There is no validation of this field and
371+
lifecycle hooks will fail at runtime when it is specified.
372+
properties:
373+
host:
374+
description: 'Optional: Host name to connect to, defaults
375+
to the pod IP.'
376+
type: string
377+
port:
378+
anyOf:
379+
- type: integer
380+
- type: string
381+
description: |-
382+
Number or name of the port to access on the container.
383+
Number must be in the range 1 to 65535.
384+
Name must be an IANA_SVC_NAME.
385+
x-kubernetes-int-or-string: true
386+
required:
387+
- port
388+
type: object
389+
type: object
390+
type: object
171391
livenessProbe:
172392
description: |-
173393
Periodic probe of backend liveness.

chart/crds/service-crd.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ spec:
9191
format: int32
9292
type: integer
9393
rolloutStrategy:
94+
default:
95+
rollingUpdateConfiguration:
96+
maxSurge: 0
97+
maxUnavailable: 1
98+
type: RollingUpdate
9499
description: |-
95100
RolloutStrategy defines the strategy that will be applied to update replicas
96101
when a revision is made to the leaderWorkerTemplate.

chart/templates/backends/llamacpp.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ metadata:
88
app.kubernetes.io/created-by: llmaz
99
name: llamacpp
1010
spec:
11-
commands:
11+
command:
1212
- ./llama-server
1313
image: ghcr.io/ggerganov/llama.cpp
1414
version: server

chart/templates/backends/ollama.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ metadata:
88
app.kubernetes.io/created-by: llmaz
99
name: ollama
1010
spec:
11-
commands:
11+
command:
1212
- sh
1313
- -c
1414
image: ollama/ollama

chart/templates/backends/sglang.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ metadata:
88
app.kubernetes.io/created-by: llmaz
99
name: sglang
1010
spec:
11-
commands:
11+
command:
1212
- python3
1313
- -m
1414
- sglang.launch_server

chart/templates/backends/vllm.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ metadata:
88
app.kubernetes.io/created-by: llmaz
99
name: vllm
1010
spec:
11-
commands:
11+
command:
1212
- python3
1313
- -m
1414
- vllm.entrypoints.openai.api_server

config/crd/bases/inference.llmaz.io_backendruntimes.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ spec:
4141
spec:
4242
description: BackendRuntimeSpec defines the desired state of BackendRuntime
4343
properties:
44-
commands:
45-
description: Commands represents the default commands for the backendRuntime.
44+
command:
45+
description: Command represents the default command for the backendRuntime.
4646
items:
4747
type: string
4848
type: array

docs/reference/inference.v1alpha1.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,11 +213,11 @@ SharedMemorySize defined here will &quot;overwrite&quot; the sharedMemorySize in
213213
<tbody>
214214

215215

216-
<tr><td><code>commands</code><br/>
216+
<tr><td><code>command</code><br/>
217217
<code>[]string</code>
218218
</td>
219219
<td>
220-
<p>Commands represents the default commands for the backendRuntime.</p>
220+
<p>Command represents the default command for the backendRuntime.</p>
221221
</td>
222222
</tr>
223223
<tr><td><code>image</code> <B>[Required]</B><br/>

0 commit comments

Comments
 (0)