diff --git a/pkg/operator/ceph/csi/cluster_config.go b/pkg/operator/ceph/csi/cluster_config.go index 11aaeae34..42f761412 100644 --- a/pkg/operator/ceph/csi/cluster_config.go +++ b/pkg/operator/ceph/csi/cluster_config.go @@ -271,14 +271,11 @@ func updateCSIDriverOptions(curr, clusterKey string, for i := range cc { // If the clusterID belongs to the same cluster, update the entry. if clusterKey == cc[i].Namespace { - cc[i].ReadAffinity = cephcsi.ReadAffinity{ - Enabled: csiDriverOptions.ReadAffinity.Enabled, - CrushLocationLabels: csiDriverOptions.ReadAffinity.CrushLocationLabels, - } - cc[i].CephFS = cephcsi.CephFS{ - KernelMountOptions: csiDriverOptions.CephFS.KernelMountOptions, - FuseMountOptions: csiDriverOptions.CephFS.FuseMountOptions, - } + cc[i].ReadAffinity.Enabled = csiDriverOptions.ReadAffinity.Enabled + cc[i].ReadAffinity.CrushLocationLabels = csiDriverOptions.ReadAffinity.CrushLocationLabels + + cc[i].CephFS.KernelMountOptions = csiDriverOptions.CephFS.KernelMountOptions + cc[i].CephFS.FuseMountOptions = csiDriverOptions.CephFS.FuseMountOptions } } diff --git a/pkg/operator/ceph/csi/cluster_config_test.go b/pkg/operator/ceph/csi/cluster_config_test.go index ad223903e..7d8ac69fc 100644 --- a/pkg/operator/ceph/csi/cluster_config_test.go +++ b/pkg/operator/ceph/csi/cluster_config_test.go @@ -474,6 +474,9 @@ func TestUpdateCSIDriverOptions(t *testing.T) { ClusterInfo: cephcsi.ClusterInfo{ ClusterID: "rook-ceph", Monitors: []string{"1.1.1.1"}, + CephFS: cephcsi.CephFS{ + NetNamespaceFilePath: "netnamespacefilepath", + }, }, }, }, @@ -500,8 +503,9 @@ func TestUpdateCSIDriverOptions(t *testing.T) { CrushLocationLabels: []string{"topology.rook.io/rack"}, }, CephFS: cephcsi.CephFS{ - KernelMountOptions: "rw,noatime", - FuseMountOptions: "debug", + KernelMountOptions: "rw,noatime", + FuseMountOptions: "debug", + NetNamespaceFilePath: "netnamespacefilepath", }, }, },