{"id":19541597,"url":"https://github.com/brigadecore/brigade-cloudevents-gateway","last_synced_at":"2025-08-14T07:46:34.894Z","repository":{"id":37786772,"uuid":"392432941","full_name":"brigadecore/brigade-cloudevents-gateway","owner":"brigadecore","description":"A Brigade 2 compatible gateway for CloudEvents 1.0","archived":false,"fork":false,"pushed_at":"2024-03-06T20:12:33.000Z","size":218,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-26T17:46:48.723Z","etag":null,"topics":["brigade","brigade-gateway","v2"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brigadecore.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-03T19:31:16.000Z","updated_at":"2024-07-10T15:28:48.000Z","dependencies_parsed_at":"2024-06-19T09:56:26.695Z","dependency_job_id":"57d9153c-47c1-4409-9621-4251ebca09c5","html_url":"https://github.com/brigadecore/brigade-cloudevents-gateway","commit_stats":{"total_commits":78,"total_committers":2,"mean_commits":39.0,"dds":"0.012820512820512775","last_synced_commit":"30f226ffc62a5c635a6b0270f8359a8f9493bdad"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/brigadecore/brigade-cloudevents-gateway","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brigadecore%2Fbrigade-cloudevents-gateway","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brigadecore%2Fbrigade-cloudevents-gateway/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brigadecore%2Fbrigade-cloudevents-gateway/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brigadecore%2Fbrigade-cloudevents-gateway/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brigadecore","download_url":"https://codeload.github.com/brigadecore/brigade-cloudevents-gateway/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brigadecore%2Fbrigade-cloudevents-gateway/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270385323,"owners_count":24574544,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-14T02:00:10.309Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["brigade","brigade-gateway","v2"],"created_at":"2024-11-11T03:11:12.694Z","updated_at":"2025-08-14T07:46:34.840Z","avatar_url":"https://github.com/brigadecore.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Brigade CloudEvents Gateway\n\n![build](https://badgr.brigade2.io/v1/github/checks/brigadecore/brigade-cloudevents-gateway/badge.svg?appID=99005)\n[![codecov](https://codecov.io/gh/brigadecore/brigade-cloudevents-gateway/branch/main/graph/badge.svg?token=PM7LG36RGY)](https://codecov.io/gh/brigadecore/brigade-cloudevents-gateway)\n[![Go Report Card](https://goreportcard.com/badge/github.com/brigadecore/brigade-cloudevents-gateway)](https://goreportcard.com/report/github.com/brigadecore/brigade-cloudevents-gateway)\n[![slack](https://img.shields.io/badge/slack-brigade-brightgreen.svg?logo=slack)](https://kubernetes.slack.com/messages/C87MF1RFD)\n\n\u003cimg width=\"100\" align=\"left\" src=\"logo.png\"\u003e\n\nThe Brigade CloudEvents Gateway receives webhooks from any\n[CloudEvents 1.0](https://cloudevents.io/) event producer and emits them into\nBrigade's event bus.\n\n\u003cbr clear=\"left\"/\u003e\n\nAfter [installation](docs/INSTALLATION.md), follow the documentation for any\nCloudEvents 1.0 event producer to send CloudEvents to this gateway. Do not\nforget to utilize one of the bearer tokens you created during the installation\nprocess for authentication.\n\nSubscribe any number of Brigade\n[projects](https://docs.brigade.sh/topics/project-developers/projects/)\nto the events emitted by this component -- all of which have a value of\n`brigade.sh/cloudevents` in their `source` field and a value of `cloudevent` in\ntheir `type` field.\n\n\u003e ⚠️\u0026nbsp;\u0026nbsp;Because CloudEvents and Brigade events both utilize `source` and\n\u003e `type` fields, this gateway adds the values of the CloudEvent's original\n\u003e `source` and `type` fields to the native Brigade event as\n\u003e [qualifiers](https://docs.brigade.sh/topics/project-developers/events/#qualifiers)\n\u003e with the keys `source` and `type`, respectively. The original CloudEvent, in\n\u003e its entirety, is added to the the native Brigade event's `payload` field.\n\nIn the example project definition below, we subscribe to events from this\ngateway (identified by `source: brigade.sh/cloudevents` and `type: cloudevent`)\nthat originated from an \"upstream\" CloudEvent producer that labeled its events\nwith source `example/uri` and type `example.type`:\n\n```yaml\napiVersion: brigade.sh/v2\nkind: Project\nmetadata:\n  id: cloudevents-demo\ndescription: A project that demonstrates integration with CloudEvents\nspec:\n  eventSubscriptions:\n  - source: brigade.sh/cloudevents\n    types:\n    - cloudevent\n    qualifiers:\n      source: example/uri\n      type: example.type\n  workerTemplate:\n    defaultConfigFiles:\n      brigade.js: |-\n        const { events } = require(\"@brigadecore/brigadier\");\n\n        events.on(\"brigade.sh/cloudevents\", \"cloudevent\", () =\u003e {\n          console.log(\"Received an event from the brigade.sh/cloudevents gateway!\");\n        });\n\n        events.process();\n```\n\nAssuming this file were named `project.yaml`, you can create the project like\nso:\n\n```shell\n$ brig project create --file project.yaml\n```\n\n## Try it Out\n\nYou can use the following `curl` command to send a simulated CloudEvent to the\ngateway. This event is subscribed to by the example project in the previous\nsection.\n\n```shell\n$ curl -i -k -X POST \\\n    -H \"ce-specversion: 1.0\" \\\n    -H \"ce-id: 1234-1234-1234\" \\\n    -H \"ce-source: example/uri\" \\\n    -H \"ce-type: example.type\" \\\n    -H \"Authorization: Bearer \u003ca token from ~/brigade-cloudevents-gateway-values.yaml\u003e\" \\\n    https://\u003cpublic IP or host name here\u003e/events\n```\n\n\u003e ⚠️\u0026nbsp;\u0026nbsp;Note that the CloudEvent we simulated above utilizes\n\u003e [binary content mode](~/brigade-cloudevents-gateway-values.yaml). In this\n\u003e mode, all the CloudEvent metadata is included in HTTP request headers, making\n\u003e this the most convenient sort of CloudEvent to simulate using `curl` as a\n\u003e client. The gateway _also_ supports the more common\n\u003e [structured content mode](https://github.com/cloudevents/spec/blob/v1.0/http-protocol-binding.md#32-structured-content-mode)\n\u003e wherein CloudEvent metadata is found within the payload itself.\n\nIf the gateway accepts the request, output will look like this:\n\n```shell\nHTTP/1.1 200 OK\nDate: Tue, 03 Aug 2021 19:13:37 GMT\nContent-Length: 0\n```\n\nTo confirm that the gateway emitted a corresponding Brigade event into Brigade's\nevent bus, list the events for the `cloudevents-demo` project:\n\n```shell\n$ brig event list --project cloudevents-demo\n```\n\nIf this all works out, you should be equally successful wiring CloudEvents from\nany CloudEvents 1.0 producer into your Brigade instance.\n\nFull coverage of `brig` commands is beyond the scope of this documentation, but\nat this point, additional `brig` commands can be applied to monitor the event's\nstatus and view logs produced in the course of handling the event.\n\n## Contributing\n\nThe Brigade project accepts contributions via GitHub pull requests. The\n[Contributing](CONTRIBUTING.md) document outlines the process to help get your\ncontribution accepted.\n\n## Support \u0026 Feedback\n\nWe have a slack channel!\n[Kubernetes/#brigade](https://kubernetes.slack.com/messages/C87MF1RFD) Feel free\nto join for any support questions or feedback, we are happy to help. To report\nan issue or to request a feature open an issue\n[here](https://github.com/brigadecore/brigade-cloudevents-gateway/issues)\n\n## Code of Conduct\n\nParticipation in the Brigade project is governed by the\n[CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrigadecore%2Fbrigade-cloudevents-gateway","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrigadecore%2Fbrigade-cloudevents-gateway","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrigadecore%2Fbrigade-cloudevents-gateway/lists"}