From 39e27e48166992860a1b08758af9e04428856e10 Mon Sep 17 00:00:00 2001 From: Praveen M Date: Tue, 25 Feb 2025 10:45:08 +0530 Subject: [PATCH] csi: correct conditional logic for fuse mount options argument Previously, the function incorrectly checked if `len(options) == 0`, causing it to return a non-empty argument when no options were provided. This fix updates the condition to `len(options) > 0`, ensuring the argument is only set when options exist. Signed-off-by: Praveen M --- internal/utils/csi.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/utils/csi.go b/internal/utils/csi.go index 5b6237d9..a0586502 100644 --- a/internal/utils/csi.go +++ b/internal/utils/csi.go @@ -439,14 +439,14 @@ func LogRotateConfigMapName(driverName string) string { func KernelMountOptionsContainerArg(options map[string]string) string { return If( len(options) > 0, - fmt.Sprintf("--kernelmountoptions==%s", MapToString(options, "=", ",")), + fmt.Sprintf("--kernelmountoptions=%s", MapToString(options, "=", ",")), "", ) } func FuseMountOptionsContainerArg(options map[string]string) string { return If( - len(options) == 0, - fmt.Sprintf("--fusemountoptions==%s", MapToString(options, "=", ",")), + len(options) > 0, + fmt.Sprintf("--fusemountoptions=%s", MapToString(options, "=", ",")), "", ) }