vmware-archive / kafka-trigger

Kubernetes CRD controller for Kafka topic as event source for Kubeless functions
Apache License 2.0
28 stars 34 forks source link

kafka-trigger-controller #4

Closed gkarthiks closed 5 years ago

gkarthiks commented 6 years ago

Is this a BUG REPORT or FEATURE REQUEST?: More of a question

I am trying to deploy kubeless in two places.

  1. Inside the kubeless dedicated namespace.
  2. Inside custom namespace.

I have done the following changes for the custom deployment. Added the below env variable in kafka-trigger-controller

name: KAFKA_BROKERS
value: kafka.mynamespace:9092

this below change in kafka sts

        - name: KAFKA_ZOOKEEPER_CONNECT
          value: zookeeper.mynamespace:2181
        - name: KAFKA_ADVERTISED_HOST_NAME
          value: broker.mynamespace

But what's happening is, the kafka-trigger-controller in mynamespace is also listing what's happening in the kubeless namespace. Sorry to say this. But apparently there's not enough documentation for this kind of use case (multiple kubeless in different namespaces).

Anything else I need to add on to it?

Environment:

schumacher-m commented 5 years ago

@gkarthiks We are recently facing the same scenario: We want to use a staging and production environment and wanted to use the functions-namespace option. Deploying a kafka-trigger-controller into each environment.

I was hoping that it would also scope Kafka triggers to its namespace but we noticed that functions from different namespaces got called if they listen to the same topic name (yet different kafka cluster and also different namespace)

Did you solved this or did you changed your approach? I'd be very interested what you've done. I decided to scope the topic names on the kafka clusters to be unique eg. "production-X" and "staging-X".