Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

KafkaChannel doesn't respect the scope annotation when creating the topic #656

Open
aliok opened this issue May 26, 2021 · 7 comments
Open
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/accepted Issues which should be fixed (post-triage)

Comments

@aliok
Copy link
Member

aliok commented May 26, 2021

ORIGINAL ISSUE: knative/eventing-contrib#1189

Describe the bug
When eventing.knative.dev/scope: namespace annotation is available on a channel, KafkaChannel should create the topic in the Kafka cluster that's specified in the config-kafka configmap within the same namespace.
But the topic is created in the Kafka cluster that's specified in the Knative system's knative-eventing/config-kafka configmap.

Expected behavior
Topic should be created in the correct Kafka instance.

To Reproduce

  • Create a Kafka cluster in kafka namespace
  • Use that cluster in Knative eventing system's knative-eventing/config-kafka configmap:
apiVersion: v1
kind: ConfigMap
metadata:
  name: config-kafka
  namespace: knative-eventing
data:
  bootstrapServers: my-cluster-kafka-bootstrap.kafka:9092
  • Create a Kafka cluster in foo namespace
  • Use that cluster in foo's knative-eventing/config-kafka configmap:
apiVersion: v1
kind: ConfigMap
metadata:
  name: config-kafka
  namespace: foo
data:
  bootstrapServers: my-cluster-kafka-bootstrap.foo:9092
  • Create a channel in foo, with the namespace scope annotation:
apiVersion: messaging.knative.dev/v1alpha1
kind: KafkaChannel
metadata:
  name: my-kafka-channel
  namespace: foo
  annotations:
    eventing.knative.dev/scope: namespace
spec:
  numPartitions: 1
  replicationFactor: 1
  • Topic is created in the first Kafka cluster

Knative release version
I reproduced the issue on 0.13, but it is valid in 0.14 too

Additional context
Creating namespace-scoped dispatchers : https://github.com/knative/eventing-contrib/blob/release-0.14/kafka/channel/README.md

Code refs:

@aliok aliok added the kind/bug Categorizes issue or PR as related to a bug. label May 26, 2021
@aliok
Copy link
Member Author

aliok commented May 26, 2021

Related #126

@ssandanshi
Copy link

This bug fix would be greatly appreciated.

@Vkrish-Nimmagadda
Copy link

Vkrish-Nimmagadda commented Aug 5, 2021

Hello KN Enthusiasts,
Can someone please help if this bug if fixed ? We are using KNative for one of our releases and this is blocking us as we are not able to create a Topic. It would be great if there is a workaround till the fix. We have the latest version fo Knative-eventing (0.24.1). Any quick help is appreciated.

@github-actions
Copy link

github-actions bot commented Nov 4, 2021

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 4, 2021
@aliok
Copy link
Member Author

aliok commented Nov 4, 2021

/remove-lifecycle stale

@knative-prow-robot knative-prow-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 4, 2021
@github-actions
Copy link

github-actions bot commented Feb 3, 2022

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen. Mark the issue as
fresh by adding the comment /remove-lifecycle stale.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 3, 2022
@pierDipi
Copy link
Member

pierDipi commented Feb 3, 2022

/remove-lifecycle stale
/triage accepted

@knative-prow-robot knative-prow-robot added triage/accepted Issues which should be fixed (post-triage) and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Feb 3, 2022
matzew added a commit to matzew/eventing-kafka that referenced this issue May 5, 2022
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/accepted Issues which should be fixed (post-triage)
Projects
None yet
Development

No branches or pull requests

5 participants