Skip to content

Commit fce563f

Browse files
feat(serverless): add option to scale on memory usage (#4256)
Co-authored-by: Jonathan R. <[email protected]>
1 parent 4dbec5b commit fce563f

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ ARGS:
2626
[local-storage-limit] Local storage limit of the container (in MB)
2727
[scaling-option.concurrent-requests-threshold]
2828
[scaling-option.cpu-usage-threshold]
29+
[scaling-option.memory-usage-threshold]
2930
[health-check.http.path] Path to use for the HTTP health check.
3031
[health-check.failure-threshold] Number of consecutive health check failures before considering the container unhealthy.
3132
[health-check.interval] Period between health checks.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ ARGS:
2626
[local-storage-limit] Local storage limit of the container (in MB)
2727
[scaling-option.concurrent-requests-threshold]
2828
[scaling-option.cpu-usage-threshold]
29+
[scaling-option.memory-usage-threshold]
2930
[health-check.http.path] Path to use for the HTTP health check.
3031
[health-check.failure-threshold] Number of consecutive health check failures before considering the container unhealthy.
3132
[health-check.interval] Period between health checks.

docs/commands/container.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ scw container container create [arg=value ...]
8181
| local-storage-limit | | Local storage limit of the container (in MB) |
8282
| scaling-option.concurrent-requests-threshold | | |
8383
| scaling-option.cpu-usage-threshold | | |
84+
| scaling-option.memory-usage-threshold | | |
8485
| health-check.http.path | | Path to use for the HTTP health check. |
8586
| health-check.failure-threshold | | Number of consecutive health check failures before considering the container unhealthy. |
8687
| health-check.interval | | Period between health checks. |
@@ -209,6 +210,7 @@ scw container container update <container-id ...> [arg=value ...]
209210
| local-storage-limit | | Local storage limit of the container (in MB) |
210211
| scaling-option.concurrent-requests-threshold | | |
211212
| scaling-option.cpu-usage-threshold | | |
213+
| scaling-option.memory-usage-threshold | | |
212214
| health-check.http.path | | Path to use for the HTTP health check. |
213215
| health-check.failure-threshold | | Number of consecutive health check failures before considering the container unhealthy. |
214216
| health-check.interval | | Period between health checks. |

internal/namespaces/container/v1beta1/container_cli.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,12 @@ func containerContainerCreate() *core.Command {
624624
Deprecated: false,
625625
Positional: false,
626626
},
627+
{
628+
Name: "scaling-option.memory-usage-threshold",
629+
Required: false,
630+
Deprecated: false,
631+
Positional: false,
632+
},
627633
{
628634
Name: "health-check.http.path",
629635
Short: `Path to use for the HTTP health check.`,
@@ -813,6 +819,12 @@ func containerContainerUpdate() *core.Command {
813819
Deprecated: false,
814820
Positional: false,
815821
},
822+
{
823+
Name: "scaling-option.memory-usage-threshold",
824+
Required: false,
825+
Deprecated: false,
826+
Positional: false,
827+
},
816828
{
817829
Name: "health-check.http.path",
818830
Short: `Path to use for the HTTP health check.`,

0 commit comments

Comments
 (0)