camel-k icon indicating copy to clipboard operation
camel-k copied to clipboard

KameletBinding could not find a topic with a different `metadata.name` and `topicName`.

Open aboucham opened this issue 2 years ago • 0 comments

What happened?

Using kameletBinding for kafka as source for a specific kafka topic that has metadata.name different from topicName in the kafkaTopic CR. This end up with the following error:

0s Warning KameletError kameletbinding/azure-storage-blob-sink-binding Cannot reconcile KameletBinding azure-storage-blob-sink-binding: could not determine source URI: kafkatopics.kafka.strimzi.io "inventory_connector_postgresql.public.issue_version" not found

below the KafkaTopic CR:

apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaTopic
metadata:
  name: inventory-connector-postgresql.public.issue-version---ed5d63b44642a91911baebd9084114be4873981b
...
spec:
...
  topicName: inventory_connector_postgresql.public.issue_version
status:
...
  topicName: inventory_connector_postgresql.public.issue_version

Steps to reproduce

bin/kafka-topics.sh --bootstrap-server my-cluster-kafka-bootstrap:9092 --topic inventory_connector_postgresql.public.issue_version --create --partitions 3 --replication-factor 1

kind: KameletBinding
apiVersion: camel.apache.org/v1alpha1
metadata:
  name: my-topic-to-log
  namespace: camel
spec:
  source:
    ref:
      kind: KafkaTopic
      apiVersion: kafka.strimzi.io/v1beta1
      name: inventory_connector_postgresql.public.issue_version
  sink:
    ref:
      apiVersion: camel.apache.org/v1alpha1
      kind: Kamelet
      name: log-sink

Relevant log output

No response

Camel K version

1.10

aboucham avatar Sep 19 '23 13:09 aboucham