diff --git a/e2e/internal/kuberesource/parts.go b/e2e/internal/kuberesource/parts.go index 285e32024e..7155bcbc24 100644 --- a/e2e/internal/kuberesource/parts.go +++ b/e2e/internal/kuberesource/parts.go @@ -151,7 +151,7 @@ func Initializer() *applycorev1.ContainerApplyConfiguration { WithName("initializer"). WithImage("ghcr.io/edgelesssys/contrast/initializer:latest"). WithResources(ResourceRequirements(). - WithMemoryLimitAndRequest(50), + WithMemoryRequest(50), ). WithEnv(NewEnvVar("COORDINATOR_HOST", "coordinator")). WithVolumeMounts(VolumeMount(). diff --git a/e2e/internal/kuberesource/wrappers.go b/e2e/internal/kuberesource/wrappers.go index 4448fe8afa..939b75bd31 100644 --- a/e2e/internal/kuberesource/wrappers.go +++ b/e2e/internal/kuberesource/wrappers.go @@ -118,6 +118,14 @@ func ResourceRequirements() *ResourceRequirementsConfig { return &ResourceRequirementsConfig{applycorev1.ResourceRequirements()} } +// WithMemoryRequest sets the memory request of the ResourceRequirements. +func (r *ResourceRequirementsConfig) WithMemoryRequest(memoryMi int64) *applycorev1.ResourceRequirementsApplyConfiguration { + return r. + WithRequests(corev1.ResourceList{ + corev1.ResourceMemory: fromPtr(resource.NewQuantity(memoryMi*1024*1024, resource.BinarySI)), + }) +} + // WithMemoryLimitAndRequest sets the memory limit and request of the ResourceRequirements. func (r *ResourceRequirementsConfig) WithMemoryLimitAndRequest(memoryMi int64) *applycorev1.ResourceRequirementsApplyConfiguration { return r.