feat(runner): Request resources for pods
Some checks failed
build / build (push) Successful in 43s
Go Tests / go-tests (push) Failing after 1m2s

This commit is contained in:
Martin McCaffery 2025-10-30 15:25:10 +00:00
parent 557f16b2c2
commit 02b9a51976
Signed by: martin.mccaffery
GPG key ID: 7C4D0F375BCEE533

View file

@ -8,6 +8,7 @@ import (
"github.com/cloudbase/garm-provider-common/params" "github.com/cloudbase/garm-provider-common/params"
corev1 "k8s.io/api/core/v1" corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
) )
type GitHubScopeDetails struct { type GitHubScopeDetails struct {
@ -161,6 +162,11 @@ func GetPodSpec(gitHubScope GitHubScopeDetails, bootstrapParams params.Bootstrap
Image: bootstrapParams.Image, Image: bootstrapParams.Image,
ImagePullPolicy: "Always", ImagePullPolicy: "Always",
Env: envs, Env: envs,
Resources: corev1.ResourceRequirements{
Requests: corev1.ResourceList{
corev1.ResourceEphemeralStorage: resource.MustParse("2Gi"),
},
},
VolumeMounts: []corev1.VolumeMount{ VolumeMounts: []corev1.VolumeMount{
{ {
Name: "buildkitd", Name: "buildkitd",
@ -196,6 +202,11 @@ func GetPodSpec(gitHubScope GitHubScopeDetails, bootstrapParams params.Bootstrap
SuccessThreshold: 1, SuccessThreshold: 1,
TimeoutSeconds: 1, TimeoutSeconds: 1,
}, },
Resources: corev1.ResourceRequirements{
Requests: corev1.ResourceList{
corev1.ResourceEphemeralStorage: resource.MustParse("2Gi"),
},
},
VolumeMounts: []corev1.VolumeMount{ VolumeMounts: []corev1.VolumeMount{
{ {
Name: "buildkitd", Name: "buildkitd",