Skip to content

Commit

Permalink
Merge pull request #504 from buildkite/SUP-3349-default-imagecheck-re…
Browse files Browse the repository at this point in the history
…source-requests

SUP-3349: Apply sane resource requests to imagecheck containers
  • Loading branch information
petetomasik authored Feb 12, 2025
2 parents 8592e62 + ed8c011 commit 3b466a7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions internal/controller/scheduler/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
batchv1 "k8s.io/api/batch/v1"
corev1 "k8s.io/api/core/v1"
kerrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/strategicpatch"
"k8s.io/client-go/kubernetes"
Expand Down Expand Up @@ -755,6 +756,13 @@ func (w *worker) Build(podSpec *corev1.PodSpec, skipCheckout bool, inputs buildI
Name: workspaceVolume.Name,
MountPath: "/workspace",
}},
// Apply container resource requests to imagecheck containers
Resources: corev1.ResourceRequirements{
Requests: corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse("100m"),
corev1.ResourceMemory: resource.MustParse("64Mi"),
},
},
})
i++
}
Expand Down

0 comments on commit 3b466a7

Please sign in to comment.