diff --git a/controllers/storagecluster/cephcluster.go b/controllers/storagecluster/cephcluster.go index ca8a6b26b8..86bc4b072e 100644 --- a/controllers/storagecluster/cephcluster.go +++ b/controllers/storagecluster/cephcluster.go @@ -543,7 +543,7 @@ func isMultus(nwSpec *rookCephv1.NetworkSpec) bool { return false } -func validateMultusSelectors(selectors map[string]string) error { +func validateMultusSelectors(selectors map[rookCephv1.CephNetworkType]string) error { publicNetwork, validPublicNetworkKey := selectors[publicNetworkSelectorKey] clusterNetwork, validClusterNetworkKey := selectors[clusterNetworkSelectorKey] if !validPublicNetworkKey && !validClusterNetworkKey { diff --git a/controllers/storagecluster/storagecluster_controller_test.go b/controllers/storagecluster/storagecluster_controller_test.go index d369dc6e36..59498aa040 100644 --- a/controllers/storagecluster/storagecluster_controller_test.go +++ b/controllers/storagecluster/storagecluster_controller_test.go @@ -1109,9 +1109,9 @@ func TestStorageClusterOnMultus(t *testing.T) { if c.testCase != "default" { c.cr.Spec.Network = &rookCephv1.NetworkSpec{ Provider: networkProvider, - Selectors: map[string]string{ - "public": c.publicNW, - "cluster": c.clusterNW, + Selectors: map[rookCephv1.CephNetworkType]string{ + rookCephv1.CephNetworkPublic: c.publicNW, + rookCephv1.CephNetworkCluster: c.clusterNW, }, } }