From 06953771be2ba67e10dd257ca3f4603f23777686 Mon Sep 17 00:00:00 2001 From: Samia Nneji Date: Wed, 7 Jul 2021 15:26:25 +0100 Subject: [PATCH] Relocate event source docs (#3948) * Update links * Update nav.yaml for event source move * fix another link * Move event source files to developer guide * Move event samples to samples folder * Move event samples to samples folder * link fixes and improvements * tweak some more links * Update redirects * Rebase redirects * fixing infinite redirect bug * Move creating event sources Co-authored-by: Omer B --- ...ven-image-bigquery-processing-pipelines.md | 2 +- .../announcing-knative-v0-3-release.html | 2 +- config/nav.yml | 55 +++-- config/redirects.yml | 31 ++- .../eventing/install-eventing-with-yaml.md | 36 +-- docs/{ => developer}/eventing/sources/OWNERS | 0 .../eventing/sources/README.md | 31 +-- .../sources/apache-camel-source/README.md | 0 .../sources/creating-event-sources/README.md | 0 .../writing-event-source-easy-way/Dockerfile | 0 .../writing-event-source-easy-way/README.md | 0 .../writing-event-source-easy-way/index.js | 0 .../package.json | 0 .../writing-event-source/01-theory.md | 0 .../02-lifecycle-and-types.md | 0 .../writing-event-source/03-controller.md | 0 .../writing-event-source/04-reconciler.md | 0 .../05-receive-adapter.md | 0 .../writing-event-source/06-yaml.md | 0 .../07-knative-sandbox.md | 0 .../writing-event-source/README.md | 0 .../simplified-controller.png | Bin .../eventing/sources/kafka-source/README.md | 0 .../sources/kafka-source/event-display.yaml | 0 .../sources/kafka-source/event-source.yaml | 0 .../sources/kafka-source/kafka-topic.yaml | 0 .../eventing/sources/ping-source/README.md | 0 .../ping-source/ping-source-binary.yaml | 0 .../sources/ping-source/ping-source.yaml | 0 .../eventing/sources/ping-source/service.yaml | 0 .../eventing/sources/sinkbinding/README.md | 0 .../sources/sinkbinding/getting-started.md | 0 .../eventing/sources/sinkbinding/reference.md | 0 docs/eventing/README.md | 8 +- docs/eventing/samples/README.md | 2 +- .../cloud-audit-logs-source/README.md | 0 .../cloud-pubsub-source/README.md | 0 .../cloud-scheduler-source/README.md | 0 .../cloud-storage-source/README.md | 0 .../container-source/README.md | 0 .../container-source/heartbeats-source.yaml | 0 .../container-source/service.yaml | 0 .../github-source/README.md | 0 .../github-source/github-source.yaml | 0 .../github-source/githubsecret.yaml | 0 .../github-source/personal_access_token.png | Bin .../github-source/service.yaml | 0 .../github-source/webhook_created.png | Bin .../gitlab-source/README.md | 0 .../sources/containersource/README.md | 224 ------------------ .../sources/containersource/reference.md | 149 ------------ .../getting-started-eventing.md | 2 +- 52 files changed, 76 insertions(+), 466 deletions(-) rename docs/{ => developer}/eventing/sources/OWNERS (100%) rename docs/{ => developer}/eventing/sources/README.md (67%) rename docs/{ => developer}/eventing/sources/apache-camel-source/README.md (100%) rename docs/{ => developer}/eventing/sources/creating-event-sources/README.md (100%) rename docs/{ => developer}/eventing/sources/creating-event-sources/writing-event-source-easy-way/Dockerfile (100%) rename docs/{ => developer}/eventing/sources/creating-event-sources/writing-event-source-easy-way/README.md (100%) rename docs/{ => developer}/eventing/sources/creating-event-sources/writing-event-source-easy-way/index.js (100%) rename docs/{ => developer}/eventing/sources/creating-event-sources/writing-event-source-easy-way/package.json (100%) rename docs/{ => developer}/eventing/sources/creating-event-sources/writing-event-source/01-theory.md (100%) rename docs/{ => developer}/eventing/sources/creating-event-sources/writing-event-source/02-lifecycle-and-types.md (100%) rename docs/{ => developer}/eventing/sources/creating-event-sources/writing-event-source/03-controller.md (100%) rename docs/{ => developer}/eventing/sources/creating-event-sources/writing-event-source/04-reconciler.md (100%) rename docs/{ => developer}/eventing/sources/creating-event-sources/writing-event-source/05-receive-adapter.md (100%) rename docs/{ => developer}/eventing/sources/creating-event-sources/writing-event-source/06-yaml.md (100%) rename docs/{ => developer}/eventing/sources/creating-event-sources/writing-event-source/07-knative-sandbox.md (100%) rename docs/{ => developer}/eventing/sources/creating-event-sources/writing-event-source/README.md (100%) rename docs/{ => developer}/eventing/sources/creating-event-sources/writing-event-source/simplified-controller.png (100%) rename docs/{ => developer}/eventing/sources/kafka-source/README.md (100%) rename docs/{ => developer}/eventing/sources/kafka-source/event-display.yaml (100%) rename docs/{ => developer}/eventing/sources/kafka-source/event-source.yaml (100%) rename docs/{ => developer}/eventing/sources/kafka-source/kafka-topic.yaml (100%) rename docs/{ => developer}/eventing/sources/ping-source/README.md (100%) rename docs/{ => developer}/eventing/sources/ping-source/ping-source-binary.yaml (100%) rename docs/{ => developer}/eventing/sources/ping-source/ping-source.yaml (100%) rename docs/{ => developer}/eventing/sources/ping-source/service.yaml (100%) rename docs/{ => developer}/eventing/sources/sinkbinding/README.md (100%) rename docs/{ => developer}/eventing/sources/sinkbinding/getting-started.md (100%) rename docs/{ => developer}/eventing/sources/sinkbinding/reference.md (100%) rename docs/eventing/{sources => samples}/cloud-audit-logs-source/README.md (100%) rename docs/eventing/{sources => samples}/cloud-pubsub-source/README.md (100%) rename docs/eventing/{sources => samples}/cloud-scheduler-source/README.md (100%) rename docs/eventing/{sources => samples}/cloud-storage-source/README.md (100%) rename docs/eventing/{sources => samples}/container-source/README.md (100%) rename docs/eventing/{sources => samples}/container-source/heartbeats-source.yaml (100%) rename docs/eventing/{sources => samples}/container-source/service.yaml (100%) rename docs/eventing/{sources => samples}/github-source/README.md (100%) rename docs/eventing/{sources => samples}/github-source/github-source.yaml (100%) rename docs/eventing/{sources => samples}/github-source/githubsecret.yaml (100%) rename docs/eventing/{sources => samples}/github-source/personal_access_token.png (100%) rename docs/eventing/{sources => samples}/github-source/service.yaml (100%) rename docs/eventing/{sources => samples}/github-source/webhook_created.png (100%) rename docs/eventing/{sources => samples}/gitlab-source/README.md (100%) delete mode 100644 docs/eventing/sources/containersource/README.md delete mode 100644 docs/eventing/sources/containersource/reference.md diff --git a/blog/articles/event-driven-image-bigquery-processing-pipelines.md b/blog/articles/event-driven-image-bigquery-processing-pipelines.md index 7f6596871..c994ebf42 100644 --- a/blog/articles/event-driven-image-bigquery-processing-pipelines.md +++ b/blog/articles/event-driven-image-bigquery-processing-pipelines.md @@ -20,7 +20,7 @@ instructions, as part of my [Knative Tutorial](https://github.com/meteatamel/kna When creating these example pipelines, I relied on a few Knative components that greatly simplified my development. More specifially: -1. [Event sources](https://knative.dev/docs/eventing/sources/) allow you to +1. [Event sources](https://knative.dev/docs/developer/eventing/sources/) allow you to read external events in your cluster. [Knative-GCP Sources](https://github.com/google/knative-gcp#knative-gcp-sources) provide a number of eventing sources ready to read events from various Google Cloud diff --git a/blog/releases/announcing-knative-v0-3-release.html b/blog/releases/announcing-knative-v0-3-release.html index 83b8a2fb6..ad6f57f0f 100644 --- a/blog/releases/announcing-knative-v0-3-release.html +++ b/blog/releases/announcing-knative-v0-3-release.html @@ -47,7 +47,7 @@ type: "blog"

A frequently-requested feature is the ability to deploy services which are not exposed externally and can only be accessed by other services in the cluster. In v0.3, Routes configured to use the `svc.cluster.local` domain will only be exposed to the cluster-local Istio gateway. The cluster-local gateway will keep the deployed service inaccessible from outside the cluster. Developers can also use the `serving.knative.dev/visibility=cluster-local` label on their Route or Service to enable this behaviour.

Knative is also deprecating its dedicated Istio gateway. In v0.3 release, Knative will still expose public routes to both the deprecated gateway and the default Istio gateway. Starting with next release however, Knative will remove the deprecated gateway to further reduce overhead and avoid the additional cost of public IP. (Note, you may have to update the gateway IP in your DNS mappings).

Eventing

-

With the inclusion of Eventing in the previous release, there has been a significant focus on extending the number of and documenting available external event sources which can be installed in Knative as Kubernetes Custom Resource Definitions (CRDs). The complete list of currently supported event sources can be found here.

+

With the inclusion of Eventing in the previous release, there has been a significant focus on extending the number of and documenting available external event sources which can be installed in Knative as Kubernetes Custom Resource Definitions (CRDs). The complete list of currently supported event sources can be found here.

Build

The Knative Build component can now support both single `source` and multiple input `sources`. If multiple sources are requested, each will be fetched in declared order and placed into a directory under `/workspace` named after the source’s name field. The Build controller is also now subject to the PodSecurityPolicy which enables cluster operators to specify further limitations.

Monitoring

diff --git a/config/nav.yml b/config/nav.yml index aa053749c..aa9734c01 100644 --- a/config/nav.yml +++ b/config/nav.yml @@ -72,13 +72,33 @@ nav: - Debugging application issues: developer/serving/troubleshooting/debugging-application-issues.md - Knative Eventing: - Event sources: + - Overview: developer/eventing/sources/README.md + - Creating an event source: + - Overview: developer/eventing/sources/creating-event-sources/README.md + - Writing an event source using Javascript: developer/eventing/sources/creating-event-sources/writing-event-source-easy-way/README.md + - Using the sample event source: + - Overview: developer/eventing/sources/creating-event-sources/writing-event-source/README.md + - Design of an Event Source: developer/eventing/sources/creating-event-sources/writing-event-source/01-theory.md + - Lifecycle and Types: developer/eventing/sources/creating-event-sources/writing-event-source/02-lifecycle-and-types.md + - Controller Implemetation: developer/eventing/sources/creating-event-sources/writing-event-source/03-controller.md + - Reconciler Implementation: developer/eventing/sources/creating-event-sources/writing-event-source/04-reconciler.md + - Receive Adapter Implementation: developer/eventing/sources/creating-event-sources/writing-event-source/05-receive-adapter.md + - Publishing to your cluster: developer/eventing/sources/creating-event-sources/writing-event-source/06-yaml.md + - Moving to knative-sandbox: developer/eventing/sources/creating-event-sources/writing-event-source/07-knative-sandbox.md - ApiServerSource: - Overview: developer/eventing/sources/apiserversource/README.md - Creating an ApiServerSource object: developer/eventing/sources/apiserversource/getting-started/README.md - ApiServerSource reference: developer/eventing/sources/apiserversource/reference.md + - Camel source: developer/eventing/sources/apache-camel-source/README.md - ContainerSource: - Creating a ContainerSource object: developer/eventing/sources/containersource/README.md - ContainerSource Reference: developer/eventing/sources/containersource/reference.md + - Kafka source: developer/eventing/sources/kafka-source/README.md + - PingSource: developer/eventing/sources/ping-source/README.md + - SinkBinding: + - Overview: developer/eventing/sources/sinkbinding/README.md + - Creating a SinkBinding object: developer/eventing/sources/sinkbinding/getting-started.md + - SinkBinding reference: developer/eventing/sources/sinkbinding/reference.md - Event delivery: developer/eventing/event-delivery.md - Event sinks: - About sinks: developer/eventing/sinks/README.md @@ -156,27 +176,6 @@ nav: - Knative Eventing: - Overview: eventing/README.md - Getting started: eventing/getting-started.md - - Event sources: - - Overview: eventing/sources/README.md - - PingSource: eventing/sources/ping-source/README.md - - SinkBinding: - - Overview: eventing/sources/sinkbinding/README.md - - Creating a SinkBinding object: eventing/sources/sinkbinding/getting-started.md - - SinkBinding reference: eventing/sources/sinkbinding/reference.md - - Camel source: eventing/sources/apache-camel-source/README.md - - Kafka source: eventing/sources/kafka-source/README.md - - Creating an event source: - - Overview: eventing/sources/creating-event-sources/README.md - - Writing an event source using Javascript: eventing/sources/creating-event-sources/writing-event-source-easy-way/README.md - - Using the sample event source: - - Overview: eventing/sources/creating-event-sources/writing-event-source/README.md - - Design of an Event Source: eventing/sources/creating-event-sources/writing-event-source/01-theory.md - - Lifecycle and Types: eventing/sources/creating-event-sources/writing-event-source/02-lifecycle-and-types.md - - Controller Implemetation: eventing/sources/creating-event-sources/writing-event-source/03-controller.md - - Reconciler Implementation: eventing/sources/creating-event-sources/writing-event-source/04-reconciler.md - - Receive Adapter Implementation: eventing/sources/creating-event-sources/writing-event-source/05-receive-adapter.md - - Publishing to your cluster: eventing/sources/creating-event-sources/writing-event-source/06-yaml.md - - Moving to knative-sandbox: eventing/sources/creating-event-sources/writing-event-source/07-knative-sandbox.md - Event registry: eventing/event-registry.md - Flows: - Overview: eventing/flows/README.md @@ -206,7 +205,7 @@ nav: - Experimental Features: eventing/experimental-features.md - Code samples: - Overview: eventing/samples/README.md - - Container source: eventing/sources/container-source/README.md + - Container source: eventing/samples/container-source/README.md - Hello World: - Overview: eventing/samples/helloworld/README.md - GO: eventing/samples/helloworld/helloworld-go/README.md @@ -219,12 +218,12 @@ nav: - Overview: eventing/samples/parallel/README.md - Multiple Cases: eventing/samples/parallel/multiple-branches/README.md - Mutual Exclusivity: eventing/samples/parallel/mutual-exclusivity/README.md - - CloudAuditLogsSource: eventing/sources/cloud-audit-logs-source/README.md - - CloudPubSubSource: eventing/sources/cloud-pubsub-source/README.md - - CloudSchedulerSource: eventing/sources/cloud-scheduler-source/README.md - - CloudStorageSource: eventing/sources/cloud-storage-source/README.md - - GitHub source: eventing/sources/github-source/README.md - - GitLab source: eventing/sources/gitlab-source/README.md + - CloudAuditLogsSource: eventing/samples/cloud-audit-logs-source/README.md + - CloudPubSubSource: eventing/samples/cloud-pubsub-source/README.md + - CloudSchedulerSource: eventing/samples/cloud-scheduler-source/README.md + - CloudStorageSource: eventing/samples/cloud-storage-source/README.md + - GitHub source: eventing/samples/github-source/README.md + - GitLab source: eventing/samples/gitlab-source/README.md - IoT core: eventing/samples/iot-core/README.md # Reference docs - Reference: diff --git a/config/redirects.yml b/config/redirects.yml index d6ee003a3..c9cd00d37 100644 --- a/config/redirects.yml +++ b/config/redirects.yml @@ -10,36 +10,35 @@ plugins: eventing/broker/alternate/index.md: eventing/broker/README.md eventing/broker/broker-event-delivery.md: developer/eventing/event-delivery.md eventing/broker/configmaps/README.md: admin/eventing/broker-configuration.md - eventing/broker/kafka-broker/index.md: eventing/broker/kafka-broker/README.md eventing/broker/kafka-broker/kafka-configmap.md: admin/eventing/kafka-channel-configuration.md eventing/channels/default-channels/index.md: eventing/channels/README.md eventing/event-delivery.md: developer/eventing/event-delivery.md eventing/metrics.md: admin/collecting-metrics/eventing-metrics/metrics.md eventing/parallel.md: eventing/flows/parallel.md - eventing/samples/apache-camel-source/index.md: eventing/sources/apache-camel-source/README.md - eventing/samples/gcp-pubsub-source/README.md: eventing/sources/cloud-pubsub-source/README.md - eventing/samples/kubernetes-event-source/index.md: developer/eventing/sources/apiserversource/getting-started/README.md - eventing/samples/ping-source/index.md: eventing/sources/ping-source/README.md + eventing/samples/apache-camel-source/index.md: developer/eventing/sources/apache-camel-source/README.md + eventing/samples/gcp-pubsub-source/README.md: eventing/samples/cloud-pubsub-source/README.md + eventing/samples/kubernetes-event-source/index.md: developer/eventing/sources/apiserversource/README.md + eventing/samples/ping-source/index.md: developer/eventing/sources/ping-source/README.md eventing/samples/sequence/index.md: eventing/flows/sequence/README.md eventing/samples/sequence/sequence-replay-to-event-display/index.md: eventing/flows/sequence/sequence-reply-to-event-display/README.md eventing/samples/sequence/sequence-reply-to-sequence/index.md: eventing/flows/sequence/sequence-reply-to-sequence/README.md eventing/samples/sequence/sequence-terminal/index.md: eventing/flows/sequence/sequence-terminal/README.md eventing/samples/sequence/sequence-with-broker-trigger/index.md: eventing/flows/sequence/sequence-with-broker-trigger/README.md - eventing/samples/sinkbinding/README.md: eventing/sources/sinkbinding/README.md - eventing/samples/writing-event-source-easy-way/index.md: eventing/sources/creating-event-sources/writing-event-source-easy-way/README.md - eventing/samples/writing-event-source/01-theory/index.md: eventing/sources/creating-event-sources/writing-event-source/01-theory.md - eventing/samples/writing-event-source/02-lifecycle-and-types/index.md: eventing/sources/creating-event-sources/writing-event-source/02-lifecycle-and-types.md - eventing/samples/writing-event-source/03-controller/index.md: eventing/sources/creating-event-sources/writing-event-source/03-controller.md - eventing/samples/writing-event-source/04-reconciler/index.md: eventing/sources/creating-event-sources/writing-event-source/04-reconciler.md - eventing/samples/writing-event-source/05-receive-adapter/index.md: eventing/sources/creating-event-sources/writing-event-source/05-receive-adapter.md - eventing/samples/writing-event-source/06-yaml/index.md: eventing/sources/creating-event-sources/writing-event-source/06-yaml.md - eventing/samples/writing-event-source/07-knative-sandbox/index.md: eventing/sources/creating-event-sources/writing-event-source/07-knative-sandbox.md - eventing/samples/writing-event-source/index.md: eventing/sources/creating-event-sources/writing-event-source/README.md + eventing/samples/sinkbinding/README.md: developer/eventing/sources/sinkbinding/README.md + eventing/samples/writing-event-source-easy-way/index.md: developer/eventing/sources/creating-event-sources/writing-event-source-easy-way/README.md + eventing/samples/writing-event-source/01-theory/index.md: developer/eventing/sources/creating-event-sources/writing-event-source/01-theory.md + eventing/samples/writing-event-source/02-lifecycle-and-types/index.md: developer/eventing/sources/creating-event-sources/writing-event-source/02-lifecycle-and-types.md + eventing/samples/writing-event-source/03-controller/index.md: developer/eventing/sources/creating-event-sources/writing-event-source/03-controller.md + eventing/samples/writing-event-source/04-reconciler/index.md: developer/eventing/sources/creating-event-sources/writing-event-source/04-reconciler.md + eventing/samples/writing-event-source/05-receive-adapter/index.md: developer/eventing/sources/creating-event-sources/writing-event-source/05-receive-adapter.md + eventing/samples/writing-event-source/06-yaml/index.md: developer/eventing/sources/creating-event-sources/writing-event-source/06-yaml.md + eventing/samples/writing-event-source/07-knative-sandbox/index.md: developer/eventing/sources/creating-event-sources/writing-event-source/07-knative-sandbox.md + eventing/samples/writing-event-source/index.md: developer/eventing/sources/creating-event-sources/writing-event-source/README.md eventing/sequence.md: eventing/flows/sequence/README.md eventing/sink/README.md: developer/eventing/sinks/README.md eventing/sink/kafka-sink.md: developer/eventing/sinks/kafka-sink.md eventing/sources/apiserversource/index.md: developer/eventing/sources/apiserversource/README.md - eventing/sources/pingsource/index.md: eventing/sources/ping-source/README.md + eventing/sources/pingsource/index.md: developer/eventing/sources/ping-source/README.md eventing/sources/containersource.md: developer/eventing/sources/containersource/README.md eventing/triggers/index.md: eventing/broker/triggers/README.md help/README.md: help/contributor/README.md diff --git a/docs/admin/install/eventing/install-eventing-with-yaml.md b/docs/admin/install/eventing/install-eventing-with-yaml.md index b59b3a185..d108875da 100644 --- a/docs/admin/install/eventing/install-eventing-with-yaml.md +++ b/docs/admin/install/eventing/install-eventing-with-yaml.md @@ -42,7 +42,7 @@ Follow the procedure for the channel of your choice: === "Apache Kafka Channel" 1. First, - [Install Apache Kafka for Kubernetes](../../../../eventing/samples/kafka) + [Install Apache Kafka for Kubernetes](../../../eventing/samples/kafka/README.md) 1. Then install the Apache Kafka Channel: @@ -53,8 +53,7 @@ Follow the procedure for the channel of your choice: ``` !!! tip - To learn more about the Apache Kafka channel, try - [our sample](../../../../eventing/samples/kafka/channel/) + To learn more, try the [Apache Kafka channel sample](../../../eventing/samples/kafka/channel/README.md). === "Google Cloud Pub/Sub Channel" @@ -66,8 +65,7 @@ Follow the procedure for the channel of your choice: ``` !!! tip - To learn more about the Google Cloud Pub/Sub channel, try - [our sample](https://github.com/google/knative-gcp/blob/master/docs/examples/channel/README.md) + To learn more, try the [Google Cloud Pub/Sub channel sample](https://github.com/google/knative-gcp/blob/master/docs/examples/channel/README.md). === "In-Memory (standalone)" @@ -115,7 +113,7 @@ Follow the procedure for the broker of your choice: kubectl apply -f {{ artifact(org="knative-sandbox",repo="eventing-kafka-broker",file="eventing-kafka-broker.yaml")}} ``` - For more information, see the [Kafka broker](../../../../eventing/broker/kafka-broker/) documentation. + For more information, see the [Kafka broker](../../../eventing/broker/kafka-broker/README.md) documentation. === "MT-Channel-based" @@ -260,8 +258,7 @@ The tabs below expand to show instructions for installing each Eventing extensio GitHub sources in the cluster. This source does not support logging or tracing configuration yet. - To learn more about the Github source, try - [our sample](../../../../eventing/sources/github-source/) + To learn more, try the [Github source sample](../../../eventing/samples/github-source/README.md) === "Apache Kafka Source" @@ -271,8 +268,7 @@ The tabs below expand to show instructions for installing each Eventing extensio kubectl apply -f {{ artifact(org="knative-sandbox",repo="eventing-kafka",file="source.yaml")}} ``` - To learn more about the Apache Kafka source, try - [our sample](../../../../eventing/sources/kafka-source) + To learn more, try the [Apache Kafka source sample](../../../developer/eventing/sources/kafka-source/README.md). === "GCP Sources" @@ -284,17 +280,12 @@ The tabs below expand to show instructions for installing each Eventing extensio kubectl apply -f {{ artifact(org="google",repo="knative-gcp",file="cloud-run-events.yaml")}} ``` - To learn more about the Cloud Pub/Sub source, try - [our sample](../../../../eventing/sources/cloud-pubsub-source). + To learn more, try the following: - To learn more about the Cloud Storage source, try - [our sample](../../../../eventing/sources/cloud-storage-source). - - To learn more about the Cloud Scheduler source, try - [our sample](../../../../eventing/sources/cloud-scheduler-source). - - To learn more about the Cloud Audit Logs source, try - [our sample](../../../../eventing/sources/cloud-audit-logs-source). + - [Cloud Pub/Sub source sample](../../../eventing/samples/cloud-pubsub-source/README.md) + - [Cloud Storage source sample](../../../eventing/samples/cloud-storage-source/README.md) + - [Cloud Scheduler source sample](../../../eventing/samples/cloud-scheduler-source/README.md) + - [Cloud Audit Logs source sample](../../../eventing/samples/cloud-audit-logs-source/README.md) === "Apache CouchDB Source" @@ -305,7 +296,7 @@ The tabs below expand to show instructions for installing each Eventing extensio kubectl apply -f {{ artifact(org="knative-sandbox",repo="eventing-couchdb",file="couchdb.yaml")}} ``` - To learn more about the Apache CouchDB source, read the [documentation](https://github.com/knative-sandbox/eventing-couchdb/blob/main/source/README.md). + To learn more, read the [Apache CouchDB source](https://github.com/knative-sandbox/eventing-couchdb/blob/main/source/README.md) documentation. === "VMware Sources and Bindings" @@ -315,5 +306,4 @@ The tabs below expand to show instructions for installing each Eventing extensio kubectl apply -f {{ artifact(org="vmware-tanzu",repo="sources-for-knative",file="release.yaml")}} ``` - To learn more about the VMware sources and bindings, try - [our samples](https://github.com/vmware-tanzu/sources-for-knative/tree/master/samples/README.md). + To learn more, try the [VMware sources and bindings samples](https://github.com/vmware-tanzu/sources-for-knative/tree/master/samples/README.md). diff --git a/docs/eventing/sources/OWNERS b/docs/developer/eventing/sources/OWNERS similarity index 100% rename from docs/eventing/sources/OWNERS rename to docs/developer/eventing/sources/OWNERS diff --git a/docs/eventing/sources/README.md b/docs/developer/eventing/sources/README.md similarity index 67% rename from docs/eventing/sources/README.md rename to docs/developer/eventing/sources/README.md index 49ec1f28e..56b4ce5aa 100644 --- a/docs/eventing/sources/README.md +++ b/docs/developer/eventing/sources/README.md @@ -28,27 +28,22 @@ All Sources are part of the `sources` category. kubectl get sources ``` - - - - - ## Knative Sources | Name | API Version | Maintainer | Description | | -- | -- | -- | -- | -| [APIServerSource](./apiserversource) | v1 | Knative | Brings Kubernetes API server events into Knative. The APIServerSource fires a new event each time a Kubernetes resource is created, updated or deleted. | +| [APIServerSource](./apiserversource/README.md) | v1 | Knative | Brings Kubernetes API server events into Knative. The APIServerSource fires a new event each time a Kubernetes resource is created, updated or deleted. | | [AWS SQS](https://github.com/knative-sandbox/eventing-awssqs/tree/main/samples) | v1alpha1 | Knative | Brings [AWS Simple Queue Service](https://aws.amazon.com/sqs/) messages into Knative. The AwsSqsSource fires a new event each time an event is published on an [AWS SQS topic](https://aws.amazon.com/sqs/). | -| [Apache Camel](./apache-camel-source) | N/A | Apache Software Foundation | Enables use of [Apache Camel](https://github.com/apache/camel) components for pushing events into Knative. Camel sources are now provided via [Kamelets](https://camel.apache.org/camel-kamelets/latest/) as part of the [Apache Camel K](https://camel.apache.org/camel-k/latest/installation/installation.html) project. | +| [Apache Camel](./apache-camel-source/README.md) | N/A | Apache Software Foundation | Enables use of [Apache Camel](https://github.com/apache/camel) components for pushing events into Knative. Camel sources are now provided via [Kamelets](https://camel.apache.org/camel-kamelets/latest/) as part of the [Apache Camel K](https://camel.apache.org/camel-k/latest/installation/installation.html) project. | | [Apache CouchDB](https://github.com/knative-sandbox/eventing-couchdb/blob/main/source) | v1alpha1 | Knative | Brings [Apache CouchDB](https://couchdb.apache.org/) messages into Knative. | -| [Apache Kafka](../samples/kafka) | v1beta1 | Knative | Brings [Apache Kafka](https://kafka.apache.org/) messages into Knative. The KafkaSource reads events from an Apache Kafka Cluster, and passes these events to a sink so that they can be consumed. See the [Kafka Source](https://github.com/knative-sandbox/eventing-kafka/blob/main/pkg/source) example for more details. | -| [Container Source](./containersource/README.md) | v1 | Knative | The ContainerSource will instantiate container image(s) that can generate events until the ContainerSource is deleted. This may be used, for example, to poll an FTP server for new files or generate events at a set time interval. Given a `spec.template` with at least a container image specified, ContainerSource will keep a `Pod` running with the specified image(s). `K_SINK` (destination address) and `KE_CE_OVERRIDES` (JSON CloudEvents attributes) environment variables are injected into the running image(s). It is used by multiple other Sources as underlying infrastructure. Refer to the [Container Source](./container-source) example for more details. | -| [GitHub](./github-source) | v1alpha1 | Knative | Registers for events of the specified types on the specified GitHub organization or repository, and brings those events into Knative. The GitHubSource fires a new event for selected [GitHub event types](https://developer.github.com/v3/activity/events/types/). See the [GitHub Source](./github-source) example for more details. | -| [GitLab](./gitlab-source) | v1alpha1 | Knative | Registers for events of the specified types on the specified GitLab repository, and brings those events into Knative. The GitLabSource creates a webhooks for specified [event types](https://docs.gitlab.com/ee/user/project/integrations/webhooks.html#events), listens for incoming events, and passes them to a consumer. See the [GitLab Source](./gitlab-source) example for more details. | +| [Apache Kafka](../../../eventing/samples/kafka/README.md) | v1beta1 | Knative | Brings [Apache Kafka](https://kafka.apache.org/) messages into Knative. The KafkaSource reads events from an Apache Kafka Cluster, and passes these events to a sink so that they can be consumed. See the [Kafka Source](https://github.com/knative-sandbox/eventing-kafka/blob/main/pkg/source) example for more details. | +| [ContainerSource](./containersource/README.md) | v1 | Knative | The ContainerSource will instantiate container image(s) that can generate events until the ContainerSource is deleted. This may be used, for example, to poll an FTP server for new files or generate events at a set time interval. Given a `spec.template` with at least a container image specified, ContainerSource will keep a `Pod` running with the specified image(s). `K_SINK` (destination address) and `KE_CE_OVERRIDES` (JSON CloudEvents attributes) environment variables are injected into the running image(s). It is used by multiple other Sources as underlying infrastructure. Refer to the [Container Source](../../../eventing/samples/container-source/README.md) example for more details. | +| [GitHub](../../../eventing/samples/github-source/README.md) | v1alpha1 | Knative | Registers for events of the specified types on the specified GitHub organization or repository, and brings those events into Knative. The GitHubSource fires a new event for selected [GitHub event types](https://developer.github.com/v3/activity/events/types/). See the [GitHub Source](../../../eventing/samples/github-source/README.md) example for more details. | +| [GitLab](../../../eventing/samples/gitlab-source/README.md) | v1alpha1 | Knative | Registers for events of the specified types on the specified GitLab repository, and brings those events into Knative. The GitLabSource creates a webhooks for specified [event types](https://docs.gitlab.com/ee/user/project/integrations/webhooks.html#events), listens for incoming events, and passes them to a consumer. See the [GitLab Source](../../../eventing/samples/gitlab-source/README.md) example for more details. | | [Heartbeats](https://github.com/knative/eventing/tree/main/cmd/heartbeats) | N/A | Knative | Uses an in-memory timer to produce events at the specified interval. | -| [PingSource](./ping-source) | v1beta2 | Knative | Produces events with a fixed payload on a specified [Cron](https://en.wikipedia.org/wiki/Cron) schedule. See the [Ping Source](./ping-source) example for more details. | +| [PingSource](./ping-source/README.md) | v1beta2 | Knative | Produces events with a fixed payload on a specified [Cron](https://en.wikipedia.org/wiki/Cron) schedule. See the [Ping Source](./ping-source/README.md) example for more details. | | [RabbitMQ](https://github.com/knative-sandbox/eventing-rabbitmq) | Active development | None | Brings [RabbitMQ](https://www.rabbitmq.com/) messages into Knative. -| [SinkBinding](./sinkbinding/) | v1 | Knative | The SinkBinding can be used to author new event sources using any of the familiar compute abstractions that Kubernetes makes available (e.g. Deployment, Job, DaemonSet, StatefulSet), or Knative abstractions (e.g. Service, Configuration). SinkBinding provides a framework for injecting `K_SINK` (destination address) and `K_CE_OVERRIDES` (JSON cloudevents attributes) environment variables into any Kubernetes resource which has a `spec.template` that looks like a Pod (aka PodSpecable). See the [SinkBinding](./container-source) example for more details. | +| [SinkBinding](./sinkbinding/README.md) | v1 | Knative | The SinkBinding can be used to author new event sources using any of the familiar compute abstractions that Kubernetes makes available (e.g. Deployment, Job, DaemonSet, StatefulSet), or Knative abstractions (e.g. Service, Configuration). SinkBinding provides a framework for injecting `K_SINK` (destination address) and `K_CE_OVERRIDES` (JSON cloudevents attributes) environment variables into any Kubernetes resource which has a `spec.template` that looks like a Pod (aka PodSpecable). See the [SinkBinding](./sinkbinding/README.md) example for more details. | | [WebSocket](https://github.com/knative/eventing/tree/main/cmd/websocketsource) | N/A | Knative | Opens a WebSocket to the specified source and packages each received message as a Knative event. | ## Third-Party Sources @@ -66,10 +61,10 @@ All Sources are part of the `sources` category. [Amazon SNS](https://github.com/triggermesh/aws-event-sources/tree/master/cmd/awssnssource/README.md) | Supported | TriggerMesh | Subscribes to messages from an [Amazon SNS](https://aws.amazon.com/sns/) topic. [Amazon SQS](https://github.com/triggermesh/aws-event-sources/tree/master/cmd/awssqssource/README.md) | Supported | TriggerMesh | Consumes messages from an [Amazon SQS](https://aws.amazon.com/sqs/) queue. [BitBucket](https://github.com/nachocano/bitbucket-source) | Proof of Concept | None | Registers for events of the specified types on the specified BitBucket organization/repository. Brings those events into Knative. -[CloudAuditLogsSource](https://github.com/google/knative-gcp/blob/main/docs/examples/cloudauditlogssource/README.md) | v1 | Google | Registers for events of the specified types on the specified [Google Cloud Audit Logs](https://cloud.google.com/logging/docs/audit/). Brings those events into Knative. Refer to the [CloudAuditLogsSource](./cloud-audit-logs-source) example for more details. -[CloudPubSubSource](https://github.com/google/knative-gcp/blob/main/docs/examples/cloudpubsubsource/README.md) | v1 | Google | Brings [Cloud Pub/Sub](https://cloud.google.com/pubsub/) messages into Knative. The CloudPubSubSource fires a new event each time a message is published on a [Google Cloud Platform PubSub topic](https://cloud.google.com/pubsub/). See the [CloudPubSubSource](./cloud-pubsub-source) example for more details. -[CloudSchedulerSource](https://github.com/google/knative-gcp/blob/main/docs/examples/cloudschedulersource/README.md) | v1 | Google | Create, update, and delete [Google Cloud Scheduler](https://cloud.google.com/scheduler/) Jobs. When those jobs are triggered, receive the event inside Knative. See the [CloudSchedulerSource](./cloud-scheduler-source) example for further details. -[CloudStorageSource](https://github.com/google/knative-gcp/blob/main/docs/examples/cloudstoragesource/README.md) | v1 | Google | Registers for events of the specified types on the specified [Google Cloud Storage](https://cloud.google.com/storage/) bucket and optional object prefix. Brings those events into Knative. See the [CloudStorageSource](./cloud-storage-source) example. +[CloudAuditLogsSource](https://github.com/google/knative-gcp/blob/main/docs/examples/cloudauditlogssource/README.md) | v1 | Google | Registers for events of the specified types on the specified [Google Cloud Audit Logs](https://cloud.google.com/logging/docs/audit/). Brings those events into Knative. Refer to the [CloudAuditLogsSource](../../../eventing/samples/cloud-audit-logs-source/README.md) example for more details. +[CloudPubSubSource](https://github.com/google/knative-gcp/blob/main/docs/examples/cloudpubsubsource/README.md) | v1 | Google | Brings [Cloud Pub/Sub](https://cloud.google.com/pubsub/) messages into Knative. The CloudPubSubSource fires a new event each time a message is published on a [Google Cloud Platform PubSub topic](https://cloud.google.com/pubsub/). See the [CloudPubSubSource](../../../eventing/samples/cloud-pubsub-source/README.md) example for more details. +[CloudSchedulerSource](https://github.com/google/knative-gcp/blob/main/docs/examples/cloudschedulersource/README.md) | v1 | Google | Create, update, and delete [Google Cloud Scheduler](https://cloud.google.com/scheduler/) Jobs. When those jobs are triggered, receive the event inside Knative. See the [CloudSchedulerSource](../../../eventing/samples/cloud-scheduler-source/README.md) example for further details. +[CloudStorageSource](https://github.com/google/knative-gcp/blob/main/docs/examples/cloudstoragesource/README.md) | v1 | Google | Registers for events of the specified types on the specified [Google Cloud Storage](https://cloud.google.com/storage/) bucket and optional object prefix. Brings those events into Knative. See the [CloudStorageSource](../../../eventing/samples/cloud-storage-source/README.md) example. [DockerHubSource](https://github.com/tom24d/eventing-dockerhub) | v1alpha1 | None | Retrieves events from [Docker Hub Webhooks](https://docs.docker.com/docker-hub/webhooks/) and transforms them into CloudEvents for consumption in Knative. [FTP / SFTP](https://github.com/vaikas-google/ftp) | Proof of concept | None | Watches for files being uploaded into a FTP/SFTP and generates events for those. [GitHub Issue Comments](https://github.com/BrianMMcClain/github-issue-comment-source)| Proof of Concept | None | Polls a specific GitHub issue for new comments. @@ -83,6 +78,6 @@ All Sources are part of the `sources` category. ## Additional resources -- For information about creating your own Source type, see the [tutorial on writing a Source with a Receive Adapter](./creating-event-sources/writing-event-source). +- For information about creating your own Source type, see the [tutorial on writing a Source with a Receive Adapter](./creating-event-sources/writing-event-source/README.md). - If your code needs to send events as part of its business logic and doesn't fit the model of a Source, consider [feeding events directly to a Broker](https://knative.dev/docs/eventing/broker/). - For more information about using `kn` Source related commands, see the [`kn source` reference documentation](https://github.com/knative/client/blob/main/docs/cmd/kn_source.md). diff --git a/docs/eventing/sources/apache-camel-source/README.md b/docs/developer/eventing/sources/apache-camel-source/README.md similarity index 100% rename from docs/eventing/sources/apache-camel-source/README.md rename to docs/developer/eventing/sources/apache-camel-source/README.md diff --git a/docs/eventing/sources/creating-event-sources/README.md b/docs/developer/eventing/sources/creating-event-sources/README.md similarity index 100% rename from docs/eventing/sources/creating-event-sources/README.md rename to docs/developer/eventing/sources/creating-event-sources/README.md diff --git a/docs/eventing/sources/creating-event-sources/writing-event-source-easy-way/Dockerfile b/docs/developer/eventing/sources/creating-event-sources/writing-event-source-easy-way/Dockerfile similarity index 100% rename from docs/eventing/sources/creating-event-sources/writing-event-source-easy-way/Dockerfile rename to docs/developer/eventing/sources/creating-event-sources/writing-event-source-easy-way/Dockerfile diff --git a/docs/eventing/sources/creating-event-sources/writing-event-source-easy-way/README.md b/docs/developer/eventing/sources/creating-event-sources/writing-event-source-easy-way/README.md similarity index 100% rename from docs/eventing/sources/creating-event-sources/writing-event-source-easy-way/README.md rename to docs/developer/eventing/sources/creating-event-sources/writing-event-source-easy-way/README.md diff --git a/docs/eventing/sources/creating-event-sources/writing-event-source-easy-way/index.js b/docs/developer/eventing/sources/creating-event-sources/writing-event-source-easy-way/index.js similarity index 100% rename from docs/eventing/sources/creating-event-sources/writing-event-source-easy-way/index.js rename to docs/developer/eventing/sources/creating-event-sources/writing-event-source-easy-way/index.js diff --git a/docs/eventing/sources/creating-event-sources/writing-event-source-easy-way/package.json b/docs/developer/eventing/sources/creating-event-sources/writing-event-source-easy-way/package.json similarity index 100% rename from docs/eventing/sources/creating-event-sources/writing-event-source-easy-way/package.json rename to docs/developer/eventing/sources/creating-event-sources/writing-event-source-easy-way/package.json diff --git a/docs/eventing/sources/creating-event-sources/writing-event-source/01-theory.md b/docs/developer/eventing/sources/creating-event-sources/writing-event-source/01-theory.md similarity index 100% rename from docs/eventing/sources/creating-event-sources/writing-event-source/01-theory.md rename to docs/developer/eventing/sources/creating-event-sources/writing-event-source/01-theory.md diff --git a/docs/eventing/sources/creating-event-sources/writing-event-source/02-lifecycle-and-types.md b/docs/developer/eventing/sources/creating-event-sources/writing-event-source/02-lifecycle-and-types.md similarity index 100% rename from docs/eventing/sources/creating-event-sources/writing-event-source/02-lifecycle-and-types.md rename to docs/developer/eventing/sources/creating-event-sources/writing-event-source/02-lifecycle-and-types.md diff --git a/docs/eventing/sources/creating-event-sources/writing-event-source/03-controller.md b/docs/developer/eventing/sources/creating-event-sources/writing-event-source/03-controller.md similarity index 100% rename from docs/eventing/sources/creating-event-sources/writing-event-source/03-controller.md rename to docs/developer/eventing/sources/creating-event-sources/writing-event-source/03-controller.md diff --git a/docs/eventing/sources/creating-event-sources/writing-event-source/04-reconciler.md b/docs/developer/eventing/sources/creating-event-sources/writing-event-source/04-reconciler.md similarity index 100% rename from docs/eventing/sources/creating-event-sources/writing-event-source/04-reconciler.md rename to docs/developer/eventing/sources/creating-event-sources/writing-event-source/04-reconciler.md diff --git a/docs/eventing/sources/creating-event-sources/writing-event-source/05-receive-adapter.md b/docs/developer/eventing/sources/creating-event-sources/writing-event-source/05-receive-adapter.md similarity index 100% rename from docs/eventing/sources/creating-event-sources/writing-event-source/05-receive-adapter.md rename to docs/developer/eventing/sources/creating-event-sources/writing-event-source/05-receive-adapter.md diff --git a/docs/eventing/sources/creating-event-sources/writing-event-source/06-yaml.md b/docs/developer/eventing/sources/creating-event-sources/writing-event-source/06-yaml.md similarity index 100% rename from docs/eventing/sources/creating-event-sources/writing-event-source/06-yaml.md rename to docs/developer/eventing/sources/creating-event-sources/writing-event-source/06-yaml.md diff --git a/docs/eventing/sources/creating-event-sources/writing-event-source/07-knative-sandbox.md b/docs/developer/eventing/sources/creating-event-sources/writing-event-source/07-knative-sandbox.md similarity index 100% rename from docs/eventing/sources/creating-event-sources/writing-event-source/07-knative-sandbox.md rename to docs/developer/eventing/sources/creating-event-sources/writing-event-source/07-knative-sandbox.md diff --git a/docs/eventing/sources/creating-event-sources/writing-event-source/README.md b/docs/developer/eventing/sources/creating-event-sources/writing-event-source/README.md similarity index 100% rename from docs/eventing/sources/creating-event-sources/writing-event-source/README.md rename to docs/developer/eventing/sources/creating-event-sources/writing-event-source/README.md diff --git a/docs/eventing/sources/creating-event-sources/writing-event-source/simplified-controller.png b/docs/developer/eventing/sources/creating-event-sources/writing-event-source/simplified-controller.png similarity index 100% rename from docs/eventing/sources/creating-event-sources/writing-event-source/simplified-controller.png rename to docs/developer/eventing/sources/creating-event-sources/writing-event-source/simplified-controller.png diff --git a/docs/eventing/sources/kafka-source/README.md b/docs/developer/eventing/sources/kafka-source/README.md similarity index 100% rename from docs/eventing/sources/kafka-source/README.md rename to docs/developer/eventing/sources/kafka-source/README.md diff --git a/docs/eventing/sources/kafka-source/event-display.yaml b/docs/developer/eventing/sources/kafka-source/event-display.yaml similarity index 100% rename from docs/eventing/sources/kafka-source/event-display.yaml rename to docs/developer/eventing/sources/kafka-source/event-display.yaml diff --git a/docs/eventing/sources/kafka-source/event-source.yaml b/docs/developer/eventing/sources/kafka-source/event-source.yaml similarity index 100% rename from docs/eventing/sources/kafka-source/event-source.yaml rename to docs/developer/eventing/sources/kafka-source/event-source.yaml diff --git a/docs/eventing/sources/kafka-source/kafka-topic.yaml b/docs/developer/eventing/sources/kafka-source/kafka-topic.yaml similarity index 100% rename from docs/eventing/sources/kafka-source/kafka-topic.yaml rename to docs/developer/eventing/sources/kafka-source/kafka-topic.yaml diff --git a/docs/eventing/sources/ping-source/README.md b/docs/developer/eventing/sources/ping-source/README.md similarity index 100% rename from docs/eventing/sources/ping-source/README.md rename to docs/developer/eventing/sources/ping-source/README.md diff --git a/docs/eventing/sources/ping-source/ping-source-binary.yaml b/docs/developer/eventing/sources/ping-source/ping-source-binary.yaml similarity index 100% rename from docs/eventing/sources/ping-source/ping-source-binary.yaml rename to docs/developer/eventing/sources/ping-source/ping-source-binary.yaml diff --git a/docs/eventing/sources/ping-source/ping-source.yaml b/docs/developer/eventing/sources/ping-source/ping-source.yaml similarity index 100% rename from docs/eventing/sources/ping-source/ping-source.yaml rename to docs/developer/eventing/sources/ping-source/ping-source.yaml diff --git a/docs/eventing/sources/ping-source/service.yaml b/docs/developer/eventing/sources/ping-source/service.yaml similarity index 100% rename from docs/eventing/sources/ping-source/service.yaml rename to docs/developer/eventing/sources/ping-source/service.yaml diff --git a/docs/eventing/sources/sinkbinding/README.md b/docs/developer/eventing/sources/sinkbinding/README.md similarity index 100% rename from docs/eventing/sources/sinkbinding/README.md rename to docs/developer/eventing/sources/sinkbinding/README.md diff --git a/docs/eventing/sources/sinkbinding/getting-started.md b/docs/developer/eventing/sources/sinkbinding/getting-started.md similarity index 100% rename from docs/eventing/sources/sinkbinding/getting-started.md rename to docs/developer/eventing/sources/sinkbinding/getting-started.md diff --git a/docs/eventing/sources/sinkbinding/reference.md b/docs/developer/eventing/sources/sinkbinding/reference.md similarity index 100% rename from docs/eventing/sources/sinkbinding/reference.md rename to docs/developer/eventing/sources/sinkbinding/reference.md diff --git a/docs/eventing/README.md b/docs/eventing/README.md index ab2396c14..37c133a8d 100644 --- a/docs/eventing/README.md +++ b/docs/eventing/README.md @@ -1,8 +1,8 @@ # Knative Eventing -Knative Eventing enables developers to use an [event-driven architecture](https://en.wikipedia.org/wiki/Event-driven_architecture) with serverless applications. An event-driven architecture is based on the concept of decoupled relationships between event producers that create events, and event consumers, or [_sinks_](../../developer/eventing/sinks), that receive events. +Knative Eventing enables developers to use an [event-driven architecture](https://en.wikipedia.org/wiki/Event-driven_architecture) with serverless applications. An event-driven architecture is based on the concept of decoupled relationships between event producers that create events, and event consumers, or [_sinks_](../developer/eventing/sinks/README.md), that receive events. -In a Knative Eventing deployment, event [Sources](../../eventing/sources) are the primary event producers, however you can also configure a sink or _subscriber_ to respond to HTTP requests by sending a response event. Examples of sinks in a Knative Eventing deployment include Knative Services, Channels and Brokers. +In a Knative Eventing deployment, event [Sources](../developer/eventing/sources/README.md) are the primary event producers, however you can also configure a sink or _subscriber_ to respond to HTTP requests by sending a response event. Examples of sinks in a Knative Eventing deployment include Knative Services, Channels and Brokers. Knative Eventing uses standard HTTP POST requests to send and receive events between event producers and sinks. These events conform to the [CloudEvents specifications](https://cloudevents.io/), which enables creating, parsing, sending, and receiving events in any programming language. @@ -18,7 +18,7 @@ Consume an event without creating a publisher : You can use a trigger to consume events from a broker based on event attributes. The application receives events as an HTTP POST. !!! tip - Multiple event producers and sinks can be used together to create more advanced [Knative Eventing flows](../../eventing/flows/) to solve complex use cases. + Multiple event producers and sinks can be used together to create more advanced [Knative Eventing flows](./flows/README.md) to solve complex use cases. @@ -43,4 +43,4 @@ the registry contain (all) the required information for a consumer to create a Trigger without resorting to some other out-of-band mechanism. To learn how to use the registry, see the -[Event Registry documentation](../../eventing/event-registry). +[Event Registry documentation](./event-registry.md). diff --git a/docs/eventing/samples/README.md b/docs/eventing/samples/README.md index 2b2d7c9b1..c495f0576 100644 --- a/docs/eventing/samples/README.md +++ b/docs/eventing/samples/README.md @@ -10,6 +10,6 @@ showlandingtoc: "true" Use the following code samples to help you understand the various use cases for Knative Eventing and Event Sources. -[Learn more about Knative Eventing and Eventing Sources](../). +[Learn more about Knative Eventing and Eventing Sources](../README.md). [**See all Knative code samples**](../../samples.md) diff --git a/docs/eventing/sources/cloud-audit-logs-source/README.md b/docs/eventing/samples/cloud-audit-logs-source/README.md similarity index 100% rename from docs/eventing/sources/cloud-audit-logs-source/README.md rename to docs/eventing/samples/cloud-audit-logs-source/README.md diff --git a/docs/eventing/sources/cloud-pubsub-source/README.md b/docs/eventing/samples/cloud-pubsub-source/README.md similarity index 100% rename from docs/eventing/sources/cloud-pubsub-source/README.md rename to docs/eventing/samples/cloud-pubsub-source/README.md diff --git a/docs/eventing/sources/cloud-scheduler-source/README.md b/docs/eventing/samples/cloud-scheduler-source/README.md similarity index 100% rename from docs/eventing/sources/cloud-scheduler-source/README.md rename to docs/eventing/samples/cloud-scheduler-source/README.md diff --git a/docs/eventing/sources/cloud-storage-source/README.md b/docs/eventing/samples/cloud-storage-source/README.md similarity index 100% rename from docs/eventing/sources/cloud-storage-source/README.md rename to docs/eventing/samples/cloud-storage-source/README.md diff --git a/docs/eventing/sources/container-source/README.md b/docs/eventing/samples/container-source/README.md similarity index 100% rename from docs/eventing/sources/container-source/README.md rename to docs/eventing/samples/container-source/README.md diff --git a/docs/eventing/sources/container-source/heartbeats-source.yaml b/docs/eventing/samples/container-source/heartbeats-source.yaml similarity index 100% rename from docs/eventing/sources/container-source/heartbeats-source.yaml rename to docs/eventing/samples/container-source/heartbeats-source.yaml diff --git a/docs/eventing/sources/container-source/service.yaml b/docs/eventing/samples/container-source/service.yaml similarity index 100% rename from docs/eventing/sources/container-source/service.yaml rename to docs/eventing/samples/container-source/service.yaml diff --git a/docs/eventing/sources/github-source/README.md b/docs/eventing/samples/github-source/README.md similarity index 100% rename from docs/eventing/sources/github-source/README.md rename to docs/eventing/samples/github-source/README.md diff --git a/docs/eventing/sources/github-source/github-source.yaml b/docs/eventing/samples/github-source/github-source.yaml similarity index 100% rename from docs/eventing/sources/github-source/github-source.yaml rename to docs/eventing/samples/github-source/github-source.yaml diff --git a/docs/eventing/sources/github-source/githubsecret.yaml b/docs/eventing/samples/github-source/githubsecret.yaml similarity index 100% rename from docs/eventing/sources/github-source/githubsecret.yaml rename to docs/eventing/samples/github-source/githubsecret.yaml diff --git a/docs/eventing/sources/github-source/personal_access_token.png b/docs/eventing/samples/github-source/personal_access_token.png similarity index 100% rename from docs/eventing/sources/github-source/personal_access_token.png rename to docs/eventing/samples/github-source/personal_access_token.png diff --git a/docs/eventing/sources/github-source/service.yaml b/docs/eventing/samples/github-source/service.yaml similarity index 100% rename from docs/eventing/sources/github-source/service.yaml rename to docs/eventing/samples/github-source/service.yaml diff --git a/docs/eventing/sources/github-source/webhook_created.png b/docs/eventing/samples/github-source/webhook_created.png similarity index 100% rename from docs/eventing/sources/github-source/webhook_created.png rename to docs/eventing/samples/github-source/webhook_created.png diff --git a/docs/eventing/sources/gitlab-source/README.md b/docs/eventing/samples/gitlab-source/README.md similarity index 100% rename from docs/eventing/sources/gitlab-source/README.md rename to docs/eventing/samples/gitlab-source/README.md diff --git a/docs/eventing/sources/containersource/README.md b/docs/eventing/sources/containersource/README.md deleted file mode 100644 index 8769a595b..000000000 --- a/docs/eventing/sources/containersource/README.md +++ /dev/null @@ -1,224 +0,0 @@ -# Creating a ContainerSource object - -![API version v1](https://img.shields.io/badge/API_Version-v1-red?style=flat-square) - -This topic describes how to configure ContainerSource as an event source for -functions. - -The ContainerSource object starts a container image that generates events and -sends messages to a sink URI. You can also use ContainerSource to support your -own event sources in Knative. - -In the examples below, the event source is a heartbeats container and the sink -is a Knative Service. -If you have an existing event source and sink, you can replace the examples with -your own values. - -## Before you begin - -Before you can create a ContainerSource object: - -- You must have [Knative Eventing](../../../admin/install/install-eventing-with-yaml) -installed on your cluster. -- If you want to use the example heartbeats event source below, you must also: - - Install [ko](https://github.com/google/ko) - - Set `KO_DOCKER_REPO`. For example, `gcr.io/[gcloud-project]` or `docker.io/` - - Authenticate with your `KO_DOCKER_REPO` - - Install [`docker`](https://docs.docker.com/install/) - -## Create a ContainerSource object - -1. Build an image of your event source and publish it to your image repository. -Your image must read the environment variable `K_SINK` and post messages to the -URL specified in `K_SINK`. If you do not already have an image, you can use -the following example heartbeats event source by running the commands: - - ```bash - git clone -b "{{ branch }}" https://github.com/knative/eventing.git - ``` - - ```bash - ko publish ko://knative.dev/eventing/cmd/heartbeats - ``` - -1. Create a namespace for your ContainerSource by running the command: - - ```bash - kubectl create namespace - ``` - - Where `` is the namespace that you want your ContainerSource to use. - For example, `containersource-example`. - -1. Create a sink. If you do not already have a sink, you can use the following Knative -Service, which dumps incoming messages into its log, by running the command: - - !!! note - To create a Knative service you must have Knative Serving installed on your cluster. - - === "kn" - - ```bash - kn service create event-display --port 8080 --image gcr.io/knative-releases/knative.dev/eventing/cmd/event_display - ``` - - === "YAML" - - ```yaml - kubectl -n containersource-example apply -f - < --image --sink - ``` - Where: - - - `` is the name you want for your ContainerSource object, - for example, `test-heartbeats`. - - `` corresponds to the image URI you built and published - in step 1, for example, `gcr.io/[gcloud-project]/knative.dev/eventing/cmd/heartbeats`. - - `` is the name of your sink, for example ``. - - For a list of available options, see the [Knative client documentation](https://github.com/knative/client/blob/main/docs/cmd/kn_source_container_create.md#kn-source-container-create). - - === "YAML" - - ```yaml - kubectl -n apply -f - < - spec: - template: - spec: - containers: - - image: - name: - env: - - name: POD_NAME - value: "" - - name: POD_NAMESPACE - value: "" - sink: - ref: - apiVersion: v1 - kind: Service - name: - EOF - ``` - Where: - - - `` is the namespace you created for your ContainerSource, - for example, `containersource-example`. - - `` is the name you want for your ContainerSource, - for example, `test-heartbeats`. - - `` corresponds to the image URI you built and published - in step 1, for example, `gcr.io/[gcloud-project]/knative.dev/eventing/cmd/heartbeats`. - - `` is the name of your event source, for example, `heartbeats`. - - `` is the name of the Pod that the container runs in, for example, `mypod`. - - `` is the namespace that the Pod runs in, for example, `event-test`. - - `` is the name of your sink, for example, `event-display`. - - For more information about the fields you can configure for the ContainerSource - object, see [ContainerSource Reference](reference.md). - - !!! note - Arguments and environment variables are set and are passed to the container. - -## Verify the ContainerSource object - -1. View the logs for your event consumer by running the command: - - ```shell - kubectl -n logs -l --tail=200 - ``` - Where: - - - `` is the namespace that contains the ContainerSource object. - - `` is the name of the Pod that the container runs in. - - For example: - - ```shell - $ kubectl -n containersource-example logs -l app=event-display --tail=200 - ``` - -1. Verify that the output returns the properties of the events that your -ContainerSource sent to your sink. -In the example below, the command has returned the `Attributes` and `Data` properties -of the events that the ContainerSource sent to the `event-display` Service: - - ``` - ☁️ cloudevents.Event - Validation: valid - Context Attributes, - specversion: 1.0 - type: dev.knative.eventing.samples.heartbeat - source: https://knative.dev/eventing/cmd/heartbeats/#event-test/mypod - id: 2b72d7bf-c38f-4a98-a433-608fbcdd2596 - time: 2019-10-18T15:23:20.809775386Z - contenttype: application/json - Extensions, - beats: true - heart: yes - the: 42 - Data, - { - "id": 2, - "label": "" - } - ``` - -## Cleanup - -To delete the ContainerSource object and all of the related resources in the -namespace: - -- Delete the namespace by running the command: - - ```shell - kubectl delete namespace - ``` - - Where `` is the namespace that contains the ContainerSource object. - -## Reference Documentation - -See the [ContainerSource specification](../../../reference/api/eventing/eventing/#sources.knative.dev/v1.ContainerSource). diff --git a/docs/eventing/sources/containersource/reference.md b/docs/eventing/sources/containersource/reference.md deleted file mode 100644 index 23a8c5d5a..000000000 --- a/docs/eventing/sources/containersource/reference.md +++ /dev/null @@ -1,149 +0,0 @@ -# ContainerSource reference - -This topic provides reference information about the configurable fields for the -ContainerSource object. - - -## ContainerSource - -A ContainerSource definition supports the following fields: - -| Field | Description | Required or optional | -|-------|-------------|----------------------| -| [`apiVersion`][kubernetes-overview] | Specifies the API version, for example `sources.knative.dev/v1`. | Required | -| [`kind`][kubernetes-overview] | Identifies this resource object as a ContainerSource object. | Required | -| [`metadata`][kubernetes-overview] | Specifies metadata that uniquely identifies the ContainerSource object. For example, a `name`. | Required | -| [`spec`][kubernetes-overview] | Specifies the configuration information for this ContainerSource object. | Required | -| [`spec.sink`](#sink-parameter) | A reference to an object that resolves to a URI to use as the sink. | Required | -| [`spec.template`](#template-parameter) | A `template` in the shape of `Deployment.spec.template` to be used for this ContainerSource. | Required | -| [`spec.ceOverrides`](#cloudevent-overrides) | Defines overrides to control the output format and modifications to the event sent to the sink. | Optional | - - -### Sink parameter - -The `sink` parameter is a reference to an object that resolves to a URI to use as the sink. - -A `sink` definition supports the following fields: - -| Field | Description | Required or optional | -|-------|-------------|----------------------| -| `ref` | This points to an Addressable. | Required if _not_ using `uri` | -| `ref.apiVersion` | API version of the referent. | Required if using `ref` | -| [`ref.kind`][kubernetes-kinds] | Kind of the referent. | Required if using `ref` | -| [`ref.name`][kubernetes-names] | Name of the referent. | Required if using `ref` | -| [`ref.namespace`][kubernetes-namespaces] | Namespace of the referent. If omitted this defaults to the object holding it. | Optional | -| `uri` | This can be an absolute URL with a non-empty scheme and non-empty host that points to the target or a relative URI. Relative URIs are resolved using the base URI retrieved from Ref. | Required if _not_ using `ref` | - -!!! note - At least one of `ref` or `uri` is required. If both are specified, `uri` is - resolved into the URL from the Addressable `ref` result. - -#### Example: sink parameter - -Given the following YAML, if `ref` resolves into -`"http://mysink.default.svc.cluster.local"`, then `uri` is added to this -resulting in `"http://mysink.default.svc.cluster.local/extra/path"`. - - - -```yaml -apiVersion: sources.knative.dev/v1 -kind: ContainerSource -metadata: - name: test-heartbeats -spec: - ... - sink: - ref: - apiVersion: v1 - kind: Service - namespace: default - name: mysink - uri: /extra/path -``` - -!!! contract - This results in the `K_SINK` environment variable being set as - `"http://mysink.default.svc.cluster.local/extra/path"`. - - -### Template parameter - -This is a `template` in the shape of `Deployment.spec.template` to use for the ContainerSource. -For more information, see the [Kubernetes Documentation](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/). - - - -#### Example: template parameter - -```yaml -apiVersion: sources.knative.dev/v1 -kind: ContainerSource -metadata: - name: test-heartbeats -spec: - template: - spec: - containers: - - image: gcr.io/[gcloud-project]/knative.dev/eventing/cmd/heartbeats - name: heartbeats - args: - - --period=1 - env: - - name: POD_NAME - value: "mypod" - - name: POD_NAMESPACE - value: "event-test" - ... -``` - - -### CloudEvent Overrides - -CloudEvent Overrides defines overrides to control the output format and -modifications of the event sent to the sink. - -A `ceOverrides` definition supports the following fields: - -| Field | Description | Required or optional | -|-------|-------------|----------------------| -| `extensions` | Specifies which attributes are added or overridden on the outbound event. Each `extensions` key-value pair is set independently on the event as an attribute extension. | Optional | - -!!! note - Only valid [CloudEvent attribute names][cloudevents-attribute-naming] - are allowed as extensions. You cannot set the spec defined attributes from - the extensions override configuration. For example, you can not modify the - `type` attribute. - -#### Example: CloudEvent Overrides - -```yaml -apiVersion: sources.knative.dev/v1 -kind: ContainerSource -metadata: - name: test-heartbeats -spec: - ... - ceOverrides: - extensions: - extra: this is an extra attribute - additional: 42 -``` - -!!! contract - This results in the `K_CE_OVERRIDES` environment variable being set on the - `subject` as follows: - ```{ .json .no-copy } - { "extensions": { "extra": "this is an extra attribute", "additional": "42" } } - ``` - -[kubernetes-overview]: - https://kubernetes.io/docs/concepts/overview/working-with-objects/kubernetes-objects/#required-fields -[kubernetes-kinds]: - https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds -[kubernetes-names]: - https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names -[kubernetes-namespaces]: - https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ -[cloudevents-attribute-naming]: - https://github.com/cloudevents/spec/blob/v1.0.1/spec.md#attribute-naming-convention diff --git a/docs/getting-started/getting-started-eventing.md b/docs/getting-started/getting-started-eventing.md index 83c0a77f8..7fae62286 100644 --- a/docs/getting-started/getting-started-eventing.md +++ b/docs/getting-started/getting-started-eventing.md @@ -10,7 +10,7 @@ With Knative Serving, we have a powerful tool which can take our containerized c ==**Knative Eventing acts as the "glue" between the disparate parts of your architecture**== and allows you to easily communicate between those parts in a fault-tolerant way. Some examples include: -:material-file-document: [Creating and responding to Kubernetes API events](../../eventing/sources/apiserversource/){target=blank} +:material-file-document: [Creating and responding to Kubernetes API events](../developer/eventing/sources/apiserversource/README.md){target=blank} --8<-- "YouTube_icon.svg" [Creating an image processing pipeline](https://www.youtube.com/watch?v=DrmOpjAunlQ){target=blank}