From 083cb37e3463be8c77df855267bfd19b8b0a74e6 Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Mon, 22 Sep 2025 09:43:28 +0200 Subject: [PATCH 1/2] csi: remove liveness from the driver spec CephCSI will remove the livess sidecar container functionality as it was created very long back and it should be replaced with kubernetes GRPC livessness problem. Signed-off-by: Madhu Rajanna (cherry picked from commit 46c7d2cc264e2a739a4684833b3db601a33113fc) --- pkg/operator/ceph/csi/operator_driver.go | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/pkg/operator/ceph/csi/operator_driver.go b/pkg/operator/ceph/csi/operator_driver.go index 888f62f2a..93caa951b 100644 --- a/pkg/operator/ceph/csi/operator_driver.go +++ b/pkg/operator/ceph/csi/operator_driver.go @@ -95,9 +95,6 @@ func (r *ReconcileCSI) createOrUpdateRBDDriverResource(cluster cephv1.CephCluste } rbdDriver.Spec.ControllerPlugin.Resources = createDriverControllerPluginResources(rbdPluginResource) - rbdDriver.Spec.Liveness = &csiopv1.LivenessSpec{ - MetricsPort: int(CSIParam.RBDLivenessMetricsPort), - } rbdDriver.Spec.NodePlugin.Resources = createDriverNodePluginResouces(rbdProvisionerResource) rbdDriver.Spec.NodePlugin.UpdateStrategy = &v1.DaemonSetUpdateStrategy{ Type: v1.RollingUpdateDaemonSetStrategyType, @@ -148,9 +145,6 @@ func (r *ReconcileCSI) createOrUpdateCephFSDriverResource(cluster cephv1.CephClu } cephFsDriver.Spec.ControllerPlugin.Resources = createDriverControllerPluginResources(cephFSPluginResource) - cephFsDriver.Spec.Liveness = &csiopv1.LivenessSpec{ - MetricsPort: int(CSIParam.CephFSLivenessMetricsPort), - } cephFsDriver.Spec.NodePlugin.Resources = createDriverNodePluginResouces(cephFSProvisionerResource) cephFsDriver.Spec.NodePlugin.UpdateStrategy = &v1.DaemonSetUpdateStrategy{ @@ -362,11 +356,6 @@ func createDriverControllerPluginResources(key string) csiopv1.ControllerPluginR Limits: r.Resource.Limits, Requests: r.Resource.Requests, } - case strings.Contains(r.Name, "liveness"): - controllerPluginResources.Liveness = &corev1.ResourceRequirements{ - Limits: r.Resource.Limits, - Requests: r.Resource.Requests, - } case strings.Contains(r.Name, "addons"): controllerPluginResources.Addons = &corev1.ResourceRequirements{ Limits: r.Resource.Limits, @@ -394,11 +383,6 @@ func createDriverNodePluginResouces(key string) csiopv1.NodePluginResourcesSpec Limits: r.Resource.Limits, Requests: r.Resource.Requests, } - } else if strings.Contains(r.Name, "liveness") { - nodePluginResources.Liveness = &corev1.ResourceRequirements{ - Limits: r.Resource.Limits, - Requests: r.Resource.Requests, - } } else if strings.Contains(r.Name, "addons") { nodePluginResources.Addons = &corev1.ResourceRequirements{ Limits: r.Resource.Limits, From ae0dc30ccc4bcabfd21442815be717b604998d66 Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Mon, 22 Sep 2025 09:49:14 +0200 Subject: [PATCH 2/2] csi: use recreate deployment strategy This is a fix/workaround to set the Recreate deployment strategy as default in Rook as its long proven working without any problem. Signed-off-by: Madhu Rajanna (cherry picked from commit 333082c397dc11c805a9b20ccc63a4e6468462df) --- pkg/operator/ceph/csi/operator_config.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/operator/ceph/csi/operator_config.go b/pkg/operator/ceph/csi/operator_config.go index 3a68f6421..cbd4d8476 100644 --- a/pkg/operator/ceph/csi/operator_config.go +++ b/pkg/operator/ceph/csi/operator_config.go @@ -21,6 +21,7 @@ import ( csiopv1 "github.com/ceph/ceph-csi-operator/api/v1" "github.com/pkg/errors" + appsv1 "k8s.io/api/apps/v1" v1 "k8s.io/api/core/v1" k8scsiv1 "k8s.io/api/storage/v1" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -103,6 +104,9 @@ func (r *ReconcileCSI) generateCSIOpConfigSpec(cluster cephv1.CephCluster, opCon EnableSeLinuxHostMount: &CSIParam.EnablePluginSelinuxHostMount, }, ControllerPlugin: &csiopv1.ControllerPluginSpec{ + DeploymentStrategy: &appsv1.DeploymentStrategy{ + Type: appsv1.RecreateDeploymentStrategyType, + }, PodCommonSpec: csiopv1.PodCommonSpec{ PrioritylClassName: &CSIParam.PluginPriorityClassName, Affinity: &v1.Affinity{