From dc744520435683ad990edab8e3b346c1165f2ecf Mon Sep 17 00:00:00 2001 From: Lukas Piwowarski Date: Wed, 9 Oct 2024 16:13:41 +0200 Subject: [PATCH] Remove resource limit This patch removes the resource limit for test operator pods as we are hitting both issue when: - the limit is too low - the limit is too high (scheduler does not have where to schedule the pod) This is a hotfix before we expose the resource limit values through the test-operator CRs and find the correct default values. Related PRs: - https://github.com/openstack-k8s-operators/test-operator/pull/222 - https://github.com/openstack-k8s-operators/test-operator/pull/205 --- pkg/ansibletest/job.go | 3 --- pkg/horizontest/job.go | 3 --- pkg/tempest/job.go | 3 --- pkg/tobiko/job.go | 3 --- pkg/util/common.go | 6 ------ 5 files changed, 18 deletions(-) diff --git a/pkg/ansibletest/job.go b/pkg/ansibletest/job.go index 1c12a233..5028bfe1 100644 --- a/pkg/ansibletest/job.go +++ b/pkg/ansibletest/job.go @@ -64,9 +64,6 @@ func Job( Env: env.MergeEnvs([]corev1.EnvVar{}, envVars), VolumeMounts: GetVolumeMounts(mountCerts, instance, externalWorkflowCounter), SecurityContext: &securityContext, - Resources: corev1.ResourceRequirements{ - Limits: util.GetResourceLimits(), - }, }, }, Volumes: GetVolumes( diff --git a/pkg/horizontest/job.go b/pkg/horizontest/job.go index 08d6409d..576400f9 100644 --- a/pkg/horizontest/job.go +++ b/pkg/horizontest/job.go @@ -63,9 +63,6 @@ func Job( Env: env.MergeEnvs([]corev1.EnvVar{}, envVars), VolumeMounts: GetVolumeMounts(mountCerts, mountKeys, mountKubeconfig, instance), SecurityContext: &securityContext, - Resources: corev1.ResourceRequirements{ - Limits: util.GetResourceLimits(), - }, }, }, Volumes: GetVolumes( diff --git a/pkg/tempest/job.go b/pkg/tempest/job.go index f32e115d..7ac1b2a6 100644 --- a/pkg/tempest/job.go +++ b/pkg/tempest/job.go @@ -79,9 +79,6 @@ func Job( }, }, }, - Resources: corev1.ResourceRequirements{ - Limits: util.GetResourceLimits(), - }, }, }, Volumes: GetVolumes( diff --git a/pkg/tobiko/job.go b/pkg/tobiko/job.go index 8fea247c..38f7021e 100644 --- a/pkg/tobiko/job.go +++ b/pkg/tobiko/job.go @@ -68,9 +68,6 @@ func Job( Env: env.MergeEnvs([]corev1.EnvVar{}, envVars), VolumeMounts: GetVolumeMounts(mountCerts, mountKeys, mountKubeconfig, instance), SecurityContext: &securityContext, - Resources: corev1.ResourceRequirements{ - Limits: util.GetResourceLimits(), - }, }, }, Volumes: GetVolumes( diff --git a/pkg/util/common.go b/pkg/util/common.go index 348ab619..0ca9970e 100644 --- a/pkg/util/common.go +++ b/pkg/util/common.go @@ -39,9 +39,3 @@ func GetSecurityContext( return securityContext } -func GetResourceLimits() corev1.ResourceList { - return corev1.ResourceList{ - corev1.ResourceCPU: resource.MustParse("2000m"), - corev1.ResourceMemory: resource.MustParse("8Gi"), - } -}