Skip to content

Commit 36399c3

Browse files
feat(containers): add cpu limit to update/create container request messages (#3041)
Co-authored-by: Rémy Léone <[email protected]>
1 parent 225f4db commit 36399c3

27 files changed

+300
-211
lines changed

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

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3-
Create a new container.
3+
Create a new container in the specified region.
44

55
USAGE:
66
scw container container create [arg=value ...]
77

88
ARGS:
9-
[namespace-id]
10-
[name=<generated>]
11-
[environment-variables.{key}]
12-
[min-scale]
13-
[max-scale]
14-
[memory-limit]
9+
[namespace-id] UUID of the namespace the container belongs to
10+
[name] Name of the container
11+
[environment-variables.{key}] Environment variables of the container
12+
[min-scale] Minimum number of instances to scale the container to
13+
[max-scale] Maximum number of instances to scale the container to
14+
[memory-limit] Memory limit of the container in MB
15+
[cpu-limit] CPU limit of the container in mvCPU
1516
[timeout.seconds]
1617
[timeout.nanos]
17-
[privacy] (unknown_privacy | public | private)
18-
[description]
19-
[registry-image]
20-
[max-concurrency]
21-
[protocol] (unknown_protocol | http1 | h2c)
22-
[port]
18+
[privacy] Privacy setting of the container (unknown_privacy | public | private)
19+
[description] Description of the container
20+
[registry-image] Name of the registry image (e.g. "rg.fr-par.scw.cloud/something/image:tag").
21+
[max-concurrency] Number of maximum concurrent executions of the container
22+
[protocol] Protocol the container uses (unknown_protocol | http1 | h2c)
23+
[port] Port the container listens on
2324
[secret-environment-variables.{index}.key]
2425
[secret-environment-variables.{index}.value]
2526
[http-option=enabled] Configure how HTTP and HTTPS requests are handled (unknown_http_option | enabled | redirected)

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3-
Delete the container associated with the given id.
3+
Delete the container associated with the specified ID.
44

55
USAGE:
66
scw container container delete <container-id ...> [arg=value ...]
77

88
ARGS:
9-
container-id
9+
container-id UUID of the container to delete
1010
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
1111

1212
FLAGS:

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3-
Deploy a container associated with the given id.
3+
Deploy a container associated with the specified ID.
44

55
USAGE:
66
scw container container deploy <container-id ...> [arg=value ...]
77

88
ARGS:
9-
container-id
9+
container-id UUID of the container to deploy
1010
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
1111

1212
FLAGS:

cmd/scw/testdata/test-all-usage-container-container-get-logs-usage.golden

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3-
List your container logs.
3+
List the logs of the container with the specified ID.
44

55
USAGE:
66
scw container container get-logs <container-id ...> [arg=value ...]
77

88
ARGS:
9-
container-id
10-
[order-by] (timestamp_desc | timestamp_asc)
9+
container-id UUID of the container
10+
[order-by] Order of the logs (timestamp_desc | timestamp_asc)
1111
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw | all)
1212

1313
FLAGS:

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3-
Get the container associated with the given id.
3+
Get the container associated with the specified ID.
44

55
USAGE:
66
scw container container get <container-id ...> [arg=value ...]
77

88
ARGS:
9-
container-id
9+
container-id UUID of the container to get
1010
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
1111

1212
FLAGS:

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3-
List all your containers.
3+
List all containers for a specified region.
44

55
USAGE:
66
scw container container list [arg=value ...]
77

88
ARGS:
9-
[order-by] (created_at_asc | created_at_desc | name_asc | name_desc)
10-
[namespace-id]
11-
[name]
12-
[project-id]
13-
[organization-id]
9+
[order-by] Order of the containers (created_at_asc | created_at_desc | name_asc | name_desc)
10+
[namespace-id] UUID of the namespace the container belongs to
11+
[name] Name of the container
12+
[project-id] UUID of the Project the container belongs to
13+
[organization-id] UUID of the Organization the container belongs to
1414
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw | all)
1515

1616
FLAGS:

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

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3-
Update the container associated with the given id.
3+
Update the container associated with the specified ID.
44

55
USAGE:
66
scw container container update <container-id ...> [arg=value ...]
77

88
ARGS:
9-
container-id
10-
[environment-variables.{key}]
11-
[min-scale]
12-
[max-scale]
13-
[memory-limit]
9+
container-id UUID of the container to update
10+
[environment-variables.{key}] Environment variables of the container
11+
[min-scale] Minimum number of instances to scale the container to
12+
[max-scale] Maximum number of instances to scale the container to
13+
[memory-limit] Memory limit of the container in MB
14+
[cpu-limit] CPU limit of the container in mvCPU
1415
[timeout.seconds]
1516
[timeout.nanos]
16-
[redeploy]
17-
[privacy] (unknown_privacy | public | private)
18-
[description]
19-
[registry-image]
20-
[max-concurrency]
17+
[redeploy] Defines whether to redeploy failed containers
18+
[privacy] Privacy settings of the container (unknown_privacy | public | private)
19+
[description] Description of the container
20+
[registry-image] Name of the registry image (e.g. "rg.fr-par.scw.cloud/something/image:tag").
21+
[max-concurrency] Number of maximum concurrent executions of the container
2122
[protocol] (unknown_protocol | http1 | h2c)
2223
[port]
2324
[secret-environment-variables.{index}.key]

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ USAGE:
66
scw container cron create [arg=value ...]
77

88
ARGS:
9-
[container-id]
10-
[schedule]
11-
[args]
12-
[name]
9+
[container-id] UUID of the container to invoke by the cron
10+
[schedule] UNIX cron shedule
11+
[args] Arguments to pass with the cron
12+
[name] Name of the cron to create
1313
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
1414

1515
FLAGS:

cmd/scw/testdata/test-all-usage-container-cron-delete-usage.golden

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3-
Delete the cron associated with the given id.
3+
Delete the cron associated with the specified ID.
44

55
USAGE:
66
scw container cron delete <cron-id ...> [arg=value ...]
77

88
ARGS:
9-
cron-id
9+
cron-id UUID of the cron to delete
1010
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
1111

1212
FLAGS:

cmd/scw/testdata/test-all-usage-container-cron-get-usage.golden

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
🎲🎲🎲 EXIT CODE: 0 🎲🎲🎲
22
🟥🟥🟥 STDERR️️ 🟥🟥🟥️
3-
Get the cron associated with the given id.
3+
Get the cron associated with the specified ID.
44

55
USAGE:
66
scw container cron get <cron-id ...> [arg=value ...]
77

88
ARGS:
9-
cron-id
9+
cron-id UUID of the cron to get
1010
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
1111

1212
FLAGS:

0 commit comments

Comments
 (0)