Skip to content

Commit e58debc

Browse files
authored
Merge pull request #206 from iPraveenParihar/fix/improper-args-format
csi: correct conditional logic for fuse mount options argument
2 parents 31a93b4 + 3de720a commit e58debc

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

internal/controller/driver_controller.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1560,6 +1560,9 @@ func mergeDriverSpecs(dest, src *csiv1a1.DriverSpec) {
15601560
if dest.KernelMountOptions == nil {
15611561
dest.KernelMountOptions = src.KernelMountOptions
15621562
}
1563+
if dest.FuseMountOptions == nil {
1564+
dest.FuseMountOptions = src.FuseMountOptions
1565+
}
15631566
if src.CephFsClientType != "" {
15641567
dest.CephFsClientType = src.CephFsClientType
15651568
}

internal/utils/csi.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -439,14 +439,14 @@ func LogRotateConfigMapName(driverName string) string {
439439
func KernelMountOptionsContainerArg(options map[string]string) string {
440440
return If(
441441
len(options) > 0,
442-
fmt.Sprintf("--kernelmountoptions==%s", MapToString(options, "=", ",")),
442+
fmt.Sprintf("--kernelmountoptions=%s", MapToString(options, "=", ",")),
443443
"",
444444
)
445445
}
446446
func FuseMountOptionsContainerArg(options map[string]string) string {
447447
return If(
448-
len(options) == 0,
449-
fmt.Sprintf("--fusemountoptions==%s", MapToString(options, "=", ",")),
448+
len(options) > 0,
449+
fmt.Sprintf("--fusemountoptions=%s", MapToString(options, "=", ",")),
450450
"",
451451
)
452452
}

0 commit comments

Comments
 (0)