From b633b3e986e08a4ce53e95bc0847ba0728d8c260 Mon Sep 17 00:00:00 2001 From: ashleyvjoy <110008193+ashleyvjoy@users.noreply.github.com> Date: Tue, 15 Oct 2024 17:08:37 +0530 Subject: [PATCH] fix the driver deployment (#737) Co-authored-by: Harish P --- pkg/drivers/powerflex.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/drivers/powerflex.go b/pkg/drivers/powerflex.go index 2d31d20c7..32bea9a52 100644 --- a/pkg/drivers/powerflex.go +++ b/pkg/drivers/powerflex.go @@ -102,7 +102,7 @@ func PrecheckPowerFlex(ctx context.Context, cr *csmv1.ContainerStorageModule, op } } cr.Spec.Driver.InitContainers = newInitContainers - if cr.Spec.Driver.InitContainers == nil && sdcEnabled { + if len(cr.Spec.Driver.InitContainers) == 0 && sdcEnabled { cr.Spec.Driver.InitContainers = []csmv1.ContainerTemplate{ { Name: "sdc", @@ -275,7 +275,7 @@ func IsIpv4Regex(ipAddress string) bool { // ModifyPowerflexCR - Set environment variables provided in CR func ModifyPowerflexCR(yamlString string, cr csmv1.ContainerStorageModule, fileType string) string { - sdcEnabled := "" + sdcEnabled := "true" approveSdcEnabled := "" renameSdcEnabled := "" renameSdcPrefix := ""