Skip to content

Commit

Permalink
Reduce fake node deployments resource requests
Browse files Browse the repository at this point in the history
(cherry picked from commit 515892ae527f9a277e46bb9c657f43dbc4980a02)
  • Loading branch information
gshaibi committed May 21, 2024
1 parent b8d358a commit c249a1c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions internal/status-updater/handlers/node/fake_node_deployments.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit c249a1c

Please sign in to comment.