File tree 1 file changed +11
-0
lines changed
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import (
13
13
apiv1 "k8s.io/api/core/v1"
14
14
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
15
15
"k8s.io/apimachinery/pkg/types"
16
+ "k8s.io/apimachinery/pkg/api/resource"
16
17
batchv1typed "k8s.io/client-go/kubernetes/typed/batch/v1"
17
18
corev1typed "k8s.io/client-go/kubernetes/typed/core/v1"
18
19
)
@@ -255,6 +256,16 @@ func (t *TraceJobClient) CreateJob(nj TraceJob) (*batchv1.Job, error) {
255
256
Command : bpfTraceCmd ,
256
257
TTY : true ,
257
258
Stdin : true ,
259
+ Resources : apiv1.ResourceRequirements {
260
+ Requests : apiv1.ResourceList {
261
+ apiv1 .ResourceCPU : resource .MustParse ("100m" ),
262
+ apiv1 .ResourceMemory : resource .MustParse ("100Mi" ),
263
+ },
264
+ Limits : apiv1.ResourceList {
265
+ apiv1 .ResourceCPU : resource .MustParse ("1" ),
266
+ apiv1 .ResourceMemory : resource .MustParse ("1G" ),
267
+ },
268
+ },
258
269
VolumeMounts : []apiv1.VolumeMount {
259
270
apiv1.VolumeMount {
260
271
Name : "program" ,
You can’t perform that action at this time.
0 commit comments