Skip to content

Commit

Permalink
Merge pull request #578 from jakobmoellerdev/OCPBUGS-29699
Browse files Browse the repository at this point in the history
OCPBUGS-29699: fix: remove resource limits
  • Loading branch information
jakobmoellerdev authored Feb 20, 2024
2 parents 80df1fa + 6ee33e4 commit e1ee61e
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 64 deletions.
3 changes: 0 additions & 3 deletions bundle/manifests/lvms-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -340,9 +340,6 @@ spec:
initialDelaySeconds: 5
periodSeconds: 10
resources:
limits:
cpu: 100m
memory: 100Mi
requests:
cpu: 50m
memory: 50Mi
Expand Down
3 changes: 0 additions & 3 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ spec:
initialDelaySeconds: 5
periodSeconds: 10
resources:
limits:
cpu: 100m
memory: 100Mi
requests:
cpu: 50m
memory: 50Mi
Expand Down
18 changes: 0 additions & 18 deletions controllers/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,50 +40,32 @@ const (
// CSI Controller resource requests/limits
// TODO: Reduce these values and reach optimistic values without effecting performance
TopolvmControllerMemRequest = "100Mi"
TopolvmControllerMemLimit = "150Mi"
TopolvmControllerCPURequest = "100m"
TopolvmControllerCPULimit = "100m"

TopolvmCsiProvisionerMemRequest = "50Mi"
TopolvmCsiProvisionerMemLimit = "100Mi"
TopolvmCsiProvisionerCPURequest = "50m"
TopolvmCsiProvisionerCPULimit = "100m"

TopolvmCsiResizerMemRequest = "50Mi"
TopolvmCsiResizerMemLimit = "100Mi"
TopolvmCsiResizerCPURequest = "20m"
TopolvmCsiResizerCPULimit = "50m"

TopolvmCsiSnapshotterMemRequest = "50Mi"
TopolvmCsiSnapshotterMemLimit = "100Mi"
TopolvmCsiSnapshotterCPURequest = "20m"
TopolvmCsiSnapshotterCPULimit = "50m"

VgManagerMemRequest = "50Mi"
VgManagerMemLimit = "100Mi"
VgManagerCPURequest = "30m"
VgManagerCPULimit = "50m"

// topoLVM Node resource requests/limits
TopolvmNodeMemRequest = "150Mi"
TopolvmNodeMemLimit = "200Mi"
TopolvmNodeCPURequest = "50m"
TopolvmNodeCPULimit = "100m"

TopolvmdMemRequest = "100Mi"
TopolvmdMemLimit = "150Mi"
TopolvmdCPURequest = "150m"
TopolvmdCPULimit = "200m"

CSIRegistrarMemRequest = "30Mi"
CSIRegistrarMemLimit = "50Mi"
CSIRegistrarCPURequest = "20m"
CSIRegistrarCPULimit = "30m"

LivenessProbeMemRequest = "30Mi"
LivenessProbeMemLimit = "50Mi"
LivenessProbeCPURequest = "30m"
LivenessProbeCPULimit = "50m"

// CSI Provisioner requires below environment values to make use of CSIStorageCapacity
PodNameEnv = "POD_NAME"
Expand Down
20 changes: 0 additions & 20 deletions controllers/topolvm_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,6 @@ func getControllerContainer() *corev1.Container {
}

resourceRequirements := corev1.ResourceRequirements{
Limits: corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse(TopolvmControllerCPULimit),
corev1.ResourceMemory: resource.MustParse(TopolvmControllerMemLimit),
},
Requests: corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse(TopolvmControllerCPURequest),
corev1.ResourceMemory: resource.MustParse(TopolvmControllerMemRequest),
Expand Down Expand Up @@ -279,10 +275,6 @@ func getCsiProvisionerContainer() *corev1.Container {
}

resourceRequirements := corev1.ResourceRequirements{
Limits: corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse(TopolvmCsiProvisionerCPULimit),
corev1.ResourceMemory: resource.MustParse(TopolvmCsiProvisionerMemLimit),
},
Requests: corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse(TopolvmCsiProvisionerCPURequest),
corev1.ResourceMemory: resource.MustParse(TopolvmCsiProvisionerMemRequest),
Expand Down Expand Up @@ -335,10 +327,6 @@ func getCsiResizerContainer() *corev1.Container {
}

resourceRequirements := corev1.ResourceRequirements{
Limits: corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse(TopolvmCsiResizerCPULimit),
corev1.ResourceMemory: resource.MustParse(TopolvmCsiResizerMemLimit),
},
Requests: corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse(TopolvmCsiResizerCPURequest),
corev1.ResourceMemory: resource.MustParse(TopolvmCsiResizerMemRequest),
Expand Down Expand Up @@ -366,10 +354,6 @@ func getCsiSnapshotterContainer() *corev1.Container {
}

resourceRequirements := corev1.ResourceRequirements{
Limits: corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse(TopolvmCsiSnapshotterCPULimit),
corev1.ResourceMemory: resource.MustParse(TopolvmCsiSnapshotterMemLimit),
},
Requests: corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse(TopolvmCsiSnapshotterCPURequest),
corev1.ResourceMemory: resource.MustParse(TopolvmCsiSnapshotterMemRequest),
Expand All @@ -389,10 +373,6 @@ func getCsiSnapshotterContainer() *corev1.Container {

func getLivenessProbeContainer() *corev1.Container {
resourceRequirements := corev1.ResourceRequirements{
Limits: corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse(LivenessProbeCPULimit),
corev1.ResourceMemory: resource.MustParse(LivenessProbeMemLimit),
},
Requests: corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse(LivenessProbeCPURequest),
corev1.ResourceMemory: resource.MustParse(LivenessProbeMemRequest),
Expand Down
16 changes: 0 additions & 16 deletions controllers/topolvm_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,6 @@ func getLvmdContainer() *corev1.Container {
}

resourceRequirements := corev1.ResourceRequirements{
Limits: corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse(TopolvmdCPULimit),
corev1.ResourceMemory: resource.MustParse(TopolvmdMemLimit),
},
Requests: corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse(TopolvmdCPURequest),
corev1.ResourceMemory: resource.MustParse(TopolvmdMemRequest),
Expand Down Expand Up @@ -288,10 +284,6 @@ func getNodeContainer() *corev1.Container {
}

requirements := corev1.ResourceRequirements{
Limits: corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse(TopolvmNodeCPULimit),
corev1.ResourceMemory: resource.MustParse(TopolvmNodeMemLimit),
},
Requests: corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse(TopolvmNodeCPURequest),
corev1.ResourceMemory: resource.MustParse(TopolvmNodeMemRequest),
Expand Down Expand Up @@ -361,10 +353,6 @@ func getCsiRegistrarContainer() *corev1.Container {
}

requirements := corev1.ResourceRequirements{
Limits: corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse(CSIRegistrarCPULimit),
corev1.ResourceMemory: resource.MustParse(CSIRegistrarMemLimit),
},
Requests: corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse(CSIRegistrarCPURequest),
corev1.ResourceMemory: resource.MustParse(CSIRegistrarMemRequest),
Expand All @@ -384,10 +372,6 @@ func getCsiRegistrarContainer() *corev1.Container {

func getNodeLivenessProbeContainer() *corev1.Container {
resourceRequirements := corev1.ResourceRequirements{
Limits: corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse(LivenessProbeCPULimit),
corev1.ResourceMemory: resource.MustParse(LivenessProbeMemLimit),
},
Requests: corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse(LivenessProbeCPURequest),
corev1.ResourceMemory: resource.MustParse(LivenessProbeMemRequest),
Expand Down
4 changes: 0 additions & 4 deletions controllers/vgmanager_daemonset.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,6 @@ func newVGManagerDaemonset(lvmCluster *lvmv1alpha1.LVMCluster, namespace string,
}

resourceRequirements := corev1.ResourceRequirements{
Limits: corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse(VgManagerCPULimit),
corev1.ResourceMemory: resource.MustParse(VgManagerMemLimit),
},
Requests: corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse(VgManagerCPURequest),
corev1.ResourceMemory: resource.MustParse(VgManagerMemRequest),
Expand Down

0 comments on commit e1ee61e

Please sign in to comment.