You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/apiserversource-kn.adoc
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,25 +7,26 @@
7
7
[id="apiserversource-kn_{context}"]
8
8
= Creating an API server source by using the Knative CLI
9
9
10
-
You can use the following procedure to create an API server source by using the `kn` CLI.
10
+
You can use the `kn source apiserver create` command to create an API server source by using the `kn` CLI. Using the `kn` CLI to create an API server source provides a more streamlined and intuitive user interface than modifying YAML files directly.
11
11
12
12
.Prerequisites
13
13
14
14
* The {ServerlessOperatorName} and Knative Eventing are installed on the cluster.
15
15
* You have created a project or have access to a project with the appropriate roles and permissions to create applications and other workloads in {product-title}.
Copy file name to clipboardExpand all lines: modules/apiserversource-yaml.adoc
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,14 +6,14 @@
6
6
[id="apiserversource-yaml_context"]
7
7
= Creating an API server source by using YAML files
8
8
9
-
You can use the following procedure to create an API server source by using YAML files.
9
+
Creating Knative resources by using YAML files uses a declarative API, which enables you to describe event sources declaratively and in a reproducible manner. To create an API server source by using YAML, you must create a YAML file that defines an `ApiServerSource` object, then apply it by using the `oc apply` command.
10
10
11
11
.Prerequisites
12
12
13
13
* The {ServerlessOperatorName} and Knative Eventing are installed on the cluster.
14
14
* You have created a project or have access to a project with the appropriate roles and permissions to create applications and other workloads in {product-title}.
15
15
* You have created the `default` broker in the same namespace as the one defined in the API server source YAML file.
Copy file name to clipboardExpand all lines: modules/odc-creating-apiserversource.adoc
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,14 +6,14 @@
6
6
[id="odc-creating-apiserversource_{context}"]
7
7
= Creating an API server source by using the web console
8
8
9
-
You can use the following procedure to create an API server source by using the {product-title} web console.
9
+
After Knative Eventing is installed on your cluster, you can create an API server source by using the web console. Using the {product-title} web console provides a streamlined and intuitive user interface to create an event source.
10
10
11
11
.Prerequisites
12
12
13
13
* You have logged in to the {product-title} web console.
14
14
* The {ServerlessOperatorName} and Knative Eventing are installed on the cluster.
15
15
* You have created a project or have access to a project with the appropriate roles and permissions to create applications and other workloads in {product-title}.
* Two environment variables are injected by the container source controller: `K_SINK` and `K_CE_OVERRIDES`. These variables are resolved from the `sink` and `ceOverrides` spec, respectively.
9
+
Two environment variables are injected by the container source controller: `K_SINK` and `K_CE_OVERRIDES`. These variables are resolved from the `sink` and `ceOverrides` spec, respectively. Events are sent to the sink URI specified in the `K_SINK` environment variable. The message must be sent as a `POST` using the link:https://cloudevents.io/[`CloudEvent`] HTTP format.
10
10
11
-
* Event messages are sent to the sink URI specified in the `K_SINK` environment variable. The event message can be in any format; however, using the link:https://cloudevents.io/[`CloudEvent`] spec is recommended.
This topic provides reference information about the configurable fields for the
10
-
`ContainerSource` object.
9
+
You can use a container as an event source, by creating a `ContainerSource` object. You can configure multiple parameters when creating a `ContainerSource` object.
11
10
12
11
`ContainerSource` objects support the following fields:
13
12
@@ -47,9 +46,7 @@ This topic provides reference information about the configurable fields for the
A `ceOverrides` definition provides overrides that control the CloudEvent's output format and modifications sent to the sink
75
+
A `ceOverrides` definition provides overrides that control the CloudEvent's output format and modifications sent to the sink. You can configure multiple fields for the `ceOverrides` definition.
79
76
80
77
A `ceOverrides` definition supports the following fields:
Copy file name to clipboardExpand all lines: modules/serverless-kn-containersource.adoc
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,8 +6,9 @@
6
6
:_content-type: REFERENCE
7
7
[id="serverless-kn-containersource_{context}"]
8
8
= Creating and managing container sources by using the Knative CLI
9
+
// needs to be revised as separate procedure modules; out of scope for this PR
9
10
10
-
You can use the following `kn` commands to create and manage container sources:
11
+
You can use the `kn source container` commands to create and manage container sources by using the `kn` CLI. Using the `kn` CLI to create event sources provides a more streamlined and intuitive user interface than modifying YAML files directly.
= Creating a container source by using the web console
8
8
9
-
You can create a container source by using the *Developer* perspective of the {product-title} web console.
9
+
After Knative Eventing is installed on your cluster, you can create a container source by using the web console. Using the {product-title} web console provides a streamlined and intuitive user interface to create an event source.
Copy file name to clipboardExpand all lines: modules/serverless-pingsource-kn.adoc
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,13 +7,14 @@
7
7
[id="serverless-pingsource-kn_{context}"]
8
8
= Creating a ping source by using the Knative CLI
9
9
10
-
You can use the following procedure to create a ping source by using the `kn` CLI.
10
+
You can use the `kn source ping create` command to create a ping source by using the `kn` CLI. Using the `kn` CLI to create event sources provides a more streamlined and intuitive user interface than modifying YAML files directly.
11
11
12
12
.Prerequisites
13
13
14
14
* The {ServerlessOperatorName}, Knative Serving and Knative Eventing are installed on the cluster.
15
-
* You have installed the `kn` CLI.
15
+
* You have installed the Knative (`kn`) CLI.
16
16
* You have created a project or have access to a project with the appropriate roles and permissions to create applications and other workloads in {product-title}.
17
+
* Optional: If you want to use the verification steps for this procedure, install the OpenShift (`oc`) CLI.
17
18
18
19
.Procedure
19
20
@@ -108,6 +109,7 @@ Data,
108
109
----
109
110
110
111
.Deleting the ping source
112
+
// move to a separate procedure, out of scope for this PR
Copy file name to clipboardExpand all lines: modules/serverless-pingsource-odc.adoc
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@
6
6
[id="serverless-pingsource-odc_{context}"]
7
7
= Creating a ping source by using the web console
8
8
9
-
You can use the following procedure to create a ping source by using the {product-title} web console.
9
+
After Knative Eventing is installed on your cluster, you can create a ping source by using the web console. Using the {product-title} web console provides a streamlined and intuitive user interface to create an event source.
10
10
11
11
.Prerequisites
12
12
@@ -61,6 +61,7 @@ You can verify that the ping source was created and is connected to the sink by
61
61
image::verify-pingsource-ODC.png[View the ping source and service in the Topology view]
62
62
63
63
.Deleting the ping source
64
+
// move to separate procedure, out of scope for this PR
64
65
65
66
. Navigate to the *Topology* view.
66
67
. Right-click the API server source and select *Delete Ping Source*.
Copy file name to clipboardExpand all lines: modules/serverless-pingsource-yaml.adoc
+30-8Lines changed: 30 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,20 +6,41 @@
6
6
[id="serverless-pingsource-yaml_{context}"]
7
7
= Creating a ping source by using YAML
8
8
9
-
The following sections describe how to create a basic ping source using YAML files.
9
+
Creating Knative resources by using YAML files uses a declarative API, which enables you to describe event sources declaratively and in a reproducible manner. To create a serverless ping source by using YAML, you must create a YAML file that defines a `PingSource` object, then apply it by using `oc apply`.
10
+
11
+
.Example `PingSource` object
12
+
[source,yaml]
13
+
----
14
+
apiVersion: sources.knative.dev/v1alpha2
15
+
kind: PingSource
16
+
metadata:
17
+
name: test-ping-source
18
+
spec:
19
+
schedule: "*/2 * * * *" <1>
20
+
jsonData: '{"message": "Hello world!"}' <2>
21
+
sink: <3>
22
+
ref:
23
+
apiVersion: serving.knative.dev/v1
24
+
kind: Service
25
+
name: event-display
26
+
----
27
+
28
+
<1> The schedule of the event specified using https://kubernetes.io/docs/tasks/job/automated-tasks-with-cron-jobs/#schedule[CRON expression].
29
+
<2> The event message body expressed as a JSON encoded data string.
30
+
<3> These are the details of the event consumer. In this example, we are using a Knative service named `event-display`.
10
31
11
32
.Prerequisites
12
33
13
34
* The {ServerlessOperatorName}, Knative Serving and Knative Eventing are installed on the cluster.
14
-
* Install the OpenShift CLI (`oc`).
35
+
* Install the OpenShift (`oc`) CLI.
15
36
* You have created a project or have access to a project with the appropriate roles and permissions to create applications and other workloads in {product-title}.
16
37
17
38
.Procedure
18
39
19
40
. To verify that the ping source is working, create a simple Knative
20
41
service that dumps incoming messages to the service's logs.
21
42
22
-
.. Copy the example YAML into a file named `service.yaml`:
43
+
.. Create a service YAML file:
23
44
+
24
45
[source,yaml]
25
46
----
@@ -37,12 +58,12 @@ spec:
37
58
+
38
59
[source,terminal]
39
60
----
40
-
$ oc apply --filename service.yaml
61
+
$ oc apply -f <filename>
41
62
----
42
63
43
64
. For each set of ping events that you want to request, create a ping source in the same namespace as the event consumer.
44
65
45
-
.. Copy the example YAML into a file named `ping-source.yaml`:
66
+
.. Create a YAML file for the pingsource:
46
67
+
47
68
[source,yaml]
48
69
----
@@ -63,14 +84,14 @@ spec:
63
84
+
64
85
[source,terminal]
65
86
----
66
-
$ oc apply --filename ping-source.yaml
87
+
$ oc apply -f <filename>
67
88
----
68
89
69
90
. Check that the controller is mapped correctly by entering the following command:
70
91
+
71
92
[source,terminal]
72
93
----
73
-
$ oc get pingsource.sources.knative.dev test-ping-source -oyaml
94
+
$ oc get pingsource.sources.knative.dev <ping_source_name> -oyaml
74
95
----
75
96
+
76
97
.Example output
@@ -140,12 +161,13 @@ Data,
140
161
----
141
162
142
163
.Deleting the ping source
164
+
// move to separate procedure; out of scope for this PR
0 commit comments