Update Source docs to make the migration from CronJobSource to PingSource more clear. (#2296)

* Fix typo in CronJobSource

* Fix paths after migration

* Update CronJobSource to indicate that it is deprecated and replaced by PingSource or CronJob + SinkBinding

* Update docs to not that ContainerSource is also deprecated
This commit is contained in:
Evan Anderson 2020-03-13 11:53:30 -07:00 committed by GitHub
parent 8de8a1cfcb
commit b5807dc5c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 29 additions and 14 deletions

View File

@ -6,7 +6,7 @@ aliases:
- /docs/eventing/ping.md
---
The deprecated `CronJobsource` should be converted to the `PingSource`.
In 0.13, the deprecated `CronJobSource` should be converted to the `PingSource`.
The YAML file for a `CronJobSource` that emits events to a Knative Serving service will look similar to this:

View File

@ -43,10 +43,11 @@ Name | Status | Support | Description
[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.
[Cron Job](https://github.com/knative/eventing/blob/master/pkg/apis/sources/v1alpha1/cron_job_types.go) | Proof of Concept | None | Uses an in-memory timer to produce events on the specified Cron schedule.
[Cron Job](https://knative.dev/docs/eventing/migration/ping) | Replaced by PingSource | None | Deprecated, replace with [PingSource](https://knative.dev/docs/eventing/migration/ping) or a [CronJob using SinkBinding](https://knative.dev/docs/eventing/samples/sinkbinding/)
[GitHub](https://github.com/knative/eventing-contrib/blob/master/github/pkg/apis/sources/v1alpha1/githubsource_types.go) | Proof of Concept | None | Registers for events of the specified types on the specified GitHub organization/repository. Brings those events into Knative.
[GitLab](https://gitlab.com/triggermesh/gitlabsource) | Proof of Concept | None | Registers for events of the specified types on the specified GitLab repository. Brings those events into Knative.
[Kubernetes](https://github.com/knative/eventing/blob/master/pkg/apis/sources/v1alpha1/apiserver_types.go) | Active Development | Knative | Brings Kubernetes API server events into Knative.
[Ping](https://github.com/knative/eventing/blob/master/pkg/apis/sources/v1alpha2/ping_types.go) | In development | None | Uses an in-memory timer to produce events with a fixed payload on a specified cron schedule.
@ -57,9 +58,10 @@ These are not directly usable, but make writing a Source much easier.
Name | Status | Support | Description
--- | --- | --- | ---
[Auto Container Source](https://github.com/Harwayne/auto-container-source) | Proof of Concept | None | AutoContainerSource is a controller that allows the Source CRDs _without_ needing a controller. It notices CRDs with a specific label and starts controlling resources of that type. It utilizes Container Source as underlying infrastructure.
[Container Source](https://github.com/knative/eventing/blob/master/pkg/apis/sources/v1alpha1/containersource_types.go) | Active Development | Knative | Container Source is a generic controller. Given an Image URL, it will keep a single `Pod` running with the specified image, environment, and arguments. It is used by multiple other Sources as underlying infrastructure.
[Container Source](https://knative.dev/docs/eventing/migration/sinkbinding) | Deprecated, replaced by SinkBinding | Knative | ContainerSource was an earlier version of SinkBinding which controlled the lifetime of a single Pod which acted as an event source. SinkBinding is more flexible and is preferred.
[Kubebuilder Sample Source](https://github.com/grantr/sample-source) | Proof of Concept | None | Kubebuilder SampleSource is a kubebuilder based implementation supporting the [Writing an Event Source the Hard Way tutorial](../samples/writing-a-source).
[Sample Source](https://github.com/knative/sample-source) | Active Development | Knative | Used as reference implementation supporting [Writing an Event Source from Scratch tutorial](../samples/writing-receive-adapter-source).
[SinkBinding](https://knative.dev/docs/eventing/samples/sinkbinding/) | Active Development | 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 PodSpeccable).

View File

@ -28,9 +28,9 @@ import (
)
var (
yamlFile = flag.String("yaml", "eventing/sources/sources.yaml", "The YAML file to parse to generate the mark down.")
templateFile = flag.String("template", "eventing/sources/generator/ReadmeTemplate.gomd", "The template file to fill in.")
mdFile = flag.String("md", "eventing/sources/README.md", "The mark down file to write to. Any existing file will be overwritten.")
yamlFile = flag.String("yaml", "docs/eventing/sources/sources.yaml", "The YAML file to parse to generate the mark down.")
templateFile = flag.String("template", "docs/eventing/sources/generator/ReadmeTemplate.gomd", "The template file to fill in.")
mdFile = flag.String("md", "docs/eventing/sources/README.md", "The mark down file to write to. Any existing file will be overwritten.")
)
func main() {

View File

@ -1,14 +1,21 @@
# MetaSources are not intended to be used directly by a user. Rather they are to help make other
# sources easy to write and maintain.
metaSources:
- name: Container Source
url: https://github.com/knative/eventing/blob/master/pkg/apis/sources/v1alpha1/containersource_types.go
- name: SinkBinding
url: https://knative.dev/docs/eventing/samples/sinkbinding/
status: Active Development
support: Knative
description: >
Container Source is a generic controller. Given an Image URL, it will keep a single `Pod`
running with the specified image, environment, and arguments. It is used by multiple other
Sources as underlying infrastructure.
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 PodSpeccable).
- name: Container Source
url: https://knative.dev/docs/eventing/migration/sinkbinding
status: Deprecated, replaced by SinkBinding
support: Knative
description: >
ContainerSource was an earlier version of SinkBinding which controlled the lifetime of a single
Pod which acted as an event source. SinkBinding is more flexible and is preferred.
- name: Auto Container Source
url: https://github.com/Harwayne/auto-container-source
status: Proof of Concept
@ -48,11 +55,17 @@ sources:
description: >
Brings [AWS Simple Queue Service](https://aws.amazon.com/sqs/) messages into Knative.
- name: Cron Job
url: https://github.com/knative/eventing/blob/master/pkg/apis/sources/v1alpha1/cron_job_types.go
status: Proof of Concept
url: https://knative.dev/docs/eventing/migration/ping
status: Replaced by PingSource
support: None
description: >
Uses an in-memory timer to produce events on the specified Cron schedule.
Deprecated, replace with [PingSource](https://knative.dev/docs/eventing/migration/ping) or a [CronJob using SinkBinding](https://knative.dev/docs/eventing/samples/sinkbinding/)
- name: Ping
url: https://github.com/knative/eventing/blob/master/pkg/apis/sources/v1alpha2/ping_types.go
status: In development
support: None
description: >
Uses an in-memory timer to produce events with a fixed payload on a specified cron schedule.
- name: CloudPubSubSource
url: https://github.com/google/knative-gcp/blob/master/docs/examples/cloudpubsubsource/README.md
status: Active Development