8000 KafkaChannel doesn't respect the scope annotation when creating the topic · Issue #656 · knative-extensions/eventing-kafka · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Sep 2, 2024. It is now read-only.
This repository was 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

Description

@aliok

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.triage/acceptedIssues which should be fixed (post-triage)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0