knative-extensions / eventing-kafka

Kafka integrations with Knative Eventing.
Apache License 2.0
77 stars 83 forks source link

ConsumerGroup is not cleaned up after KafkaSource deletion #1238

Closed a7i closed 2 years ago

a7i commented 2 years ago

Describe the bug Deletion of KafkaSource does not clean up the ConsumerGroup. Even t hough KafkaSource is the ownerRef for ConsumerGroup

i.e.

apiVersion: internal.kafka.eventing.knative.dev/v1alpha1
kind: ConsumerGroup
metadata:
  ownerReferences:
  - apiVersion: sources.knative.dev/v1beta1
    blockOwnerDeletion: true
    controller: true
    kind: KafkaSource
    name: ....
    uid: ...

This is because the ConsumerGroup finalizer is blocking it.

Expected behavior If a KafkaSource is deleted, then the ConsumerGroup also needs to be deleted.

To Reproduce

  1. Create a KafkaSource
  2. Observe that a ConsumerGroup is created
  3. Delete the KafkaSource
  4. Observe that the ConsumerGroup is not deleted

    1. Also kubectl delete consumergroup ... does not work and requires removing the finalizers

    Knative release version v1.6.0

    Additional context Add any other context about the problem here such as proposed priority

a7i commented 2 years ago

I was missing some of the kafkasource components here

aavarghese commented 2 years ago

Also, I think you meant to discuss this in the https://github.com/knative-sandbox/eventing-kafka-broker repo (new version). Glad issue has been resolved.