Skip to content

Commit 807ee11

Browse files
authored
feat(serverless): add option to scale on memory usage (scaleway#2296)
1 parent 7cd49c9 commit 807ee11

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

api/container/v1beta1/container_sdk.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -792,11 +792,14 @@ type ContainerHealthCheckSpec struct {
792792

793793
// ContainerScalingOption: container scaling option.
794794
type ContainerScalingOption struct {
795-
// Precisely one of ConcurrentRequestsThreshold, CPUUsageThreshold must be set.
795+
// Precisely one of ConcurrentRequestsThreshold, CPUUsageThreshold, MemoryUsageThreshold must be set.
796796
ConcurrentRequestsThreshold *uint32 `json:"concurrent_requests_threshold,omitempty"`
797797

798-
// Precisely one of ConcurrentRequestsThreshold, CPUUsageThreshold must be set.
798+
// Precisely one of ConcurrentRequestsThreshold, CPUUsageThreshold, MemoryUsageThreshold must be set.
799799
CPUUsageThreshold *uint32 `json:"cpu_usage_threshold,omitempty"`
800+
801+
// Precisely one of ConcurrentRequestsThreshold, CPUUsageThreshold, MemoryUsageThreshold must be set.
802+
MemoryUsageThreshold *uint32 `json:"memory_usage_threshold,omitempty"`
800803
}
801804

802805
// SecretHashedValue: secret hashed value.
@@ -973,6 +976,7 @@ type Container struct {
973976
// ScalingOption: possible values:
974977
// - concurrent_requests_threshold: Scale depending on the number of concurrent requests being processed per container instance.
975978
// - cpu_usage_threshold: Scale depending on the CPU usage of a container instance.
979+
// - memory_usage_threshold: Scale depending on the memory usage of a container instance.
976980
ScalingOption *ContainerScalingOption `json:"scaling_option"`
977981

978982
// HealthCheck: health check configuration of the container.
@@ -1221,6 +1225,7 @@ type CreateContainerRequest struct {
12211225
// ScalingOption: possible values:
12221226
// - concurrent_requests_threshold: Scale depending on the number of concurrent requests being processed per container instance.
12231227
// - cpu_usage_threshold: Scale depending on the CPU usage of a container instance.
1228+
// - memory_usage_threshold: Scale depending on the memory usage of a container instance.
12241229
ScalingOption *ContainerScalingOption `json:"scaling_option,omitempty"`
12251230

12261231
// HealthCheck: health check configuration of the container.
@@ -1817,6 +1822,7 @@ type UpdateContainerRequest struct {
18171822
// ScalingOption: possible values:
18181823
// - concurrent_requests_threshold: Scale depending on the number of concurrent requests being processed per container instance.
18191824
// - cpu_usage_threshold: Scale depending on the CPU usage of a container instance.
1825+
// - memory_usage_threshold: Scale depending on the memory usage of a container instance.
18201826
ScalingOption *ContainerScalingOption `json:"scaling_option,omitempty"`
18211827

18221828
// HealthCheck: health check configuration of the container.

0 commit comments

Comments
 (0)