Skip to content

Commit

Permalink
Fix kafka broker pod label selector used when reconciling broker pod …
Browse files Browse the repository at this point in the history
…deletion (#793)
  • Loading branch information
stoader authored Apr 14, 2022
1 parent 815d07e commit 406d3bc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/resources/kafka/kafka.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 406d3bc

Please sign in to comment.