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 48b67cbdcd..089f71c5f9 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
@@ -25,6 +25,7 @@ ARGS:
[sandbox] Execution environment of the container (unknown_sandbox | v1 | v2)
[local-storage-limit] Local storage limit of the container (in MB)
[scaling-option.concurrent-requests-threshold]
+ [scaling-option.cpu-usage-threshold]
[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 ac021be43c..689b0045bf 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
@@ -25,6 +25,7 @@ ARGS:
[sandbox] Execution environment of the container (unknown_sandbox | v1 | v2)
[local-storage-limit] Local storage limit of the container (in MB)
[scaling-option.concurrent-requests-threshold]
+ [scaling-option.cpu-usage-threshold]
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
DEPRECATED ARGS:
diff --git a/docs/commands/container.md b/docs/commands/container.md
index 984b69147f..5e7c57c6b4 100644
--- a/docs/commands/container.md
+++ b/docs/commands/container.md
@@ -80,6 +80,7 @@ scw container container create [arg=value ...]
| sandbox | One of: `unknown_sandbox`, `v1`, `v2` | Execution environment of the container |
| local-storage-limit | | Local storage limit of the container (in MB) |
| scaling-option.concurrent-requests-threshold | | |
+| scaling-option.cpu-usage-threshold | | |
| 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 |
@@ -204,6 +205,7 @@ scw container container update [arg=value ...]
| sandbox | One of: `unknown_sandbox`, `v1`, `v2` | Execution environment of the container |
| local-storage-limit | | Local storage limit of the container (in MB) |
| scaling-option.concurrent-requests-threshold | | |
+| scaling-option.cpu-usage-threshold | | |
| 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/go.mod b/go.mod
index f66104e1f4..496b10d708 100644
--- a/go.mod
+++ b/go.mod
@@ -26,7 +26,7 @@ require (
github.com/mattn/go-isatty v0.0.20
github.com/moby/buildkit v0.13.2
github.com/opencontainers/go-digest v1.0.0
- github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241028153617-2a48843b5fcb
+ github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241029155651-7d2e04989bb6
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
github.com/spf13/cobra v1.8.1
github.com/spf13/pflag v1.0.5
diff --git a/go.sum b/go.sum
index 791e72a6be..ab6cbcfbed 100644
--- a/go.sum
+++ b/go.sum
@@ -465,8 +465,8 @@ github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUz
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
-github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241028153617-2a48843b5fcb h1:OsRpbw60numCy/+3FS7UhZzkdiTu6OZwq29bb4b3gNo=
-github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241028153617-2a48843b5fcb/go.mod h1:3jrRJM7638J+P33hKy9MBvfOBxNo8pEGNQQoIv65Ihg=
+github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241029155651-7d2e04989bb6 h1:wTLtvVjR/V+Rz34qp0JDMTkkPUZPY0NkiywtdqwGcPs=
+github.com/scaleway/scaleway-sdk-go v1.0.0-beta.30.0.20241029155651-7d2e04989bb6/go.mod h1:3jrRJM7638J+P33hKy9MBvfOBxNo8pEGNQQoIv65Ihg=
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
github.com/secure-systems-lab/go-securesystemslib v0.8.0 h1:mr5An6X45Kb2nddcFlbmfHkLguCE9laoZCUzEEpIZXA=
diff --git a/internal/namespaces/container/v1beta1/container_cli.go b/internal/namespaces/container/v1beta1/container_cli.go
index 16e3008e94..ed8440aa02 100644
--- a/internal/namespaces/container/v1beta1/container_cli.go
+++ b/internal/namespaces/container/v1beta1/container_cli.go
@@ -618,6 +618,12 @@ func containerContainerCreate() *core.Command {
Deprecated: false,
Positional: false,
},
+ {
+ Name: "scaling-option.cpu-usage-threshold",
+ 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) {
@@ -780,6 +786,12 @@ func containerContainerUpdate() *core.Command {
Deprecated: false,
Positional: false,
},
+ {
+ Name: "scaling-option.cpu-usage-threshold",
+ 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) {
diff --git a/internal/namespaces/function/v1beta1/testdata/test-deploy-simple.golden b/internal/namespaces/function/v1beta1/testdata/test-deploy-simple.golden
index b05ea34245..94d5b9bf01 100644
--- a/internal/namespaces/function/v1beta1/testdata/test-deploy-simple.golden
+++ b/internal/namespaces/function/v1beta1/testdata/test-deploy-simple.golden
@@ -41,5 +41,8 @@ Sandbox unknown_sandbox
"region": "fr-par",
"http_option": "enabled",
"runtime_message": "",
- "sandbox": "unknown_sandbox"
+ "sandbox": "unknown_sandbox",
+ "created_at": null,
+ "updated_at": null,
+ "ready_at": null
}