Hi, Community! Guys, I have a question related knative-eventing multi-tenancy. It is said that eventing component supports multi-tenancy, but it's not easy to understand how to proper use it in multi-tenant env.
I've searched through slack and found few discussions and this document
https://github.com/lionelvillard/eventing/blob/0620b6f0e55d722c31c2663d260a520bdbca8f5d/docs/multitenancy.mdI'm looking at kn-eventing: kn broker/channelr+kafka. Kafka does not supprt multi-tenancy, and they achieve multi-tenancy using multi-tenant clusters of kafka.
We are looking at kafka as to message bus with delivery guarantees only (not interested in kafka as storage and stream processing framework).
Goal: have multi-tenant eventing with delivery guarantees
Multi-tenancy definition in this context: functions/services of different tenants can exchange messages, physically can not exchange messages with other tenants functions.
My current understanding is to have setup like this:
knative-eventing k8s NS (shared):
- kn components (serving, eventing)
- kn kafka-components (kafka controller, broker-dispatcher, broker-receiver)
kafka k8s NS (shared):
tenant-X k8s NS (per-tenant):
- brokers
- kafka-channels
- functions
Questions:
1) Is it possible to have single kafka cluster for all tenants?
My concerns here is how channels are mapped to kafka, are there possibility of name conflicts etc?
2) I'm wondering if it is possible to have shared kafka broker and achieve multi-tenancy on cloudevents level (source and type properties)?
From
antoineco and
slinkydeveloper answers:
> broker maps to kafka topic
So this means that broker is tenant specific and we should create many brokers in a specific k8s NS
> You can use the extension partitionkey to set up the key of the kafka record, doing that you'll enable parallelism and ordering of your messages
this means that it is possible to use shared (between tenants) brokers and use different triggers for routing, right?
k8s NS gives us separation of different tenants entities.
Please point me to discusstions/examples/docs if there are any existing or let's discuss the topic here.
Thank you.