From c249a1c51fc01d57b1e911272b3331fd95c97e73 Mon Sep 17 00:00:00 2001 From: gshaibi Date: Tue, 21 May 2024 23:45:49 +0300 Subject: [PATCH] Reduce fake node deployments resource requests (cherry picked from commit 515892ae527f9a277e46bb9c657f43dbc4980a02) --- .../handlers/node/fake_node_deployments.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/internal/status-updater/handlers/node/fake_node_deployments.go b/internal/status-updater/handlers/node/fake_node_deployments.go index 2988fb0..f75ab9e 100644 --- a/internal/status-updater/handlers/node/fake_node_deployments.go +++ b/internal/status-updater/handlers/node/fake_node_deployments.go @@ -9,6 +9,7 @@ import ( appsv1 "k8s.io/api/apps/v1" v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" + "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/utils/ptr" ) @@ -107,6 +108,15 @@ func generateFakeNodeDeploymentFromTemplate(template *appsv1.Deployment, node *v Value: "true", }) + deployment.Spec.Template.Spec.Containers[0].Resources.Limits = v1.ResourceList{ + v1.ResourceMemory: resource.MustParse("100Mi"), + v1.ResourceCPU: resource.MustParse("50m"), + } + deployment.Spec.Template.Spec.Containers[0].Resources.Requests = v1.ResourceList{ + v1.ResourceMemory: resource.MustParse("20Mi"), + v1.ResourceCPU: resource.MustParse("10m"), + } + return deployment }