diff --git a/docs/eventing/README.md b/docs/eventing/README.md index 8b3deffb2..1ea1209c6 100644 --- a/docs/eventing/README.md +++ b/docs/eventing/README.md @@ -161,7 +161,7 @@ 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-receive-adapter-source/). +[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 diff --git a/docs/eventing/samples/parallel/multiple-branches/README.md b/docs/eventing/samples/parallel/multiple-branches/README.md index 517e65089..c319641cf 100644 --- a/docs/eventing/samples/parallel/multiple-branches/README.md +++ b/docs/eventing/samples/parallel/multiple-branches/README.md @@ -104,7 +104,7 @@ kubectl -n default create -f ./event-display.yaml The `parallel.yaml` file contains the specifications for creating the Parallel. ```yaml -apiVersion: flows.knative.dev/v1beta1 +apiVersion: flows.knative.dev/v1 kind: Parallel metadata: name: odd-even-parallel @@ -146,8 +146,8 @@ kubectl create -f ./parallel.yaml ### Create the PingSource targeting the Parallel -This will create a PingSource which will send a CloudEvent with `{"message": -"Even or odd?"}` as the data payload every minute. +This will create a PingSource which will send a CloudEvent with +`{"message": "Even or odd?"}` as the data payload every minute. ```yaml apiVersion: sources.knative.dev/v1alpha2 @@ -159,7 +159,7 @@ spec: data: '{"message": "Even or odd?"}' sink: ref: - apiVersion: flows.knative.dev/v1alpha2 + apiVersion: flows.knative.dev/v1 kind: Parallel name: odd-even-parallel ``` diff --git a/docs/eventing/samples/parallel/multiple-branches/parallel.yaml b/docs/eventing/samples/parallel/multiple-branches/parallel.yaml index 61c8125ed..ef289e81c 100644 --- a/docs/eventing/samples/parallel/multiple-branches/parallel.yaml +++ b/docs/eventing/samples/parallel/multiple-branches/parallel.yaml @@ -1,4 +1,4 @@ -apiVersion: flows.knative.dev/v1beta1 +apiVersion: flows.knative.dev/v1 kind: Parallel metadata: name: odd-even-parallel diff --git a/docs/eventing/samples/parallel/multiple-branches/ping-source.yaml b/docs/eventing/samples/parallel/multiple-branches/ping-source.yaml index e4535b5f7..8d022e125 100644 --- a/docs/eventing/samples/parallel/multiple-branches/ping-source.yaml +++ b/docs/eventing/samples/parallel/multiple-branches/ping-source.yaml @@ -7,6 +7,6 @@ spec: jsonData: '{"message": "Even or odd?"}' sink: ref: - apiVersion: flows.knative.dev/v1beta1 + apiVersion: flows.knative.dev/v1 kind: Parallel name: odd-even-parallel diff --git a/docs/eventing/samples/parallel/mutual-exclusivity/README.md b/docs/eventing/samples/parallel/mutual-exclusivity/README.md index 07cd11543..110b81233 100644 --- a/docs/eventing/samples/parallel/mutual-exclusivity/README.md +++ b/docs/eventing/samples/parallel/mutual-exclusivity/README.md @@ -2,10 +2,10 @@ In this example, we are going to see how we can create a Parallel with mutually exclusive branches. This example is the same as the -[multiple branches example](../multiple-branches/README.md) except that we are now -going to rely on the Knative -[switch](https://github.com/lionelvillard/knative-functions#switch) function -to provide a soft mutual exclusivity guarantee. +[multiple branches example](../multiple-branches/README.md) except that we are +now going to rely on the Knative +[switch](https://github.com/lionelvillard/knative-functions#switch) function to +provide a soft mutual exclusivity guarantee. NOTE: this example must be deployed in the default namespace. @@ -89,10 +89,11 @@ kubectl -n default create -f ./event-display.yaml ### Create the Parallel object -The `parallel.yaml` file contains the specifications for creating the Parallel object. +The `parallel.yaml` file contains the specifications for creating the Parallel +object. ```yaml -apiVersion: flows.knative.dev/v1beta1 +apiVersion: flows.knative.dev/v1 kind: Parallel metadata: name: me-odd-even-parallel @@ -128,8 +129,8 @@ kubectl create -f ./parallel.yaml ### Create the PingSource targeting the Parallel object -This will create a PingSource which will send a CloudEvent with `{"message": -"Even or odd?"}` as the data payload every minute. +This will create a PingSource which will send a CloudEvent with +`{"message": "Even or odd?"}` as the data payload every minute. ```yaml apiVersion: sources.knative.dev/v1alpha2 @@ -141,7 +142,7 @@ spec: jsonData: '{"message": "Even or odd?"}' sink: ref: - apiVersion: flows.knative.dev/v1beta1 + apiVersion: flows.knative.dev/v1 kind: Parallel name: me-odd-even-parallel ``` @@ -153,8 +154,8 @@ kubectl create -f ./ping-source.yaml ### Inspecting the results You can now see the final output by inspecting the logs of the -`me-event-display` pods. Note that since we set the `PingSource` to emit -every minute, it might take some time for the events to show up in the logs. +`me-event-display` pods. Note that since we set the `PingSource` to emit every +minute, it might take some time for the events to show up in the logs. Let's look at the `me-event-display` log: diff --git a/docs/eventing/samples/parallel/mutual-exclusivity/ping-source.yaml b/docs/eventing/samples/parallel/mutual-exclusivity/ping-source.yaml index aa6f028d7..e186e2bcd 100644 --- a/docs/eventing/samples/parallel/mutual-exclusivity/ping-source.yaml +++ b/docs/eventing/samples/parallel/mutual-exclusivity/ping-source.yaml @@ -7,6 +7,6 @@ spec: jsonData: '{"message": "Even or odd?"}' sink: ref: - apiVersion: flows.knative.dev/v1beta1 + apiVersion: flows.knative.dev/v1 kind: Parallel name: me-odd-even-parallel diff --git a/docs/eventing/samples/sequence/sequence-reply-to-event-display/README.md b/docs/eventing/samples/sequence/sequence-reply-to-event-display/README.md index 204e4c4ae..a95c2e665 100644 --- a/docs/eventing/samples/sequence/sequence-reply-to-event-display/README.md +++ b/docs/eventing/samples/sequence/sequence-reply-to-event-display/README.md @@ -79,7 +79,7 @@ If you are using a different type of Channel, you need to change the spec.channelTemplate to point to your desired Channel. ```yaml -apiVersion: flows.knative.dev/v1beta1 +apiVersion: flows.knative.dev/v1 kind: Sequence metadata: name: sequence @@ -150,7 +150,7 @@ spec: jsonData: '{"message": "Hello world!"}' sink: ref: - apiVersion: flows.knative.dev/v1beta1 + apiVersion: flows.knative.dev/v1 kind: Sequence name: sequence ``` diff --git a/docs/eventing/samples/sequence/sequence-reply-to-event-display/ping-source.yaml b/docs/eventing/samples/sequence/sequence-reply-to-event-display/ping-source.yaml index 98ec4c775..bb45ce1cb 100644 --- a/docs/eventing/samples/sequence/sequence-reply-to-event-display/ping-source.yaml +++ b/docs/eventing/samples/sequence/sequence-reply-to-event-display/ping-source.yaml @@ -7,6 +7,6 @@ spec: jsonData: '{"message": "Hello world!"}' sink: ref: - apiVersion: flows.knative.dev/v1beta1 + apiVersion: flows.knative.dev/v1 kind: Sequence name: sequence diff --git a/docs/eventing/samples/sequence/sequence-reply-to-event-display/sequence.yaml b/docs/eventing/samples/sequence/sequence-reply-to-event-display/sequence.yaml index 8d4e2a120..2227cc913 100644 --- a/docs/eventing/samples/sequence/sequence-reply-to-event-display/sequence.yaml +++ b/docs/eventing/samples/sequence/sequence-reply-to-event-display/sequence.yaml @@ -1,4 +1,4 @@ -apiVersion: flows.knative.dev/v1beta1 +apiVersion: flows.knative.dev/v1 kind: Sequence metadata: name: sequence diff --git a/docs/eventing/samples/sequence/sequence-reply-to-sequence/README.md b/docs/eventing/samples/sequence/sequence-reply-to-sequence/README.md index cb82aedde..fb095cf74 100644 --- a/docs/eventing/samples/sequence/sequence-reply-to-sequence/README.md +++ b/docs/eventing/samples/sequence/sequence-reply-to-sequence/README.md @@ -120,7 +120,7 @@ If you are using a different type of Channel, you need to change the spec.channelTemplate to point to your desired Channel. ```yaml -apiVersion: flows.knative.dev/v1beta1 +apiVersion: flows.knative.dev/v1 kind: Sequence metadata: name: first-sequence @@ -144,7 +144,7 @@ spec: reply: ref: kind: Sequence - apiVersion: flows.knative.dev/v1beta1 + apiVersion: flows.knative.dev/v1 name: second-sequence ``` @@ -162,7 +162,7 @@ If you are using a different type of Channel, you need to change the spec.channelTemplate to point to your desired Channel. ```yaml -apiVersion: flows.knative.dev/v1beta1 +apiVersion: flows.knative.dev/v1 kind: Sequence metadata: name: second-sequence @@ -190,7 +190,6 @@ spec: name: event-display ``` - ```shell kubectl -n default create -f ./sequence2.yaml ``` @@ -218,8 +217,8 @@ kubectl -n default create -f ./event-display.yaml ### Create the PingSource targeting the first Sequence -This will create a PingSource which will send a CloudEvent with `{"message": -"Hello world!"}` as the data payload every 2 minutes. +This will create a PingSource which will send a CloudEvent with +`{"message": "Hello world!"}` as the data payload every 2 minutes. ```yaml apiVersion: sources.knative.dev/v1alpha2 diff --git a/docs/eventing/samples/sequence/sequence-reply-to-sequence/ping-source.yaml b/docs/eventing/samples/sequence/sequence-reply-to-sequence/ping-source.yaml index 587138b05..dc5fc3638 100644 --- a/docs/eventing/samples/sequence/sequence-reply-to-sequence/ping-source.yaml +++ b/docs/eventing/samples/sequence/sequence-reply-to-sequence/ping-source.yaml @@ -7,6 +7,6 @@ spec: jsonData: '{"message": "Hello world!"}' sink: ref: - apiVersion: flows.knative.dev/v1beta1 + apiVersion: flows.knative.dev/v1 kind: Sequence name: first-sequence diff --git a/docs/eventing/samples/sequence/sequence-reply-to-sequence/sequence1.yaml b/docs/eventing/samples/sequence/sequence-reply-to-sequence/sequence1.yaml index c429bbcdb..5a18ac874 100644 --- a/docs/eventing/samples/sequence/sequence-reply-to-sequence/sequence1.yaml +++ b/docs/eventing/samples/sequence/sequence-reply-to-sequence/sequence1.yaml @@ -1,4 +1,4 @@ -apiVersion: flows.knative.dev/v1beta1 +apiVersion: flows.knative.dev/v1 kind: Sequence metadata: name: first-sequence diff --git a/docs/eventing/samples/sequence/sequence-reply-to-sequence/sequence2.yaml b/docs/eventing/samples/sequence/sequence-reply-to-sequence/sequence2.yaml index ceca19cd9..cbc619006 100644 --- a/docs/eventing/samples/sequence/sequence-reply-to-sequence/sequence2.yaml +++ b/docs/eventing/samples/sequence/sequence-reply-to-sequence/sequence2.yaml @@ -1,4 +1,4 @@ -apiVersion: flows.knative.dev/v1beta1 +apiVersion: flows.knative.dev/v1 kind: Sequence metadata: name: second-sequence diff --git a/docs/eventing/samples/sequence/sequence-terminal/README.md b/docs/eventing/samples/sequence/sequence-terminal/README.md index 90ec6b070..f17855168 100644 --- a/docs/eventing/samples/sequence/sequence-terminal/README.md +++ b/docs/eventing/samples/sequence/sequence-terminal/README.md @@ -1,6 +1,7 @@ We are going to create the following logical configuration. We create a -CronJobSource, feeding events to a [`Sequence`](../../../flows/sequence.md). Sequence -can then do either external work, or out of band create additional events. +PingSource, feeding events to a [`Sequence`](../../../flows/sequence.md). +Sequence can then do either external work, or out of band create additional +events. ![Logical Configuration](./sequence-terminal.png) @@ -78,7 +79,7 @@ If you are using a different type of Channel, you need to change the spec.channelTemplate to point to your desired Channel. ```yaml -apiVersion: flows.knative.dev/v1beta1 +apiVersion: flows.knative.dev/v1 kind: Sequence metadata: name: sequence @@ -110,8 +111,8 @@ kubectl -n default create -f ./sequence.yaml ### Create the PingSource targeting the Sequence -This will create a PingSource which will send a CloudEvent with `{"message": -"Hello world!"}` as the data payload every 2 minutes. +This will create a PingSource which will send a CloudEvent with +`{"message": "Hello world!"}` as the data payload every 2 minutes. ```yaml apiVersion: sources.knative.dev/v1alpha2 @@ -123,7 +124,7 @@ spec: jsonData: '{"message": "Hello world!"}' sink: ref: - apiVersion: flows.knative.dev/v1beta1 + apiVersion: flows.knative.dev/v1 kind: Sequence name: sequence ``` @@ -138,8 +139,8 @@ kubectl -n default create -f ./ping-source.yaml ### Inspecting the results You can now see the final output by inspecting the logs of the event-display -pods. Note that since we set the `PingSource` to emit every 2 minutes, it -might take some time for the events to show up in the logs. +pods. Note that since we set the `PingSource` to emit every 2 minutes, it might +take some time for the events to show up in the logs. ```shell kubectl -n default get pods diff --git a/docs/eventing/samples/sequence/sequence-terminal/ping-source.yaml b/docs/eventing/samples/sequence/sequence-terminal/ping-source.yaml index 98ec4c775..bb45ce1cb 100644 --- a/docs/eventing/samples/sequence/sequence-terminal/ping-source.yaml +++ b/docs/eventing/samples/sequence/sequence-terminal/ping-source.yaml @@ -7,6 +7,6 @@ spec: jsonData: '{"message": "Hello world!"}' sink: ref: - apiVersion: flows.knative.dev/v1beta1 + apiVersion: flows.knative.dev/v1 kind: Sequence name: sequence diff --git a/docs/eventing/samples/sequence/sequence-terminal/sequence.yaml b/docs/eventing/samples/sequence/sequence-terminal/sequence.yaml index 090e1b03e..2924505a8 100644 --- a/docs/eventing/samples/sequence/sequence-terminal/sequence.yaml +++ b/docs/eventing/samples/sequence/sequence-terminal/sequence.yaml @@ -1,4 +1,4 @@ -apiVersion: flows.knative.dev/v1beta1 +apiVersion: flows.knative.dev/v1 kind: Sequence metadata: name: sequence diff --git a/docs/eventing/samples/sequence/sequence-with-broker-trigger/README.md b/docs/eventing/samples/sequence/sequence-with-broker-trigger/README.md index 6d7a860e0..df6a4e215 100644 --- a/docs/eventing/samples/sequence/sequence-with-broker-trigger/README.md +++ b/docs/eventing/samples/sequence/sequence-with-broker-trigger/README.md @@ -6,10 +6,10 @@ into the Broker and create another Trigger which will then display those events. ## Prerequisites -For this example, we'll assume you have set up an `InMemoryChannel` as well as -Knative Serving (for our functions). The examples use `default` namespace, -again, if your broker lives in another Namespace, you will need to modify the -examples to reflect this. +- Knative Serving +- `InMemoryChannel` + +**NOTE:** The examples use the `default` namespace. If you want to use different type of `Channel`, you will have to modify the `Sequence.Spec.ChannelTemplate` to create the appropriate Channel resources. @@ -97,7 +97,7 @@ spec.channelTemplate to point to your desired Channel. Also, change the spec.reply.name to point to your `Broker` ```yaml -apiVersion: flows.knative.dev/v1beta1 +apiVersion: flows.knative.dev/v1 kind: Sequence metadata: name: sequence @@ -177,7 +177,7 @@ spec: type: dev.knative.sources.ping subscriber: ref: - apiVersion: flows.knative.dev/v1beta1 + apiVersion: flows.knative.dev/v1 kind: Sequence name: sequence ``` diff --git a/docs/eventing/samples/sequence/sequence-with-broker-trigger/sequence.yaml b/docs/eventing/samples/sequence/sequence-with-broker-trigger/sequence.yaml index 2a94b9f78..3ec219f53 100644 --- a/docs/eventing/samples/sequence/sequence-with-broker-trigger/sequence.yaml +++ b/docs/eventing/samples/sequence/sequence-with-broker-trigger/sequence.yaml @@ -1,4 +1,4 @@ -apiVersion: flows.knative.dev/v1beta1 +apiVersion: flows.knative.dev/v1 kind: Sequence metadata: name: sequence diff --git a/docs/eventing/samples/sequence/sequence-with-broker-trigger/trigger.yaml b/docs/eventing/samples/sequence/sequence-with-broker-trigger/trigger.yaml index a1579e97f..0aae2b28c 100644 --- a/docs/eventing/samples/sequence/sequence-with-broker-trigger/trigger.yaml +++ b/docs/eventing/samples/sequence/sequence-with-broker-trigger/trigger.yaml @@ -9,6 +9,6 @@ spec: type: dev.knative.sources.ping subscriber: ref: - apiVersion: flows.knative.dev/v1beta1 + apiVersion: flows.knative.dev/v1 kind: Sequence name: sequence