knative-extensions / eventing-ceph

Converts Ceph notifications to Cloud Events for use with Knative Eventing.
Apache License 2.0
5 stars 27 forks source link

Knative Eventing Ceph Source

These components are BETA

go.dev reference Go Report Card Releases LICENSE Slack Status

The Knative Eventing Ceph project provides source implementation that registers events for Ceph storage notifications.

For complete documentation about Knative Eventing, see the following repos:

If you are interested in contributing, see CONTRIBUTING.md and DEVELOPMENT.md.

Ceph Source Custom Resource

The Ceph source converts bucket notifications from Ceph format into CloudEvents format, and inject them into Knative. Conversion logic follow the one described for AWS S3 bucket notifications. The Ceph source expects HTTP transport, and requires a port on whitch it is listening as part of its configurations.

Note that the receive adapter doing the conversion does not assume the CloudEvents HTTP binding in the incoming messages.

Deployment

To build and deploy on a kubernetes cluster (after knative is installed) run:

ko apply -f config

Testing

kubectl apply -f samples/ceph-source-svc.yaml
ko apply -f samples/event-display.yaml
kubectl apply -f samples/ceph-source.yaml
kubectl apply -f samples/test-pod.yaml
kubectl exec test -- curl -d "@records.json" -X POST my-ceph-source-svc.default.svc.cluster.local
kubectl logs -l serving.knative.dev/service=event-display -c display-container --tail=100