osd: use cluster name when fetching the cephcluster

Previously we were using the namespace, it's a mistake, even though most
clusters use the same name as the namespace.
Let's be precise and use the cluster name when looking for it.

Signed-off-by: Sébastien Han <seb@redhat.com>
This commit is contained in:
Sébastien Han committed 2022-01-11 15:05:59 +01:00
1 parent 376ca62f8a
commit 0a54db935b
1 file changed
+1 -1
+1 -1
View File
@@ -67,7 +67,7 @@ func startSecret() *kms.Config {
context := rook.NewContext()
// Fetch the CephCluster for the KMS details
cephCluster, err := context.RookClientset.CephV1().CephClusters(namespace).Get(ctx, namespace, metav1.GetOptions{})
cephCluster, err := context.RookClientset.CephV1().CephClusters(namespace).Get(ctx, name, metav1.GetOptions{})
if err != nil {
rook.TerminateFatal(errors.Wrapf(err, "failed to get ceph cluster in namespace %q", namespace))
}