@@ -30,6 +30,7 @@ import (
30
30
batchv1 "k8s.io/api/batch/v1"
31
31
corev1 "k8s.io/api/core/v1"
32
32
rbacv1 "k8s.io/api/rbac/v1"
33
+ "k8s.io/apimachinery/pkg/api/resource"
33
34
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
34
35
"k8s.io/apimachinery/pkg/runtime"
35
36
"k8s.io/apimachinery/pkg/runtime/serializer"
@@ -122,18 +123,18 @@ func TestKubernetesAgentStandalone(t *testing.T) {
122
123
int64Ptr (1000 ), // elastic-agent uid
123
124
nil ,
124
125
[]corev1.Capability {"ALL" },
125
- []corev1.Capability {"CHOWN" , "SETPCAP" },
126
+ []corev1.Capability {"CHOWN" , "SETPCAP" , "DAC_READ_SEARCH" , "SYS_PTRACE" },
126
127
true ,
127
- "https://github.com/elastic/elastic-agent/issues/5275 " ,
128
+ "" ,
128
129
},
129
130
{
130
131
"drop ALL add CHOWN, SETPCAP capabilities - rootless agent random uid:gid" ,
131
132
int64Ptr (500 ),
132
133
int64Ptr (500 ),
133
134
[]corev1.Capability {"ALL" },
134
- []corev1.Capability {"CHOWN" , "SETPCAP" , "DAC_READ_SEARCH" },
135
+ []corev1.Capability {"CHOWN" , "SETPCAP" , "DAC_READ_SEARCH" , "SYS_PTRACE" },
135
136
true ,
136
- "https://github.com/elastic/elastic-agent/issues/5275 " ,
137
+ "" ,
137
138
},
138
139
}
139
140
@@ -160,6 +161,10 @@ func TestKubernetesAgentStandalone(t *testing.T) {
160
161
// as the image is already loaded by the kubernetes provisioner
161
162
container .ImagePullPolicy = "Never"
162
163
164
+ container .Resources .Limits = corev1.ResourceList {
165
+ corev1 .ResourceMemory : resource .MustParse ("800Mi" ),
166
+ }
167
+
163
168
if tc .capabilitiesDrop != nil || tc .capabilitiesAdd != nil || tc .runUser != nil || tc .runGroup != nil {
164
169
// set security context
165
170
container .SecurityContext = & corev1.SecurityContext {
0 commit comments