eventing-ceph

module
v0.41.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2024 License: Apache-2.0

README

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

  • Deploy a service for the bucket notification messages coming from Ceph:
kubectl apply -f samples/ceph-source-svc.yaml
  • Deploy the event-display Knative service:
ko apply -f samples/event-display.yaml
  • Deploy the Ceph Source resource:
kubectl apply -f samples/ceph-source.yaml
  • Deploy a test pod that has cURL installed and a JSON file with bucket notifications (names records.json):
kubectl apply -f samples/test-pod.yaml
  • Execute cURL command on the test pod to send the JSON bucket notifications to the ceph-bucket-notifications service:
kubectl exec test -- curl -d "@records.json" -X POST my-ceph-source-svc.default.svc.cluster.local
  • To verify that the events reached the event-display service, call:
kubectl logs -l serving.knative.dev/service=event-display -c display-container --tail=100

Directories

Path Synopsis
cmd
pkg
apis/sources/v1alpha1
+k8s:deepcopy-gen=package +groupName=sources.knative.dev
+k8s:deepcopy-gen=package +groupName=sources.knative.dev
client/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
client/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
client/clientset/versioned/typed/sources/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
client/clientset/versioned/typed/sources/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL