csi: fix NetNamespaceFilePath generation

Corrected the NetNamespaceFilePath generation in the
subvolumegroup & radosnamespace controller by replacing
the cephCluster.Name with cephCluster.Namespace.

Signed-off-by: Praveen M <m.praveen@ibm.com>
(cherry picked from commit 67ff924b57)
This commit is contained in:
Praveen M authored and Mergify committed 2024-02-01 16:33:34 +00:00
1 parent dd7e6e4b81
commit e596f31cf0
2 files changed
+2 -2

No files matched your search

@@ -292,7 +292,7 @@ func (r *ReconcileCephFilesystemSubVolumeGroup) updateClusterConfig(cephFilesyst
// If the cluster has Multus enabled we need to append the network namespace of the driver's
// holder DaemonSet in the csi configmap
if cephCluster.Spec.Network.IsMultus() {
netNamespaceFilePath, err := csi.GenerateNetNamespaceFilePath(r.opManagerContext, r.client, cephCluster.Name, r.opConfig.OperatorNamespace, csi.CephFSDriverShortName)
netNamespaceFilePath, err := csi.GenerateNetNamespaceFilePath(r.opManagerContext, r.client, cephCluster.Namespace, r.opConfig.OperatorNamespace, csi.CephFSDriverShortName)
if err != nil {
return errors.Wrap(err, "failed to generate cephfs net namespace file path")
}
@@ -280,7 +280,7 @@ func (r *ReconcileCephBlockPoolRadosNamespace) updateClusterConfig(cephBlockPool
if cephCluster.Spec.Network.IsMultus() {
// Build the network namespace config to be injected into the csi config
netNamespaceFilePath, err := csi.GenerateNetNamespaceFilePath(r.opManagerContext, r.client, cephCluster.Name, r.opConfig.OperatorNamespace, csi.RBDDriverShortName)
netNamespaceFilePath, err := csi.GenerateNetNamespaceFilePath(r.opManagerContext, r.client, cephCluster.Namespace, r.opConfig.OperatorNamespace, csi.RBDDriverShortName)
if err != nil {
return errors.Wrap(err, "failed to generate rbd net namespace file path")
}