mirror of https://github.com/knative/docs.git
Cleaning up event source docs (#2714)
* Cleaning up event source docs * fix typo, fix links * updated doc title and link * added kn source * updates from SME reviews * fix alpha > beta missed in rebase * updated main page link to better starting example for eventing (getting started instead of samples) * review feedback
This commit is contained in:
parent
9c4a13f040
commit
0cb5dc846a
|
@ -13,7 +13,7 @@ focus on solving mundane but difficult tasks such as:
|
|||
- [Deploying a container](./serving/getting-started-knative-app.md)
|
||||
- [Routing and managing traffic with blue/green deployment](./serving/samples/blue-green-deployment.md)
|
||||
- [Scaling automatically and sizing workloads based on demand](./serving/autoscaling)
|
||||
- [Binding running services to eventing ecosystems](./eventing/samples/kubernetes-event-source/)
|
||||
- [Binding running services to eventing ecosystems](./eventing/getting-started.md)
|
||||
|
||||
Developers on Knative can use familiar idioms, languages, and frameworks to
|
||||
deploy functions, applications, or containers workloads.
|
||||
|
|
|
@ -65,6 +65,10 @@ generic interfaces that can be implemented by multiple Kubernetes resources:
|
|||
returned events may be further processed in the same way that events from an
|
||||
external event source are processed.
|
||||
|
||||
### Event sources
|
||||
|
||||
To learn about using event sources, see the [event sources](./sources/README.md) documentation.
|
||||
|
||||
### Event brokers and triggers
|
||||
|
||||
Broker and Trigger objects make it easy to filter events based on event
|
||||
|
@ -146,141 +150,6 @@ Learn more about Eventing development in the
|
|||
|
||||
[Follow the instructions to install on the platform of your choice](../install/README.md).
|
||||
|
||||
## Sources
|
||||
|
||||
<!-- TODO(evankanderson): move this to just sources/ ? -->
|
||||
|
||||
Each source is a separate Kubernetes custom resource. This allows each type of
|
||||
Source to define the arguments and parameters needed to instantiate a source.
|
||||
All Sources should be part of the `sources` category, so you can list all existing Sources with
|
||||
`kubectl get sources`.
|
||||
|
||||
In addition to the sources explained below, there are
|
||||
[other sources](./sources/README.md) that you can install.
|
||||
If you need a Source not covered by the ones mentioned below nor by the other
|
||||
[available implementations](./sources/README.md), there is a
|
||||
[tutorial on writing a Source with a Receive Adapter](./samples/writing-event-source).
|
||||
|
||||
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/).
|
||||
|
||||
### Core Sources
|
||||
|
||||
These are the core sources that come out-of-the-box when installing Knative Eventing.
|
||||
|
||||
#### APIServerSource
|
||||
|
||||
The APIServerSource fires a new event each time a Kubernetes resource is created, updated or deleted.
|
||||
|
||||
See the [Kubernetes API Server Source](samples/kubernetes-event-source) example for more details.
|
||||
|
||||
#### PingSource
|
||||
|
||||
The PingSource fires events based on given
|
||||
[Cron](https://en.wikipedia.org/wiki/Cron) schedule.
|
||||
|
||||
See the [Ping Source](samples/ping-source) example for more details.
|
||||
|
||||
#### ContainerSource
|
||||
|
||||
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.
|
||||
|
||||
Refer to the [Container Source](samples/container-source) example for more details.
|
||||
|
||||
#### SinkBinding
|
||||
|
||||
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).
|
||||
|
||||
See the [SinkBinding](samples/container-source) example for more details.
|
||||
|
||||
### Eventing Contrib Sources
|
||||
|
||||
This is a non-exhaustive list of Sources supported by our community and maintained
|
||||
in the [Knative Eventing-Contrib](https://github.com/knative/eventing-contrib) Github repo.
|
||||
|
||||
#### GitHubSource
|
||||
|
||||
The GitHubSource fires a new event for selected
|
||||
[GitHub event types](https://developer.github.com/v3/activity/events/types/).
|
||||
|
||||
See the [GitHub Source](samples/github-source) example for more details.
|
||||
|
||||
#### GitLabSource
|
||||
|
||||
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](samples/gitlab-source) example for more details.
|
||||
|
||||
#### AwsSqsSource
|
||||
|
||||
The AwsSqsSource fires a new event each time an event is published on an
|
||||
[AWS SQS topic](https://aws.amazon.com/sqs/).
|
||||
|
||||
#### KafkaSource
|
||||
|
||||
The KafkaSource reads events from an Apache Kafka Cluster, and passes these to a
|
||||
Knative Serving application so that they can be consumed.
|
||||
|
||||
See the
|
||||
[Kafka Source](https://github.com/knative/eventing-contrib/tree/master/kafka/source)
|
||||
example for more details.
|
||||
|
||||
#### CamelSource
|
||||
|
||||
A CamelSource is an event source that can represent any existing
|
||||
[Apache Camel component](https://github.com/apache/camel/tree/master/components)
|
||||
that provides a consumer side, and enables publishing events to an addressable
|
||||
endpoint. Each Camel endpoint has the form of a URI where the scheme is the ID
|
||||
of the component to use.
|
||||
|
||||
CamelSource requires [Camel-K](https://github.com/apache/camel-k#installation)
|
||||
to be installed into the current namespace. See the
|
||||
[CamelSource](https://github.com/knative/eventing-contrib/tree/master/camel/source/samples)
|
||||
example.
|
||||
|
||||
### Google Cloud Sources
|
||||
|
||||
In order to consume events from different GCP services, [Knative-GCP](https://github.com/google/knative-gcp) supports
|
||||
different GCP Sources.
|
||||
|
||||
#### CloudPubSubSource
|
||||
|
||||
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](samples/cloud-pubsub-source) example for more details.
|
||||
|
||||
#### CloudStorageSource
|
||||
|
||||
Registers for events of specific 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](samples/cloud-storage-source) example.
|
||||
|
||||
#### CloudSchedulerSource
|
||||
|
||||
Creates, updates, and deletes [Google Cloud Scheduler](https://cloud.google.com/scheduler/) Jobs.
|
||||
When those jobs are triggered, receive the event inside Knative.
|
||||
|
||||
See the [CloudSchedulerSource](samples/cloud-scheduler-source) example for further details.
|
||||
|
||||
#### CloudAuditLogsSource
|
||||
|
||||
Registers for events of specific types on the specified [Google Cloud Audit Logs](https://cloud.google.com/logging/docs/audit/).
|
||||
Brings those events into Knative.
|
||||
|
||||
Refer to the [CloudAuditLogsSource](samples/cloud-audit-logs-source) example for more details.
|
||||
|
||||
|
||||
## Getting Started
|
||||
|
||||
- [Install the Eventing component](#installation)
|
||||
|
|
|
@ -1,23 +1,44 @@
|
|||
An event source is a resource object that acts as a link between an event producer and an event _sink_. A sink can be a Knative Service, Channel, or Broker that receives events from an event source.
|
||||
An event source is a Kubernetes custom resource (CR), created by a developer or cluster administrator, that acts as a link between an event producer and an event _sink_.
|
||||
A sink can be a k8s service, including Knative Services, a Channel, or a Broker that receives events from an event source.
|
||||
|
||||
This page provides an index of the available source resource types as well as
|
||||
links to their documentation.
|
||||
Event sources are created by instantiating a CR from a Source object.
|
||||
The Source object defines the arguments and parameters needed to instantiate a CR.
|
||||
|
||||
All Sources are part of the `sources` category.
|
||||
|
||||
{{< tabs name="List event sources" default="kubectl" >}} {{% tab name="kubectl" %}}
|
||||
You can list existing event sources on your cluster by entering the ommand:
|
||||
|
||||
```shell
|
||||
kubectl get sources
|
||||
```
|
||||
|
||||
{{< /tab >}}
|
||||
|
||||
{{% tab name="kn" %}}
|
||||
You can list existing event sources on your cluster by entering the kn command:
|
||||
|
||||
```shell
|
||||
kn source list
|
||||
```
|
||||
|
||||
{{< /tab >}} {{< /tabs >}}
|
||||
|
||||
## Knative Sources
|
||||
|
||||
| Name | API Version | Maintainer | Description |
|
||||
| -- | -- | -- | -- |
|
||||
| [APIServerSource](./apiserversource.md) | v1beta1 | Knative | Brings Kubernetes API server events into Knative. |
|
||||
| [AWS SQS](https://github.com/knative/eventing-contrib/blob/master/awssqs/pkg/apis/sources/v1alpha1/aws_sqs_types.go) | v1alpha1 | Knative | Brings [AWS Simple Queue Service](https://aws.amazon.com/sqs/) messages into Knative. |
|
||||
| [Apache Camel](https://github.com/knative/eventing-contrib/blob/master/camel/source/pkg/apis/sources/v1alpha1/camelsource_types.go) | v1alpha1 | Knative | Allows to use [Apache Camel](https://github.com/apache/camel) components for pushing events into Knative. |
|
||||
| [APIServerSource](https://github.com/knative/eventing/blob/master/pkg/apis/sources/v1alpha1/apiserver_types.go) | v1beta1 | 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/eventing-contrib/blob/master/awssqs/pkg/apis/sources/v1alpha1/aws_sqs_types.go) | 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](https://github.com/knative/eventing-contrib/blob/master/camel/source/pkg/apis/sources/v1alpha1/camelsource_types.go) | v1alpha1 | Knative | Enables use of [Apache Camel](https://github.com/apache/camel) components for pushing events into Knative. A CamelSource is an event source that can represent any existing [Apache Camel component](https://github.com/apache/camel/tree/master/components), that provides a consumer side, and enables publishing events to an addressable endpoint. Each Camel endpoint has the form of a URI where the scheme is the ID of the component to use. CamelSource requires [Camel-K](https://github.com/apache/camel-k#installation) to be installed into the current namespace. See the [CamelSource](https://github.com/knative/eventing-contrib/tree/master/camel/source/samples) example. |
|
||||
| [Apache CouchDB](https://github.com/knative/eventing-contrib/blob/master/couchdb) | v1alpha1 | Knative | Brings [Apache CouchDB](https://couchdb.apache.org/) messages into Knative. |
|
||||
| [Apache Kafka](https://github.com/knative/eventing-contrib/blob/master/kafka/source/pkg/apis/sources/v1alpha1/kafka_types.go) | v1beta1 | Knative | Brings [Apache Kafka](https://kafka.apache.org/) messages into Knative. |
|
||||
| [Container Source](./containersource.md) | v1beta1 | Knative | 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. |
|
||||
| [GitHub](https://github.com/knative/eventing-contrib/blob/master/github/pkg/apis/sources/v1alpha1/githubsource_types.go) | v1alpha1 | Knative | Registers for events of the specified types on the specified GitHub organization/repository. Brings those events into Knative. |
|
||||
| [GitLab](https://github.com/knative/eventing-contrib/blob/master/gitlab/pkg/apis/sources/v1alpha1/gitlabsource_types.go) | v1alpha1 | Knative | Registers for events of the specified types on the specified GitLab repository. Brings those events into Knative. |
|
||||
| [Apache Kafka](https://github.com/knative/eventing-contrib/blob/master/kafka/source/pkg/apis/sources/v1alpha1/kafka_types.go) | 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/eventing-contrib/tree/master/kafka/source) example for more details. |
|
||||
| [Container Source](https://github.com/knative/eventing/blob/master/pkg/apis/sources/v1beta1/container_types.go) | v1beta1 | 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](../samples/container-source) example for more details. |
|
||||
| [GitHub](https://github.com/knative/eventing-contrib/blob/master/github/pkg/apis/sources/v1alpha1/githubsource_types.go) | 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](../samples/github-source) example for more details. |
|
||||
| [GitLab](https://github.com/knative/eventing-contrib/blob/master/gitlab/pkg/apis/sources/v1alpha1/gitlabsource_types.go) | 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](../samples/gitlab-source) example for more details. |
|
||||
| [Heartbeats](https://github.com/knative/eventing-contrib/tree/master/cmd/heartbeats) | N/A | Knative | Uses an in-memory timer to produce events at the specified interval. |
|
||||
| [PingSource](./pingsource.md) | v1beta1 | Knative | Produces events with a fixed payload on a specified cron schedule. |
|
||||
| [SinkBinding](./sinkbinding.md) | v1beta1 | Knative | 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). |
|
||||
| [PingSource](./pingsource.md) | v1beta1 | Knative | Produces events with a fixed payload on a specified [Cron](https://en.wikipedia.org/wiki/Cron) schedule. See the [Ping Source](../samples/ping-source) example for more details. |
|
||||
| [SinkBinding](https://knative.dev/docs/eventing/samples/sinkbinding/) | v1beta1 | 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](../samples/container-source) example for more details. |
|
||||
| [WebSocket](https://github.com/knative/eventing-contrib/tree/master/cmd/websocketsource) | N/A | Knative | Opens a WebSocket to the specified source and packages each received message as a Knative event. |
|
||||
|
||||
## Third-Party Sources
|
||||
|
@ -32,12 +53,18 @@ links to their documentation.
|
|||
[AWS SNS](https://github.com/triggermesh/aws-event-sources/tree/master/cmd/awssnssource) | Supported | TriggerMesh | Registers for events of the specified AWS SNS endpoint. Brings those events into Knative.
|
||||
[AWS SQS](https://github.com/triggermesh/aws-event-sources/tree/master/cmd/awssqssource/README.md) | Supported | TriggerMesh | Registers for events of the specified AWS SQS queue. Brings those events into Knative.
|
||||
[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/master/docs/examples/cloudauditlogssource/README.md) | Active Development | None | 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.
|
||||
[CloudPubSubSource](https://github.com/google/knative-gcp/blob/master/docs/examples/cloudpubsubsource/README.md) | Active Development | None | Brings [Cloud Pub/Sub](https://cloud.google.com/pubsub/) messages into Knative.
|
||||
[CloudSchedulerSource](https://github.com/google/knative-gcp/blob/master/docs/examples/cloudschedulersource/README.md) | Active Development | None | Create, update, and delete [Google Cloud Scheduler](https://cloud.google.com/scheduler/) Jobs. When those jobs are triggered, receive the event inside Knative.
|
||||
[CloudStorageSource](https://github.com/google/knative-gcp/blob/master/docs/examples/cloudstoragesource/README.md) | Active Development | None | 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.
|
||||
[CloudAuditLogsSource](https://github.com/google/knative-gcp/blob/master/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](../samples/cloud-audit-logs-source) example for more details.
|
||||
[CloudPubSubSource](https://github.com/google/knative-gcp/blob/master/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](../samples/cloud-pubsub-source) example for more details.
|
||||
[CloudSchedulerSource](https://github.com/google/knative-gcp/blob/master/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](../samples/cloud-scheduler-source) example for further details.
|
||||
[CloudStorageSource](https://github.com/google/knative-gcp/blob/master/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](../samples/cloud-storage-source) example.
|
||||
[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.
|
||||
[Heartbeat](https://github.com/Harwayne/auto-container-source/tree/master/heartbeat-source) | Proof of Concept | None | Uses an in-memory timer to produce events as the specified interval. Uses AutoContainerSource for underlying infrastructure.
|
||||
[Konnek](https://konnek.github.io/docs/#/) | Active Development | None | Retrieves events from cloud platforms (like AWS and GCP) and transforms them into CloudEvents for consumption in Knative.
|
||||
[K8s](https://github.com/Harwayne/auto-container-source/tree/master/k8s-event-source) | Proof of Concept | None | Brings Kubernetes cluster events into Knative. Uses AutoContainerSource for underlying infrastructure.
|
||||
[VMware](https://github.com/vmware-tanzu/sources-for-knative/blob/master/pkg/apis/sources/v1alpha1/vspheresource_types.go) | Active Development | None | Brings [vSphere](https://www.vmware.com/products/vsphere.html) events into Knative.
|
||||
|
||||
## Additional resources
|
||||
|
||||
- For information about creating your own Source type, see the [tutorial on writing a Source with a Receive Adapter](../samples/writing-event-source).
|
||||
- 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/master/docs/cmd/kn_source.md).
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
---
|
||||
title: "Knative Eventing sources"
|
||||
linkTitle: "Eventing sources"
|
||||
title: "Event sources"
|
||||
weight: 20
|
||||
type: "docs"
|
||||
---
|
||||
|
|
Loading…
Reference in New Issue