Skip to content

Commit 0ecfec6

Browse files
feat(serverless): add command and args to containers (#2155)
Co-authored-by: Jonathan R. <[email protected]>
1 parent 6c16e21 commit 0ecfec6

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

packages_generated/container/src/v1beta1/marshalling.gen.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ export const unmarshalContainer = (data: unknown): Container => {
130130
}
131131

132132
return {
133+
args: data.args,
134+
command: data.command,
133135
cpuLimit: data.cpu_limit,
134136
createdAt: unmarshalDate(data.created_at),
135137
description: data.description,
@@ -484,6 +486,8 @@ export const marshalCreateContainerRequest = (
484486
request: CreateContainerRequest,
485487
defaults: DefaultValues,
486488
): Record<string, unknown> => ({
489+
args: request.args,
490+
command: request.command,
487491
cpu_limit: request.cpuLimit,
488492
description: request.description,
489493
environment_variables: request.environmentVariables,
@@ -641,6 +645,8 @@ export const marshalUpdateContainerRequest = (
641645
request: UpdateContainerRequest,
642646
defaults: DefaultValues,
643647
): Record<string, unknown> => ({
648+
args: request.args,
649+
command: request.command,
644650
cpu_limit: request.cpuLimit,
645651
description: request.description,
646652
environment_variables: request.environmentVariables,

packages_generated/container/src/v1beta1/types.gen.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,14 @@ export interface Container {
369369
*/
370370
tags: string[]
371371
privateNetworkId?: string
372+
/**
373+
* Command executed when the container starts. This overrides the default command defined in the container image. This is usually the main executable, or entry point script to run.
374+
*/
375+
command: string[]
376+
/**
377+
* Arguments passed to the command specified in the "command" field. These override the default arguments from the container image, and behave like command-line parameters.
378+
*/
379+
args: string[]
372380
}
373381

374382
export interface Cron {
@@ -680,6 +688,14 @@ export type CreateContainerRequest = {
680688
*/
681689
tags?: string[]
682690
privateNetworkId?: string
691+
/**
692+
* Command executed when the container starts. This overrides the default command defined in the container image. This is usually the main executable, or entry point script to run.
693+
*/
694+
command?: string[]
695+
/**
696+
* Arguments passed to the command specified in the "command" field. These override the default arguments from the container image, and behave like command-line parameters.
697+
*/
698+
args?: string[]
683699
}
684700

685701
export type CreateCronRequest = {
@@ -1281,6 +1297,14 @@ export type UpdateContainerRequest = {
12811297
*/
12821298
tags?: string[]
12831299
privateNetworkId?: string
1300+
/**
1301+
* Command executed when the container starts. This overrides the default command defined in the container image. This is usually the main executable, or entry point script to run.
1302+
*/
1303+
command?: string[]
1304+
/**
1305+
* Arguments passed to the command specified in the "command" field. These override the default arguments from the container image, and behave like command-line parameters.
1306+
*/
1307+
args?: string[]
12841308
}
12851309

12861310
export type UpdateCronRequest = {

0 commit comments

Comments
 (0)