Skip to content

Commit

Permalink
fix: increase agent resources to prevent OOM restarts
Browse files Browse the repository at this point in the history
  • Loading branch information
pkoutsovasilis committed Aug 14, 2024
1 parent 616ed7d commit ec02980
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions testing/integration/kubernetes_agent_standalone_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (
batchv1 "k8s.io/api/batch/v1"
corev1 "k8s.io/api/core/v1"
rbacv1 "k8s.io/api/rbac/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/serializer"
Expand Down Expand Up @@ -160,6 +161,10 @@ func TestKubernetesAgentStandalone(t *testing.T) {
// as the image is already loaded by the kubernetes provisioner
container.ImagePullPolicy = "Never"

container.Resources.Limits = corev1.ResourceList{
corev1.ResourceMemory: resource.MustParse("800Mi"),
}

if tc.capabilitiesDrop != nil || tc.capabilitiesAdd != nil || tc.runUser != nil || tc.runGroup != nil {
// set security context
container.SecurityContext = &corev1.SecurityContext{
Expand Down

0 comments on commit ec02980

Please sign in to comment.