From 406d3bc8183c8b2918b2ddb38c97729f4252bf86 Mon Sep 17 00:00:00 2001 From: Toader Sebastian Date: Thu, 14 Apr 2022 07:26:03 +0200 Subject: [PATCH] Fix kafka broker pod label selector used when reconciling broker pod deletion (#793) --- pkg/resources/kafka/kafka.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkg/resources/kafka/kafka.go b/pkg/resources/kafka/kafka.go index 2961b5e50..2e57e7c4f 100644 --- a/pkg/resources/kafka/kafka.go +++ b/pkg/resources/kafka/kafka.go @@ -297,11 +297,9 @@ func (r *Reconciler) Reconcile(log logr.Logger) error { func (r *Reconciler) reconcileKafkaPodDelete(log logr.Logger) error { podList := &corev1.PodList{} - err := r.Client.List(context.TODO(), podList, - client.ListOption(client.InNamespace(r.KafkaCluster.Namespace)), - client.ListOption(client.MatchingLabels(kafka.LabelsForKafka(r.KafkaCluster.Name))), - client.ListOption(client.HasLabels{"brokerId"}), + client.InNamespace(r.KafkaCluster.Namespace), + client.MatchingLabels(kafka.LabelsForKafka(r.KafkaCluster.Name)), ) if err != nil { return errors.WrapIf(err, "failed to reconcile resource")