banzaicloud / koperator

Oh no! Yet another Apache Kafka operator for Kubernetes
Apache License 2.0
785 stars 196 forks source link

Envoy multi-zone deployment #487

Closed alungu closed 3 years ago

alungu commented 3 years ago

Is your feature request related to a problem? Please describe. The current ingress implementation has no guarantee that the ingress and the Kafka broker would be deployed in the same data center. While this might be good for availability, it is a cost vector in any public cloud infrastructure, since any inter-DC traffic is paid traffic, while the intra-DC traffic is, usually, free.

Describe the solution you'd like to see We'd like to have the option to deploy a DC aware ingress, with one deployment for each broker config group. The ingress deployment should honor the NodeAffinity and the NodeSelector configurations of the group, to ensure that both the ingress and the broker pods (from the same group) would be scheduled in the same data center.

The schema below describes the deployment using a data-center aware ingress (envoy) deployment. This is already implemented in our fork: https://github.com/adobe/kafka-operator/pull/15 We are running with this config for awhile now, but the implementation was updated recently to reflect the new ingress deployment updates (ingress config map is honoring the Cluster status instead of its spec).

Some notes regarding the implementation:

multi-zone-envoy-deployment

amuraru commented 3 years ago

@alungu Adi I suggest we share our implementation here as a PR and discuss it.