From 0a54db935bbd6f15cd836c61ee9d2d124c6f3d05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Tue, 11 Jan 2022 15:04:44 +0100 Subject: [PATCH] osd: use cluster name when fetching the cephcluster MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- cmd/rook/secret.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/rook/secret.go b/cmd/rook/secret.go index 9b975e256..a16d511fa 100644 --- a/cmd/rook/secret.go +++ b/cmd/rook/secret.go @@ -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)) }