Skip to content

Commit

Permalink
Remove resource limit
Browse files Browse the repository at this point in the history
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:
- openstack-k8s-operators#222
- openstack-k8s-operators#205
  • Loading branch information
lpiwowar committed Oct 9, 2024
1 parent edd79b3 commit dd4c6fe
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 20 deletions.
3 changes: 0 additions & 3 deletions pkg/ansibletest/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
3 changes: 0 additions & 3 deletions pkg/horizontest/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
3 changes: 0 additions & 3 deletions pkg/tempest/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,6 @@ func Job(
},
},
},
Resources: corev1.ResourceRequirements{
Limits: util.GetResourceLimits(),
},
},
},
Volumes: GetVolumes(
Expand Down
3 changes: 0 additions & 3 deletions pkg/tobiko/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
8 changes: 0 additions & 8 deletions pkg/util/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package util

import (
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
)

func GetSecurityContext(
Expand Down Expand Up @@ -38,10 +37,3 @@ func GetSecurityContext(

return securityContext
}

func GetResourceLimits() corev1.ResourceList {
return corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse("2000m"),
corev1.ResourceMemory: resource.MustParse("8Gi"),
}
}

0 comments on commit dd4c6fe

Please sign in to comment.