ruromero / cloudevents-player

Cloudevents Player tool
Apache License 2.0
40 stars 15 forks source link

Enhance broker integration #68

Closed ruromero closed 1 year ago

ruromero commented 1 year ago

The BROKER_NAME and BROKER_NAMESPACE generates a BROKER_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.