Skip to content

Commit

Permalink
Pass pc to reconcileConsumersInPlacement
Browse files Browse the repository at this point in the history
Signed-off-by: Pierangelo Di Pilato <pierdipi@redhat.com>
  • Loading branch information
pierDipi committed Jan 10, 2022
1 parent 6f5c949 commit a17ec05
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions control-plane/pkg/reconciler/consumergroup/consumergroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func (r Reconciler) reconcileConsumers(ctx context.Context, cg *kafkainternals.C
continue
}

if err := r.reconcileConsumersInPlacement(ctx, cg, *pc.Placement, pc.Consumers); err != nil {
if err := r.reconcileConsumersInPlacement(ctx, cg, pc); err != nil {
return cg.MarkReconcileConsumersFailed("ReconcileConsumer", err)
}
}
Expand All @@ -94,8 +94,10 @@ func (r Reconciler) reconcileConsumers(ctx context.Context, cg *kafkainternals.C
func (r Reconciler) reconcileConsumersInPlacement(
ctx context.Context,
cg *kafkainternals.ConsumerGroup,
placement eventingduckv1alpha1.Placement,
consumers []*kafkainternals.Consumer) error {
pc ConsumersPerPlacement) error {

placement := *pc.Placement
consumers := pc.Consumers

// Check if there is a consumer for the given placement.
if len(consumers) == 0 {
Expand Down

0 comments on commit a17ec05

Please sign in to comment.