The BROKER_NAME and BROKER_NAMESPACE generates a BROKER_URIhttp://broker-ingress.knative-eventing.svc.cluster.local/<namespace>/<name> but this only works for the InMemoryChannel-Broker.
The Kafka broker uses the kafka-broker-ingress service making this configuration option unusable.
Besides, during deployment it requires an extra step to fetch the BROKER_URI from the broker and set it to the deployment.
For that reason it would be good to leverage the SinkBinding custom resource for such integration. The SinkBinding injects a K_SINK environment variable with the broker endpoint to the deployment. That solution will also allow to simplify the Knative Service definition by removing all the environment variables.
The
BROKER_NAME
andBROKER_NAMESPACE
generates aBROKER_URI
http://broker-ingress.knative-eventing.svc.cluster.local/<namespace>/<name>
but this only works for the InMemoryChannel-Broker.The Kafka broker uses the
kafka-broker-ingress
service making this configuration option unusable.Besides, during deployment it requires an extra step to fetch the
BROKER_URI
from the broker and set it to the deployment.For that reason it would be good to leverage the SinkBinding custom resource for such integration. The SinkBinding injects a
K_SINK
environment variable with the broker endpoint to the deployment. That solution will also allow to simplify the Knative Service definition by removing all the environment variables.