Skip to content

HTTP endpoint that will convert events from the Heptio Event Router into CNCF Cloud Events

License

Notifications You must be signed in to change notification settings

sjwoodman/openshift-cloud-event-source

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenShift Cloud Event Source

This application listens to an HTTP endpoint for events coming from the Heptio Event Router deployed on OpenShift. The Heptio events will be converted into CNCF CloudEvents and forwarded to an Apache Kafka topic.

This is an internal Proof of Concept and has a number of known issues with it. These will be fixed but the project is being shared to allow others to see/test it. Feedback, suggestions, reviews are welcomed!

Installation

Automated

Use the OCP Broker.

Manual

  1. Deploy Strimzi.

  2. Deploy the EnvironmentVariable Operator as this project uses it to inject the configuration from ConfigMaps

If you have the OCP Broker installed the Environment Variable Operator will be available from the Service Catalog. If not, follow the steps below.

$ git clone https://github.com/project-streamzi/EnvironmentVariableOperator.git
$ cd EnvironmentVariableOperator
$ oc login -u system:admin
$ oc adm policy add-cluster-role-to-user cluster-admin system:serviceaccount:myproject:default
$ oc login -u developer
$ mvn clean pacakge fabric8:deploy -Popenshift
  1. Deploy the heptio-event-source (this project). Optionally edit ./src/main/fabric8/heptop-source-cm.yml to set the Apache Kafka Topic that Cloud Events will be sent to.
$ oc login -u developer
$ mvn clean package fabric8:deploy
  1. Deploy the Heptio Event Router

The Event Router will be deployed to myproject. Edit the ./yaml/eventrouter.yaml to change this.

$ oc create -f ./yaml/eventrouter.yaml

If you need to remove the Router oc delete -f ./yaml/eventrouter.yaml.

Issues / Ideas

  1. Is there a schema for the Heptio events or the source of the events? Can this be used to turn them into something more meaningful for CloudEvents?

  2. The Heptio events might be better represented as Java Objects rather than a Map<String, Object>. However, with an unknown schema I couldn't get them to serialise nicely.

  3. There will be a better mapping from Heptio Event -> CloudEvent but this is a first pass. To be discussed / improved.

About

HTTP endpoint that will convert events from the Heptio Event Router into CNCF Cloud Events

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 98.2%
  • Dockerfile 1.8%