-
Notifications
You must be signed in to change notification settings - Fork 225
KafkaChannel doesn't respect the scope annotation when creating the topic #1189
Comments
/label channel/kafka |
/assign |
/unassign @aliok |
I am unassigning this from myself. There's a decision needs to be done first around if we would like to have this Threads: |
cc @scholzj |
Kafka doesn't have any native support for namespaces. So when the topic operator is enabled and a topic in Kafka is created, it will created a new KafkaTopic custom resource corresponding to the topic in the namespace it is watching. By default, that is the namespace where the Kafka cluster runs (but if a user provided this cluster it can be configured to a different namespace). So this is expected and should not cause any problems. Users who do not want this can also disable the Topic Operator completely and manage the Kafka topics only directly in Kafka. Hope this helps. |
we have multiple kafka clusters and need the ability to connect to different clusters |
Can you please fix this as soon as possible since "Fixing this problem is not very hard". It is causing us bad issues currently. |
@scholzj what do you man disable the Topic Operator? how can you do that? Also, knative does not have a CRD named KafkaTopic. I'm so confused by your comment. |
The Kafka contrib part is using Kafka from a project called Strimzi. The |
@scholzj in no way does knative kafka channel contrib use Strimzi. It creates topics all by itself without any external kafka operator such as Strimzi. For instance, we don't even have Strimzi installed and use knative kafka channel contrib and it works fine. Whenever you create KafkaChannel CRD that IS part of knative kafka channel contrib, it's the knative kafka channel controller creates the kafka topic, Strimizi is not involved at all. This fix needs to happen inside the knative kafka channel controller, not Strimizi. |
I didn't said it is using the |
Any news on this? |
I know that this is valid for 0.17, not sure about the next versions. Reproducer:
|
This issue is stale because it has been open for 90 days with no |
Bump we still need something like this |
This issue is stale because it has been open for 90 days with no |
Bump any plans on supporting more than one kafka cluster? |
/remove-lifecycle stale |
@aliok Does KafkaChannel support this now or is there more to do? |
sorry, we still couldn't fix this issue :( |
@aliok would you mind recreating this issue in the eventing-kafka? |
/close Moved to eventing-kafka repo: knative-extensions/eventing-kafka#656 |
@aliok: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
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 theconfig-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
kafka
namespaceknative-eventing/config-kafka
configmap:foo
namespacefoo
'sknative-eventing/config-kafka
configmap:foo
, with the namespace scope annotation: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:
eventing-contrib/kafka/channel/pkg/reconciler/controller/controller.go
Line 90 in 25ab82d
eventing-contrib/kafka/channel/pkg/reconciler/controller/kafkachannel.go
Line 176 in 25ab82d
scope
reading happens after the topic creation using the system namespaceThe text was updated successfully, but these errors were encountered: