diff --git a/api/v1alpha1/envoyproxy_helpers.go b/api/v1alpha1/envoyproxy_helpers.go index ec69147e653..0cdd1b7e2ba 100644 --- a/api/v1alpha1/envoyproxy_helpers.go +++ b/api/v1alpha1/envoyproxy_helpers.go @@ -155,6 +155,9 @@ func DefaultShutdownManagerContainerResourceRequirements() *corev1.ResourceRequi corev1.ResourceCPU: resource.MustParse(DefaultShutdownManagerCPUResourceRequests), corev1.ResourceMemory: resource.MustParse(DefaultShutdownManagerMemoryResourceRequests), }, + Limits: corev1.ResourceList{ + corev1.ResourceMemory: resource.MustParse(DefaultShutdownManagerMemoryResourceLimits), + }, } } diff --git a/api/v1alpha1/kubernetes_helpers.go b/api/v1alpha1/kubernetes_helpers.go index 6dd6b5fbfcc..2622a41bf5d 100644 --- a/api/v1alpha1/kubernetes_helpers.go +++ b/api/v1alpha1/kubernetes_helpers.go @@ -76,6 +76,9 @@ func DefaultResourceRequirements() *corev1.ResourceRequirements { corev1.ResourceCPU: resource.MustParse(DefaultDeploymentCPUResourceRequests), corev1.ResourceMemory: resource.MustParse(DefaultDeploymentMemoryResourceRequests), }, + Limits: corev1.ResourceList{ + corev1.ResourceMemory: resource.MustParse(DefaultDeploymentMemoryResourceLimits), + }, } } diff --git a/api/v1alpha1/shared_types.go b/api/v1alpha1/shared_types.go index 036054dc47e..456a9e63c75 100644 --- a/api/v1alpha1/shared_types.go +++ b/api/v1alpha1/shared_types.go @@ -21,12 +21,16 @@ const ( DefaultDeploymentCPUResourceRequests = "100m" // DefaultDeploymentMemoryResourceRequests for deployment memory resource DefaultDeploymentMemoryResourceRequests = "512Mi" + // DefaultDeploymentMemoryResourceLimits for deployment memory resource limits + DefaultDeploymentMemoryResourceLimits = "512Mi" // DefaultEnvoyProxyImage is the default image used by envoyproxy DefaultEnvoyProxyImage = "docker.io/envoyproxy/envoy:distroless-dev" // DefaultShutdownManagerCPUResourceRequests for shutdown manager cpu resource DefaultShutdownManagerCPUResourceRequests = "10m" // DefaultShutdownManagerMemoryResourceRequests for shutdown manager memory resource DefaultShutdownManagerMemoryResourceRequests = "32Mi" + // DefaultShutdownManagerMemoryResourceLimits for shutdown manager memory resource limits + DefaultShutdownManagerMemoryResourceLimits = "32Mi" // DefaultShutdownManagerImage is the default image used for the shutdown manager. DefaultShutdownManagerImage = "docker.io/envoyproxy/gateway-dev:latest" // DefaultRateLimitImage is the default image used by ratelimit. diff --git a/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/component-level.yaml b/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/component-level.yaml index 5b0f132f0b9..05420204975 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/component-level.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/component-level.yaml @@ -79,6 +79,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 512Mi requests: cpu: 100m memory: 512Mi @@ -155,6 +157,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 32Mi requests: cpu: 10m memory: 32Mi diff --git a/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/custom.yaml b/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/custom.yaml index 87727e4be1c..4ac04f9bfb3 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/custom.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/custom.yaml @@ -332,6 +332,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 32Mi requests: cpu: 10m memory: 32Mi diff --git a/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/default-env.yaml b/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/default-env.yaml index 7827b9eccc7..6ba33e1972a 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/default-env.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/default-env.yaml @@ -331,6 +331,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 32Mi requests: cpu: 10m memory: 32Mi diff --git a/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/default.yaml b/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/default.yaml index 95f186cb8a4..130d50d7176 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/default.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/default.yaml @@ -206,6 +206,21 @@ spec: typed_config: "@type": type.googleapis.com/envoy.extensions.resource_monitors.downstream_connections.v3.DownstreamConnectionsConfig max_active_downstream_connections: 50000 + - name: "envoy.resource_monitors.fixed_heap" + typed_config: + "@type": type.googleapis.com/envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig + max_heap_size_bytes: 429496729 + actions: + - name: "envoy.overload_actions.shrink_heap" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.95 + - name: "envoy.overload_actions.stop_accepting_requests" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.98 - --log-level warn - --cpuset-threads - --drain-strategy immediate @@ -246,6 +261,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 512Mi requests: cpu: 100m memory: 512Mi @@ -322,6 +339,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 32Mi requests: cpu: 10m memory: 32Mi diff --git a/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/disable-prometheus.yaml b/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/disable-prometheus.yaml index 54e8c6d53f4..8a7b0ec607b 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/disable-prometheus.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/disable-prometheus.yaml @@ -180,6 +180,21 @@ spec: typed_config: "@type": type.googleapis.com/envoy.extensions.resource_monitors.downstream_connections.v3.DownstreamConnectionsConfig max_active_downstream_connections: 50000 + - name: "envoy.resource_monitors.fixed_heap" + typed_config: + "@type": type.googleapis.com/envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig + max_heap_size_bytes: 429496729 + actions: + - name: "envoy.overload_actions.shrink_heap" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.95 + - name: "envoy.overload_actions.stop_accepting_requests" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.98 - --log-level warn - --cpuset-threads - --drain-strategy immediate @@ -216,6 +231,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 512Mi requests: cpu: 100m memory: 512Mi @@ -292,6 +309,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 32Mi requests: cpu: 10m memory: 32Mi diff --git a/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/extension-env.yaml b/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/extension-env.yaml index b75e8ec22ad..211a7340be4 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/extension-env.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/extension-env.yaml @@ -335,6 +335,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 32Mi requests: cpu: 10m memory: 32Mi diff --git a/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/override-labels-and-annotations.yaml b/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/override-labels-and-annotations.yaml index 1d033190e83..6acc46d239e 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/override-labels-and-annotations.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/override-labels-and-annotations.yaml @@ -215,6 +215,21 @@ spec: typed_config: "@type": type.googleapis.com/envoy.extensions.resource_monitors.downstream_connections.v3.DownstreamConnectionsConfig max_active_downstream_connections: 50000 + - name: "envoy.resource_monitors.fixed_heap" + typed_config: + "@type": type.googleapis.com/envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig + max_heap_size_bytes: 429496729 + actions: + - name: "envoy.overload_actions.shrink_heap" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.95 + - name: "envoy.overload_actions.stop_accepting_requests" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.98 - --log-level warn - --cpuset-threads - --drain-strategy immediate @@ -255,6 +270,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 512Mi requests: cpu: 100m memory: 512Mi @@ -331,6 +348,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 32Mi requests: cpu: 10m memory: 32Mi diff --git a/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/patch-daemonset.yaml b/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/patch-daemonset.yaml index 0e9f6e598c7..b0a15502a80 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/patch-daemonset.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/patch-daemonset.yaml @@ -206,6 +206,21 @@ spec: typed_config: "@type": type.googleapis.com/envoy.extensions.resource_monitors.downstream_connections.v3.DownstreamConnectionsConfig max_active_downstream_connections: 50000 + - name: "envoy.resource_monitors.fixed_heap" + typed_config: + "@type": type.googleapis.com/envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig + max_heap_size_bytes: 429496729 + actions: + - name: "envoy.overload_actions.shrink_heap" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.95 + - name: "envoy.overload_actions.stop_accepting_requests" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.98 - --log-level warn - --cpuset-threads - --drain-strategy immediate @@ -246,6 +261,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 512Mi requests: cpu: 100m memory: 512Mi @@ -322,6 +339,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 32Mi requests: cpu: 10m memory: 32Mi diff --git a/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/shutdown-manager.yaml b/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/shutdown-manager.yaml index 99647fce436..508ab81ac74 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/shutdown-manager.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/shutdown-manager.yaml @@ -206,6 +206,21 @@ spec: typed_config: "@type": type.googleapis.com/envoy.extensions.resource_monitors.downstream_connections.v3.DownstreamConnectionsConfig max_active_downstream_connections: 50000 + - name: "envoy.resource_monitors.fixed_heap" + typed_config: + "@type": type.googleapis.com/envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig + max_heap_size_bytes: 429496729 + actions: + - name: "envoy.overload_actions.shrink_heap" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.95 + - name: "envoy.overload_actions.stop_accepting_requests" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.98 - --log-level warn - --cpuset-threads - --drain-strategy immediate @@ -246,6 +261,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 512Mi requests: cpu: 100m memory: 512Mi diff --git a/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/volumes.yaml b/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/volumes.yaml index 53ec48429c1..33b1e7db666 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/volumes.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/volumes.yaml @@ -335,6 +335,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 32Mi requests: cpu: 10m memory: 32Mi diff --git a/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/with-annotations.yaml b/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/with-annotations.yaml index b9beaa023ff..9f388e2cbd1 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/with-annotations.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/with-annotations.yaml @@ -211,6 +211,21 @@ spec: typed_config: "@type": type.googleapis.com/envoy.extensions.resource_monitors.downstream_connections.v3.DownstreamConnectionsConfig max_active_downstream_connections: 50000 + - name: "envoy.resource_monitors.fixed_heap" + typed_config: + "@type": type.googleapis.com/envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig + max_heap_size_bytes: 429496729 + actions: + - name: "envoy.overload_actions.shrink_heap" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.95 + - name: "envoy.overload_actions.stop_accepting_requests" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.98 - --log-level warn - --cpuset-threads - --drain-strategy immediate @@ -251,6 +266,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 512Mi requests: cpu: 100m memory: 512Mi @@ -327,6 +344,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 32Mi requests: cpu: 10m memory: 32Mi diff --git a/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/with-concurrency.yaml b/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/with-concurrency.yaml index 409d1ee542d..bd44e449099 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/with-concurrency.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/with-concurrency.yaml @@ -79,6 +79,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 512Mi requests: cpu: 100m memory: 512Mi @@ -155,6 +157,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 32Mi requests: cpu: 10m memory: 32Mi diff --git a/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/with-extra-args.yaml b/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/with-extra-args.yaml index a9616129ff9..02ba627d950 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/with-extra-args.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/with-extra-args.yaml @@ -206,6 +206,21 @@ spec: typed_config: "@type": type.googleapis.com/envoy.extensions.resource_monitors.downstream_connections.v3.DownstreamConnectionsConfig max_active_downstream_connections: 50000 + - name: "envoy.resource_monitors.fixed_heap" + typed_config: + "@type": type.googleapis.com/envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig + max_heap_size_bytes: 429496729 + actions: + - name: "envoy.overload_actions.shrink_heap" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.95 + - name: "envoy.overload_actions.stop_accepting_requests" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.98 - --log-level warn - --cpuset-threads - --drain-strategy immediate @@ -248,6 +263,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 512Mi requests: cpu: 100m memory: 512Mi @@ -324,6 +341,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 32Mi requests: cpu: 10m memory: 32Mi diff --git a/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/with-image-pull-secrets.yaml b/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/with-image-pull-secrets.yaml index b3d3c8301e6..d61e7cf3c2b 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/with-image-pull-secrets.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/with-image-pull-secrets.yaml @@ -206,6 +206,21 @@ spec: typed_config: "@type": type.googleapis.com/envoy.extensions.resource_monitors.downstream_connections.v3.DownstreamConnectionsConfig max_active_downstream_connections: 50000 + - name: "envoy.resource_monitors.fixed_heap" + typed_config: + "@type": type.googleapis.com/envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig + max_heap_size_bytes: 429496729 + actions: + - name: "envoy.overload_actions.shrink_heap" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.95 + - name: "envoy.overload_actions.stop_accepting_requests" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.98 - --log-level warn - --cpuset-threads - --drain-strategy immediate @@ -246,6 +261,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 512Mi requests: cpu: 100m memory: 512Mi @@ -322,6 +339,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 32Mi requests: cpu: 10m memory: 32Mi diff --git a/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/with-name.yaml b/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/with-name.yaml index ac554d2f387..e674563e6dc 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/with-name.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/with-name.yaml @@ -206,6 +206,21 @@ spec: typed_config: "@type": type.googleapis.com/envoy.extensions.resource_monitors.downstream_connections.v3.DownstreamConnectionsConfig max_active_downstream_connections: 50000 + - name: "envoy.resource_monitors.fixed_heap" + typed_config: + "@type": type.googleapis.com/envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig + max_heap_size_bytes: 429496729 + actions: + - name: "envoy.overload_actions.shrink_heap" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.95 + - name: "envoy.overload_actions.stop_accepting_requests" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.98 - --log-level warn - --cpuset-threads - --drain-strategy immediate @@ -246,6 +261,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 512Mi requests: cpu: 100m memory: 512Mi @@ -322,6 +339,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 32Mi requests: cpu: 10m memory: 32Mi diff --git a/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/with-node-selector.yaml b/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/with-node-selector.yaml index c51e2a86ec3..484dcc4a015 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/with-node-selector.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/with-node-selector.yaml @@ -206,6 +206,21 @@ spec: typed_config: "@type": type.googleapis.com/envoy.extensions.resource_monitors.downstream_connections.v3.DownstreamConnectionsConfig max_active_downstream_connections: 50000 + - name: "envoy.resource_monitors.fixed_heap" + typed_config: + "@type": type.googleapis.com/envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig + max_heap_size_bytes: 429496729 + actions: + - name: "envoy.overload_actions.shrink_heap" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.95 + - name: "envoy.overload_actions.stop_accepting_requests" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.98 - --log-level warn - --cpuset-threads - --drain-strategy immediate @@ -246,6 +261,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 512Mi requests: cpu: 100m memory: 512Mi @@ -322,6 +339,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 32Mi requests: cpu: 10m memory: 32Mi diff --git a/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/with-topology-spread-constraints.yaml b/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/with-topology-spread-constraints.yaml index cf8ef7144a5..d8931cae1b0 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/with-topology-spread-constraints.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/daemonsets/with-topology-spread-constraints.yaml @@ -206,6 +206,21 @@ spec: typed_config: "@type": type.googleapis.com/envoy.extensions.resource_monitors.downstream_connections.v3.DownstreamConnectionsConfig max_active_downstream_connections: 50000 + - name: "envoy.resource_monitors.fixed_heap" + typed_config: + "@type": type.googleapis.com/envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig + max_heap_size_bytes: 429496729 + actions: + - name: "envoy.overload_actions.shrink_heap" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.95 + - name: "envoy.overload_actions.stop_accepting_requests" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.98 - --log-level warn - --cpuset-threads - --drain-strategy immediate @@ -246,6 +261,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 512Mi requests: cpu: 100m memory: 512Mi @@ -322,6 +339,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 32Mi requests: cpu: 10m memory: 32Mi diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/bootstrap.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/bootstrap.yaml index b9d6973e3e5..b8c64d04bda 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/bootstrap.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/bootstrap.yaml @@ -82,6 +82,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 512Mi requests: cpu: 100m memory: 512Mi @@ -158,6 +160,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 32Mi requests: cpu: 10m memory: 32Mi diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/component-level.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/component-level.yaml index 30172b63ce8..de9284bbaa9 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/component-level.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/component-level.yaml @@ -83,6 +83,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 512Mi requests: cpu: 100m memory: 512Mi @@ -159,6 +161,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 32Mi requests: cpu: 10m memory: 32Mi diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/custom.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/custom.yaml index a312bb39a61..996aaa9a25d 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/custom.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/custom.yaml @@ -337,6 +337,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 32Mi requests: cpu: 10m memory: 32Mi diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/custom_with_initcontainers.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/custom_with_initcontainers.yaml index e4518aa9be7..f3c8c4a205d 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/custom_with_initcontainers.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/custom_with_initcontainers.yaml @@ -339,6 +339,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 32Mi requests: cpu: 10m memory: 32Mi diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/default-env.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/default-env.yaml index 5d34ac37081..1e32330e462 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/default-env.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/default-env.yaml @@ -336,6 +336,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 32Mi requests: cpu: 10m memory: 32Mi diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/default.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/default.yaml index d257b62dd62..e9d04f8d120 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/default.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/default.yaml @@ -210,6 +210,21 @@ spec: typed_config: "@type": type.googleapis.com/envoy.extensions.resource_monitors.downstream_connections.v3.DownstreamConnectionsConfig max_active_downstream_connections: 50000 + - name: "envoy.resource_monitors.fixed_heap" + typed_config: + "@type": type.googleapis.com/envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig + max_heap_size_bytes: 429496729 + actions: + - name: "envoy.overload_actions.shrink_heap" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.95 + - name: "envoy.overload_actions.stop_accepting_requests" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.98 - --log-level warn - --cpuset-threads - --drain-strategy immediate @@ -250,6 +265,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 512Mi requests: cpu: 100m memory: 512Mi @@ -326,6 +343,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 32Mi requests: cpu: 10m memory: 32Mi diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/disable-prometheus.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/disable-prometheus.yaml index c8a9d5b4240..6761d223419 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/disable-prometheus.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/disable-prometheus.yaml @@ -184,6 +184,21 @@ spec: typed_config: "@type": type.googleapis.com/envoy.extensions.resource_monitors.downstream_connections.v3.DownstreamConnectionsConfig max_active_downstream_connections: 50000 + - name: "envoy.resource_monitors.fixed_heap" + typed_config: + "@type": type.googleapis.com/envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig + max_heap_size_bytes: 429496729 + actions: + - name: "envoy.overload_actions.shrink_heap" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.95 + - name: "envoy.overload_actions.stop_accepting_requests" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.98 - --log-level warn - --cpuset-threads - --drain-strategy immediate @@ -220,6 +235,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 512Mi requests: cpu: 100m memory: 512Mi @@ -296,6 +313,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 32Mi requests: cpu: 10m memory: 32Mi diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/dual-stack.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/dual-stack.yaml index fe8d8f8ecfe..289e187e0ec 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/dual-stack.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/dual-stack.yaml @@ -211,6 +211,21 @@ spec: typed_config: "@type": type.googleapis.com/envoy.extensions.resource_monitors.downstream_connections.v3.DownstreamConnectionsConfig max_active_downstream_connections: 50000 + - name: "envoy.resource_monitors.fixed_heap" + typed_config: + "@type": type.googleapis.com/envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig + max_heap_size_bytes: 429496729 + actions: + - name: "envoy.overload_actions.shrink_heap" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.95 + - name: "envoy.overload_actions.stop_accepting_requests" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.98 - --log-level warn - --cpuset-threads - --drain-strategy immediate @@ -251,6 +266,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 512Mi requests: cpu: 100m memory: 512Mi @@ -327,6 +344,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 32Mi requests: cpu: 10m memory: 32Mi diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/extension-env.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/extension-env.yaml index 232fa80b00f..ba49e423404 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/extension-env.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/extension-env.yaml @@ -340,6 +340,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 32Mi requests: cpu: 10m memory: 32Mi diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/ipv6.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/ipv6.yaml index cde8a785717..9480f779d5d 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/ipv6.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/ipv6.yaml @@ -210,6 +210,21 @@ spec: typed_config: "@type": type.googleapis.com/envoy.extensions.resource_monitors.downstream_connections.v3.DownstreamConnectionsConfig max_active_downstream_connections: 50000 + - name: "envoy.resource_monitors.fixed_heap" + typed_config: + "@type": type.googleapis.com/envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig + max_heap_size_bytes: 429496729 + actions: + - name: "envoy.overload_actions.shrink_heap" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.95 + - name: "envoy.overload_actions.stop_accepting_requests" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.98 - --log-level warn - --cpuset-threads - --drain-strategy immediate @@ -250,6 +265,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 512Mi requests: cpu: 100m memory: 512Mi @@ -326,6 +343,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 32Mi requests: cpu: 10m memory: 32Mi diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/override-labels-and-annotations.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/override-labels-and-annotations.yaml index 3777fa8a88e..4405b082d21 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/override-labels-and-annotations.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/override-labels-and-annotations.yaml @@ -219,6 +219,21 @@ spec: typed_config: "@type": type.googleapis.com/envoy.extensions.resource_monitors.downstream_connections.v3.DownstreamConnectionsConfig max_active_downstream_connections: 50000 + - name: "envoy.resource_monitors.fixed_heap" + typed_config: + "@type": type.googleapis.com/envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig + max_heap_size_bytes: 429496729 + actions: + - name: "envoy.overload_actions.shrink_heap" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.95 + - name: "envoy.overload_actions.stop_accepting_requests" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.98 - --log-level warn - --cpuset-threads - --drain-strategy immediate @@ -259,6 +274,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 512Mi requests: cpu: 100m memory: 512Mi @@ -335,6 +352,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 32Mi requests: cpu: 10m memory: 32Mi diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/patch-deployment.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/patch-deployment.yaml index e751dfc8cb1..7a5c1d99468 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/patch-deployment.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/patch-deployment.yaml @@ -210,6 +210,21 @@ spec: typed_config: "@type": type.googleapis.com/envoy.extensions.resource_monitors.downstream_connections.v3.DownstreamConnectionsConfig max_active_downstream_connections: 50000 + - name: "envoy.resource_monitors.fixed_heap" + typed_config: + "@type": type.googleapis.com/envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig + max_heap_size_bytes: 429496729 + actions: + - name: "envoy.overload_actions.shrink_heap" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.95 + - name: "envoy.overload_actions.stop_accepting_requests" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.98 - --log-level warn - --cpuset-threads - --drain-strategy immediate @@ -250,6 +265,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 512Mi requests: cpu: 100m memory: 512Mi @@ -326,6 +343,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 32Mi requests: cpu: 10m memory: 32Mi diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/shutdown-manager.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/shutdown-manager.yaml index 53473970538..25d0faec930 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/shutdown-manager.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/shutdown-manager.yaml @@ -210,6 +210,21 @@ spec: typed_config: "@type": type.googleapis.com/envoy.extensions.resource_monitors.downstream_connections.v3.DownstreamConnectionsConfig max_active_downstream_connections: 50000 + - name: "envoy.resource_monitors.fixed_heap" + typed_config: + "@type": type.googleapis.com/envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig + max_heap_size_bytes: 429496729 + actions: + - name: "envoy.overload_actions.shrink_heap" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.95 + - name: "envoy.overload_actions.stop_accepting_requests" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.98 - --log-level warn - --cpuset-threads - --drain-strategy immediate @@ -250,6 +265,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 512Mi requests: cpu: 100m memory: 512Mi diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/volumes.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/volumes.yaml index 282e038d84b..4d15c16f2b5 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/volumes.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/volumes.yaml @@ -340,6 +340,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 32Mi requests: cpu: 10m memory: 32Mi diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-annotations.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-annotations.yaml index 02c028e82e4..b5858b70fe8 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-annotations.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-annotations.yaml @@ -215,6 +215,21 @@ spec: typed_config: "@type": type.googleapis.com/envoy.extensions.resource_monitors.downstream_connections.v3.DownstreamConnectionsConfig max_active_downstream_connections: 50000 + - name: "envoy.resource_monitors.fixed_heap" + typed_config: + "@type": type.googleapis.com/envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig + max_heap_size_bytes: 429496729 + actions: + - name: "envoy.overload_actions.shrink_heap" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.95 + - name: "envoy.overload_actions.stop_accepting_requests" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.98 - --log-level warn - --cpuset-threads - --drain-strategy immediate @@ -255,6 +270,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 512Mi requests: cpu: 100m memory: 512Mi @@ -331,6 +348,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 32Mi requests: cpu: 10m memory: 32Mi diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-concurrency.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-concurrency.yaml index 16df5efe6a3..28696ee8bbb 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-concurrency.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-concurrency.yaml @@ -83,6 +83,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 512Mi requests: cpu: 100m memory: 512Mi @@ -159,6 +161,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 32Mi requests: cpu: 10m memory: 32Mi diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-empty-memory-limits.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-empty-memory-limits.yaml index b3275c38bcc..028d4dc5518 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-empty-memory-limits.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-empty-memory-limits.yaml @@ -325,6 +325,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 32Mi requests: cpu: 10m memory: 32Mi diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-extra-args.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-extra-args.yaml index 3a8ed4422e2..ee8f986dd06 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-extra-args.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-extra-args.yaml @@ -210,6 +210,21 @@ spec: typed_config: "@type": type.googleapis.com/envoy.extensions.resource_monitors.downstream_connections.v3.DownstreamConnectionsConfig max_active_downstream_connections: 50000 + - name: "envoy.resource_monitors.fixed_heap" + typed_config: + "@type": type.googleapis.com/envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig + max_heap_size_bytes: 429496729 + actions: + - name: "envoy.overload_actions.shrink_heap" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.95 + - name: "envoy.overload_actions.stop_accepting_requests" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.98 - --log-level warn - --cpuset-threads - --drain-strategy immediate @@ -252,6 +267,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 512Mi requests: cpu: 100m memory: 512Mi @@ -328,6 +345,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 32Mi requests: cpu: 10m memory: 32Mi diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-image-pull-secrets.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-image-pull-secrets.yaml index 3759d793c85..cf6d52bf7fc 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-image-pull-secrets.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-image-pull-secrets.yaml @@ -210,6 +210,21 @@ spec: typed_config: "@type": type.googleapis.com/envoy.extensions.resource_monitors.downstream_connections.v3.DownstreamConnectionsConfig max_active_downstream_connections: 50000 + - name: "envoy.resource_monitors.fixed_heap" + typed_config: + "@type": type.googleapis.com/envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig + max_heap_size_bytes: 429496729 + actions: + - name: "envoy.overload_actions.shrink_heap" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.95 + - name: "envoy.overload_actions.stop_accepting_requests" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.98 - --log-level warn - --cpuset-threads - --drain-strategy immediate @@ -250,6 +265,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 512Mi requests: cpu: 100m memory: 512Mi @@ -326,6 +343,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 32Mi requests: cpu: 10m memory: 32Mi diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-name.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-name.yaml index 78bea6e40b0..328e59e59d0 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-name.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-name.yaml @@ -210,6 +210,21 @@ spec: typed_config: "@type": type.googleapis.com/envoy.extensions.resource_monitors.downstream_connections.v3.DownstreamConnectionsConfig max_active_downstream_connections: 50000 + - name: "envoy.resource_monitors.fixed_heap" + typed_config: + "@type": type.googleapis.com/envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig + max_heap_size_bytes: 429496729 + actions: + - name: "envoy.overload_actions.shrink_heap" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.95 + - name: "envoy.overload_actions.stop_accepting_requests" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.98 - --log-level warn - --cpuset-threads - --drain-strategy immediate @@ -250,6 +265,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 512Mi requests: cpu: 100m memory: 512Mi @@ -326,6 +343,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 32Mi requests: cpu: 10m memory: 32Mi diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-node-selector.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-node-selector.yaml index 5afc2475eda..9e705136143 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-node-selector.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-node-selector.yaml @@ -210,6 +210,21 @@ spec: typed_config: "@type": type.googleapis.com/envoy.extensions.resource_monitors.downstream_connections.v3.DownstreamConnectionsConfig max_active_downstream_connections: 50000 + - name: "envoy.resource_monitors.fixed_heap" + typed_config: + "@type": type.googleapis.com/envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig + max_heap_size_bytes: 429496729 + actions: + - name: "envoy.overload_actions.shrink_heap" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.95 + - name: "envoy.overload_actions.stop_accepting_requests" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.98 - --log-level warn - --cpuset-threads - --drain-strategy immediate @@ -250,6 +265,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 512Mi requests: cpu: 100m memory: 512Mi @@ -326,6 +343,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 32Mi requests: cpu: 10m memory: 32Mi diff --git a/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-topology-spread-constraints.yaml b/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-topology-spread-constraints.yaml index 4dffb567e81..d32118f94f9 100644 --- a/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-topology-spread-constraints.yaml +++ b/internal/infrastructure/kubernetes/proxy/testdata/deployments/with-topology-spread-constraints.yaml @@ -210,6 +210,21 @@ spec: typed_config: "@type": type.googleapis.com/envoy.extensions.resource_monitors.downstream_connections.v3.DownstreamConnectionsConfig max_active_downstream_connections: 50000 + - name: "envoy.resource_monitors.fixed_heap" + typed_config: + "@type": type.googleapis.com/envoy.extensions.resource_monitors.fixed_heap.v3.FixedHeapConfig + max_heap_size_bytes: 429496729 + actions: + - name: "envoy.overload_actions.shrink_heap" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.95 + - name: "envoy.overload_actions.stop_accepting_requests" + triggers: + - name: "envoy.resource_monitors.fixed_heap" + threshold: + value: 0.98 - --log-level warn - --cpuset-threads - --drain-strategy immediate @@ -250,6 +265,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 512Mi requests: cpu: 100m memory: 512Mi @@ -326,6 +343,8 @@ spec: successThreshold: 1 timeoutSeconds: 1 resources: + limits: + memory: 32Mi requests: cpu: 10m memory: 32Mi diff --git a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/default.yaml b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/default.yaml index f3b49afb414..e1b7fe2300c 100644 --- a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/default.yaml +++ b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/default.yaml @@ -106,6 +106,8 @@ spec: requests: cpu: 100m memory: 512Mi + limits: + memory: 512Mi securityContext: allowPrivilegeEscalation: false capabilities: diff --git a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/disable-prometheus.yaml b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/disable-prometheus.yaml index b579400b05a..95556d6cbca 100644 --- a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/disable-prometheus.yaml +++ b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/disable-prometheus.yaml @@ -96,6 +96,8 @@ spec: requests: cpu: 100m memory: 512Mi + limits: + memory: 512Mi securityContext: allowPrivilegeEscalation: false capabilities: diff --git a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/enable-tracing-custom.yaml b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/enable-tracing-custom.yaml index c8586388f37..d7d862d3a4d 100644 --- a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/enable-tracing-custom.yaml +++ b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/enable-tracing-custom.yaml @@ -121,6 +121,8 @@ spec: requests: cpu: 100m memory: 512Mi + limits: + memory: 512Mi securityContext: allowPrivilegeEscalation: false capabilities: diff --git a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/enable-tracing.yaml b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/enable-tracing.yaml index 002ee53bda6..9b28cde781f 100644 --- a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/enable-tracing.yaml +++ b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/enable-tracing.yaml @@ -121,6 +121,8 @@ spec: requests: cpu: 100m memory: 512Mi + limits: + memory: 512Mi securityContext: allowPrivilegeEscalation: false capabilities: diff --git a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/merge-annotations.yaml b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/merge-annotations.yaml index fc6600de072..40f444c8f76 100644 --- a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/merge-annotations.yaml +++ b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/merge-annotations.yaml @@ -108,6 +108,8 @@ spec: requests: cpu: 100m memory: 512Mi + limits: + memory: 512Mi securityContext: allowPrivilegeEscalation: false capabilities: diff --git a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/merge-labels.yaml b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/merge-labels.yaml index 0c944d8fd82..b9fe6846fd0 100644 --- a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/merge-labels.yaml +++ b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/merge-labels.yaml @@ -108,6 +108,8 @@ spec: requests: cpu: 100m memory: 512Mi + limits: + memory: 512Mi securityContext: allowPrivilegeEscalation: false capabilities: diff --git a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/patch-deployment.yaml b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/patch-deployment.yaml index 5556e12d2ee..f2beaa05cd5 100644 --- a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/patch-deployment.yaml +++ b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/patch-deployment.yaml @@ -106,6 +106,8 @@ spec: requests: cpu: 100m memory: 512Mi + limits: + memory: 512Mi securityContext: allowPrivilegeEscalation: false capabilities: diff --git a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/with-node-selector.yaml b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/with-node-selector.yaml index f65e6f23e18..2992e8940e7 100644 --- a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/with-node-selector.yaml +++ b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/with-node-selector.yaml @@ -106,6 +106,8 @@ spec: requests: cpu: 100m memory: 512Mi + limits: + memory: 512Mi securityContext: allowPrivilegeEscalation: false capabilities: diff --git a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/with-topology-spread-constraints.yaml b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/with-topology-spread-constraints.yaml index e726269ccbe..7b256bfe317 100644 --- a/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/with-topology-spread-constraints.yaml +++ b/internal/infrastructure/kubernetes/ratelimit/testdata/deployments/with-topology-spread-constraints.yaml @@ -106,6 +106,8 @@ spec: requests: cpu: 100m memory: 512Mi + limits: + memory: 512Mi securityContext: allowPrivilegeEscalation: false capabilities: