Skip to content

Commit e260ebd

Browse files
feat(serverless): add command and args to containers (#4748)
Co-authored-by: devtools-ci-cd <[email protected]>
1 parent 5bac52b commit e260ebd

File tree

6 files changed

+39
-3
lines changed

6 files changed

+39
-3
lines changed

cmd/scw/testdata/test-all-usage-container-container-create-usage.golden

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ ARGS:
3232
[health-check.interval] Period between health checks.
3333
[tags.{index}] Tags of the Serverless Container
3434
[private-network-id]
35+
[command.{index}] Container command
36+
[args.{index}] Container arguments
3537
[deploy=true] Deploy container after creation
3638
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
3739

cmd/scw/testdata/test-all-usage-container-container-update-usage.golden

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ ARGS:
3232
[health-check.interval] Period between health checks.
3333
[tags.{index}] Tags of the Serverless Container
3434
[private-network-id]
35+
[command.{index}] Container command
36+
[args.{index}] Container arguments
3537
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
3638

3739
DEPRECATED ARGS:

docs/commands/container.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ scw container container create [arg=value ...]
8787
| health-check.interval | | Period between health checks. |
8888
| tags.{index} | | Tags of the Serverless Container |
8989
| private-network-id | | |
90+
| command.{index} | | Container command |
91+
| args.{index} | | Container arguments |
9092
| deploy | Default: `true` | Deploy container after creation |
9193
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config |
9294

@@ -218,6 +220,8 @@ scw container container update <container-id ...> [arg=value ...]
218220
| health-check.interval | | Period between health checks. |
219221
| tags.{index} | | Tags of the Serverless Container |
220222
| private-network-id | | |
223+
| command.{index} | | Container command |
224+
| args.{index} | | Container arguments |
221225
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config |
222226

223227

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ require (
2323
github.com/mattn/go-isatty v0.0.20
2424
github.com/moby/buildkit v0.13.2
2525
github.com/opencontainers/go-digest v1.0.0
26-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250516160029-3f13aad4f58a
26+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250521073217-9a5c0c809817
2727
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
2828
github.com/spf13/cobra v1.9.1
2929
github.com/spf13/pflag v1.0.6

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,8 +466,8 @@ github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUz
466466
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
467467
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
468468
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
469-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250516160029-3f13aad4f58a h1:nqYV4PtTnMTGYqUe3mQI7qm26QxcO/Jy/pA5qCOgfH0=
470-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250516160029-3f13aad4f58a/go.mod h1:qiGzapFyNPFwBBLJ+hTFykKSnU95n1zL64+o1ubmwf0=
469+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250521073217-9a5c0c809817 h1:aSM5Zrt8tQOKzZAxObc6haaFCDMc1Vo+PGwz5ufnnRY=
470+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.33.0.20250521073217-9a5c0c809817/go.mod h1:qiGzapFyNPFwBBLJ+hTFykKSnU95n1zL64+o1ubmwf0=
471471
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
472472
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
473473
github.com/secure-systems-lab/go-securesystemslib v0.8.0 h1:mr5An6X45Kb2nddcFlbmfHkLguCE9laoZCUzEEpIZXA=

internal/namespaces/container/v1beta1/container_cli.go

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,20 @@ func containerContainerCreate() *core.Command {
727727
Deprecated: false,
728728
Positional: false,
729729
},
730+
{
731+
Name: "command.{index}",
732+
Short: `Container command`,
733+
Required: false,
734+
Deprecated: false,
735+
Positional: false,
736+
},
737+
{
738+
Name: "args.{index}",
739+
Short: `Container arguments`,
740+
Required: false,
741+
Deprecated: false,
742+
Positional: false,
743+
},
730744
core.RegionArgSpec(
731745
scw.RegionFrPar,
732746
scw.RegionNlAms,
@@ -955,6 +969,20 @@ func containerContainerUpdate() *core.Command {
955969
Deprecated: false,
956970
Positional: false,
957971
},
972+
{
973+
Name: "command.{index}",
974+
Short: `Container command`,
975+
Required: false,
976+
Deprecated: false,
977+
Positional: false,
978+
},
979+
{
980+
Name: "args.{index}",
981+
Short: `Container arguments`,
982+
Required: false,
983+
Deprecated: false,
984+
Positional: false,
985+
},
958986
core.RegionArgSpec(
959987
scw.RegionFrPar,
960988
scw.RegionNlAms,

0 commit comments

Comments
 (0)