Skip to content

Commit

Permalink
csi: remove cpu & memory limits from sidecars
Browse files Browse the repository at this point in the history
Signed-off-by: Rewant Soni <[email protected]>
  • Loading branch information
rewantsoni committed Mar 1, 2024
1 parent 4f444bf commit f32b5d4
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 79 deletions.
1 change: 0 additions & 1 deletion pkg/csi/cephfsdaemonset.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ func GetCephFSDaemonSet(namespace string) *appsv1.DaemonSet {
"--nodeserver=true",
fmt.Sprintf("--drivername=%s", GetCephFSDriverName()),
},
Resources: templates.CephFSPluginResourceRequirements,
Env: []corev1.EnvVar{
{
Name: "POD_IP",
Expand Down
1 change: 0 additions & 1 deletion pkg/csi/cephfsdeployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ func GetCephFSDeployment(namespace string) *appsv1.Deployment {
"--controllerserver=true",
fmt.Sprintf("--drivername=%s", GetCephFSDriverName()),
},
Resources: templates.CephFSPluginResourceRequirements,
Env: []corev1.EnvVar{
{
Name: "POD_IP",
Expand Down
1 change: 0 additions & 1 deletion pkg/csi/rbddaemonset.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ func GetRBDDaemonSet(namespace string) *appsv1.DaemonSet {
fmt.Sprintf("--stagingpath=%s/plugins/kubernetes.io/csi/", templates.DefaultKubeletDirPath),
"--csi-addons-endpoint=$(CSIADDONS_ENDPOINT)",
},
Resources: templates.RBDPluginResourceRequirements,
Env: []corev1.EnvVar{
{
Name: "POD_IP",
Expand Down
1 change: 0 additions & 1 deletion pkg/csi/rbddeployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ func GetRBDDeployment(namespace string) *appsv1.Deployment {
fmt.Sprintf("--csi-addons-endpoint=%s", templates.DefaultCSIAddonsSocketPath),
fmt.Sprintf("--drivername=%s", GetRBDDriverName()),
},
Resources: templates.RBDPluginResourceRequirements,
Env: []corev1.EnvVar{
{
Name: "POD_IP",
Expand Down
75 changes: 0 additions & 75 deletions pkg/templates/csisidecars.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"fmt"

corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
"k8s.io/utils/ptr"
)

Expand All @@ -43,16 +42,6 @@ var ProvisionerContainer = &corev1.Container{
MountPath: DefaultSocketDir,
},
},
Resources: corev1.ResourceRequirements{
Requests: corev1.ResourceList{
"memory": resource.MustParse("85Mi"),
"cpu": resource.MustParse("15m"),
},
Limits: corev1.ResourceList{
"memory": resource.MustParse("85Mi"),
"cpu": resource.MustParse("15m"),
},
},
}

var ResizerContainer = &corev1.Container{
Expand All @@ -72,16 +61,6 @@ var ResizerContainer = &corev1.Container{
MountPath: DefaultSocketDir,
},
},
Resources: corev1.ResourceRequirements{
Requests: corev1.ResourceList{
"memory": resource.MustParse("55Mi"),
"cpu": resource.MustParse("10m"),
},
Limits: corev1.ResourceList{
"memory": resource.MustParse("55Mi"),
"cpu": resource.MustParse("10m"),
},
},
}

var AttacherContainer = &corev1.Container{
Expand All @@ -101,16 +80,6 @@ var AttacherContainer = &corev1.Container{
MountPath: DefaultSocketDir,
},
},
Resources: corev1.ResourceRequirements{
Requests: corev1.ResourceList{
"memory": resource.MustParse("45Mi"),
"cpu": resource.MustParse("10m"),
},
Limits: corev1.ResourceList{
"memory": resource.MustParse("45Mi"),
"cpu": resource.MustParse("10m"),
},
},
}

var SnapshotterContainer = &corev1.Container{
Expand All @@ -130,17 +99,6 @@ var SnapshotterContainer = &corev1.Container{
MountPath: DefaultSocketDir,
},
},

Resources: corev1.ResourceRequirements{
Requests: corev1.ResourceList{
"memory": resource.MustParse("35Mi"),
"cpu": resource.MustParse("10m"),
},
Limits: corev1.ResourceList{
"memory": resource.MustParse("35Mi"),
"cpu": resource.MustParse("10m"),
},
},
}

var CSIAddonsContainer = &corev1.Container{
Expand Down Expand Up @@ -237,37 +195,4 @@ var DriverRegistrar = &corev1.Container{
MountPath: "/registration",
},
},

Resources: corev1.ResourceRequirements{
Requests: corev1.ResourceList{
"memory": resource.MustParse("25Mi"),
"cpu": resource.MustParse("10m"),
},
Limits: corev1.ResourceList{
"memory": resource.MustParse("25Mi"),
"cpu": resource.MustParse("10m"),
},
},
}

var RBDPluginResourceRequirements = corev1.ResourceRequirements{
Requests: corev1.ResourceList{
"memory": resource.MustParse("270Mi"),
"cpu": resource.MustParse("25m"),
},
Limits: corev1.ResourceList{
"memory": resource.MustParse("270Mi"),
"cpu": resource.MustParse("25m"),
},
}

var CephFSPluginResourceRequirements = corev1.ResourceRequirements{
Requests: corev1.ResourceList{
"memory": resource.MustParse("160Mi"),
"cpu": resource.MustParse("20m"),
},
Limits: corev1.ResourceList{
"memory": resource.MustParse("160Mi"),
"cpu": resource.MustParse("20m"),
},
}

0 comments on commit f32b5d4

Please sign in to comment.