From fb0a8b49beaa066d160f3bffef6a78a519633e20 Mon Sep 17 00:00:00 2001 From: hellokg21 Date: Tue, 31 Oct 2023 17:08:27 +0800 Subject: [PATCH] set namespace when listing ldm pods Signed-off-by: hellokg21 --- pkg/install/localdiskmanager/localdiskmanager.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/install/localdiskmanager/localdiskmanager.go b/pkg/install/localdiskmanager/localdiskmanager.go index 75c535b4..28731149 100644 --- a/pkg/install/localdiskmanager/localdiskmanager.go +++ b/pkg/install/localdiskmanager/localdiskmanager.go @@ -455,7 +455,7 @@ func (m *LocalDiskManagerMaintainer) Ensure() (*hwameistoriov1alpha1.Cluster, er } var podList corev1.PodList - if err := m.Client.List(context.TODO(), &podList, &client.ListOptions{Namespace: ldmDaemonSet.Namespace}); err != nil { + if err := m.Client.List(context.TODO(), &podList, &client.ListOptions{Namespace: ldmDaemonSetToCreate.Namespace}); err != nil { log.Errorf("List pods err: %v", err) return newClusterInstance, err }