From 772e9826da26758467e0733dc970fbaec6b671f0 Mon Sep 17 00:00:00 2001 From: Scaleway Bot Date: Tue, 30 Jul 2024 17:48:56 +0200 Subject: [PATCH] feat(container): add local storage limit (#4021) --- ...l-usage-container-container-create-usage.golden | 1 + ...l-usage-container-container-update-usage.golden | 1 + docs/commands/container.md | 2 ++ .../namespaces/container/v1beta1/container_cli.go | 14 ++++++++++++++ 4 files changed, 18 insertions(+) diff --git a/cmd/scw/testdata/test-all-usage-container-container-create-usage.golden b/cmd/scw/testdata/test-all-usage-container-container-create-usage.golden index 6f14e34501..26603de726 100644 --- a/cmd/scw/testdata/test-all-usage-container-container-create-usage.golden +++ b/cmd/scw/testdata/test-all-usage-container-container-create-usage.golden @@ -24,6 +24,7 @@ ARGS: [secret-environment-variables.{index}.value] [http-option=enabled] Configure how HTTP and HTTPS requests are handled (unknown_http_option | enabled | redirected) [sandbox] Execution environment of the container (unknown_sandbox | v1 | v2) + [local-storage-limit] Local storage limit of the container (in MB) [deploy=true] Deploy container after creation [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw) diff --git a/cmd/scw/testdata/test-all-usage-container-container-update-usage.golden b/cmd/scw/testdata/test-all-usage-container-container-update-usage.golden index 25d3e9dd25..e490d3f955 100644 --- a/cmd/scw/testdata/test-all-usage-container-container-update-usage.golden +++ b/cmd/scw/testdata/test-all-usage-container-container-update-usage.golden @@ -24,6 +24,7 @@ ARGS: [secret-environment-variables.{index}.value] [http-option=enabled] Configure how HTTP and HTTPS requests are handled (unknown_http_option | enabled | redirected) [sandbox] Execution environment of the container (unknown_sandbox | v1 | v2) + [local-storage-limit] Local storage limit of the container (in MB) [region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw) FLAGS: diff --git a/docs/commands/container.md b/docs/commands/container.md index 1022af255d..f69c7f4477 100644 --- a/docs/commands/container.md +++ b/docs/commands/container.md @@ -78,6 +78,7 @@ scw container container create [arg=value ...] | secret-environment-variables.{index}.value | | | | http-option | Default: `enabled`
One of: `unknown_http_option`, `enabled`, `redirected` | Configure how HTTP and HTTPS requests are handled | | sandbox | One of: `unknown_sandbox`, `v1`, `v2` | Execution environment of the container | +| local-storage-limit | | Local storage limit of the container (in MB) | | deploy | Default: `true` | Deploy container after creation | | region | Default: `fr-par`
One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config | @@ -200,6 +201,7 @@ scw container container update [arg=value ...] | secret-environment-variables.{index}.value | | | | http-option | Default: `enabled`
One of: `unknown_http_option`, `enabled`, `redirected` | Configure how HTTP and HTTPS requests are handled | | sandbox | One of: `unknown_sandbox`, `v1`, `v2` | Execution environment of the container | +| local-storage-limit | | Local storage limit of the container (in MB) | | region | Default: `fr-par`
One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config | diff --git a/internal/namespaces/container/v1beta1/container_cli.go b/internal/namespaces/container/v1beta1/container_cli.go index 6f825edb35..fd1b41c6d5 100644 --- a/internal/namespaces/container/v1beta1/container_cli.go +++ b/internal/namespaces/container/v1beta1/container_cli.go @@ -591,6 +591,13 @@ func containerContainerCreate() *core.Command { Positional: false, EnumValues: []string{"unknown_sandbox", "v1", "v2"}, }, + { + Name: "local-storage-limit", + Short: `Local storage limit of the container (in MB)`, + Required: false, + Deprecated: false, + Positional: false, + }, core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw), }, Run: func(ctx context.Context, args interface{}) (i interface{}, e error) { @@ -741,6 +748,13 @@ func containerContainerUpdate() *core.Command { Positional: false, EnumValues: []string{"unknown_sandbox", "v1", "v2"}, }, + { + Name: "local-storage-limit", + Short: `Local storage limit of the container (in MB)`, + Required: false, + Deprecated: false, + Positional: false, + }, core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw), }, Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {