Skip to content

Commit 5289b60

Browse files
authored
Merge pull request #41667 from abrennan89/020922-3
SRVCOM-1288 + SRVCOM-1664: Clean up attributes, prereqs
2 parents f7f1356 + 3c47de2 commit 5289b60

File tree

8 files changed

+58
-63
lines changed

8 files changed

+58
-63
lines changed

_topic_maps/_topic_map.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3212,7 +3212,7 @@ Topics:
32123212
File: serverless-event-delivery
32133213
- Name: Using the API server source
32143214
File: serverless-apiserversource
3215-
- Name: Using a ping source
3215+
- Name: Creating a ping source
32163216
File: serverless-pingsource
32173217
- File: serverless-custom-event-sources
32183218
Name: Custom event sources

modules/deleting-pingsource-kn.adoc

Lines changed: 0 additions & 11 deletions
This file was deleted.

modules/deleting-pingsource-yaml.adoc

Lines changed: 0 additions & 24 deletions
This file was deleted.

modules/serverless-pingsource-kn.adoc

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * /serverless/develop/serverless-pingsource.adoc
4+
15
:_content-type: PROCEDURE
26
[id="serverless-pingsource-kn_{context}"]
37
= Creating a ping source by using the Knative CLI
48

5-
The following procedure describes how to create a basic ping source by using the `kn` CLI.
9+
You can use the following procedure to create a ping source by using the `kn` CLI.
610

711
.Prerequisites
812

9-
* You have Knative Serving and Eventing installed.
10-
* You have the `kn` CLI installed.
13+
* The {ServerlessOperatorName}, Knative Serving and Knative Eventing are installed on the cluster.
14+
* You have installed the `kn` CLI.
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}.
1116
1217
.Procedure
1318

@@ -19,6 +24,7 @@ service that dumps incoming messages to the service logs:
1924
$ kn service create event-display \
2025
--image quay.io/openshift-knative/knative-eventing-sources-event-display:latest
2126
----
27+
2228
. For each set of ping events that you want to request, create a ping source in the same namespace as the event consumer:
2329
+
2430
[source,terminal]
@@ -28,6 +34,7 @@ $ kn source ping create test-ping-source \
2834
--data '{"message": "Hello world!"}' \
2935
--sink ksvc:event-display
3036
----
37+
3138
. Check that the controller is mapped correctly by entering the following command and inspecting the output:
3239
+
3340
[source,terminal]
@@ -73,6 +80,7 @@ The example shown in this guide creates a ping source that sends a message every
7380
----
7481
$ watch oc get pods
7582
----
83+
7684
. Cancel watching the pods using Ctrl+C, then look at the logs of the created pod:
7785
+
7886
[source,terminal]
@@ -97,3 +105,12 @@ Data,
97105
"message": "Hello world!"
98106
}
99107
----
108+
109+
.Deleting the ping source
110+
111+
* Delete the ping source:
112+
+
113+
[source,terminal]
114+
----
115+
$ kn delete pingsources.sources.knative.dev <ping_source_name>
116+
----

modules/serverless-pingsource-odc.adoc

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * /serverless/develop/serverless-pingsource.adoc
4+
15
:_content-type: PROCEDURE
26
[id="serverless-pingsource-odc_{context}"]
3-
= Creating a ping source using the Developer perspective
7+
= Creating a ping source by using the web console
48

5-
You can create and verify a basic ping source from the {product-title} web console.
9+
You can use the following procedure to create a ping source by using the {product-title} web console.
610

711
.Prerequisites
812

9-
To create a ping source using the *Developer* perspective, ensure that:
10-
11-
* The {ServerlessOperatorName}, Knative Serving, and Knative Eventing are installed on your {product-title} cluster.
12-
* You have logged in to the web console.
13-
* You are in the *Developer* perspective.
13+
* You have logged in to the {product-title} web console.
14+
* The {ServerlessOperatorName}, Knative Serving and Knative Eventing are installed on the cluster.
1415
* 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}.
1516
1617
.Procedure
1718

1819
. To verify that the ping source is working, create a simple Knative
1920
service that dumps incoming messages to the logs of the service.
21+
2022
.. In the *Developer* perspective, navigate to *+Add* -> *YAML*.
2123
.. Copy the example YAML:
2224
+
@@ -32,10 +34,10 @@ spec:
3234
containers:
3335
- image: quay.io/openshift-knative/knative-eventing-sources-event-display:latest
3436
----
35-
3637
.. Click *Create*.
3738

3839
. Create a ping source in the same namespace as the service created in the previous step, or any other sink that you want to send events to.
40+
3941
.. In the *Developer* perspective, navigate to *+Add* -> *Event Source*. The *Event Sources* page is displayed.
4042
.. Optional: If you have multiple providers for your event sources, select the required provider from the *Providers* list to filter the available event sources from the provider.
4143
.. Select *Ping Source* and then click *Create Event Source*. The *Create Event Source* page is displayed.
@@ -57,3 +59,8 @@ You can verify that the ping source was created and is connected to the sink by
5759
. View the ping source and sink.
5860
+
5961
image::verify-pingsource-ODC.png[View the ping source and service in the Topology view]
62+
63+
.Deleting the ping source
64+
65+
. Navigate to the *Topology* view.
66+
. Right-click the API server source and select *Delete Ping Source*.

modules/serverless-pingsource-yaml.adoc

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,23 @@
11
// Module included in the following assemblies:
22
//
3-
// * serverless/event_sources/serverless-pingsource.adoc
3+
// * /serverless/develop/serverless-pingsource.adoc
44

55
:_content-type: PROCEDURE
66
[id="serverless-pingsource-yaml_{context}"]
7-
= Using a ping source with YAML
7+
= Creating a ping source by using YAML
88

99
The following sections describe how to create a basic ping source using YAML files.
1010

1111
.Prerequisites
1212

13-
* You have Knative Serving and Eventing installed.
14-
15-
[NOTE]
16-
====
17-
The following procedure requires you to create YAML files.
18-
19-
If you change the names of the YAML files from those used in the examples, you must ensure that you also update the corresponding CLI commands.
20-
====
13+
* The {ServerlessOperatorName}, Knative Serving and Knative Eventing are installed on the cluster.
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}.
2115
2216
.Procedure
2317

2418
. To verify that the ping source is working, create a simple Knative
2519
service that dumps incoming messages to the service's logs.
20+
2621
.. Copy the example YAML into a file named `service.yaml`:
2722
+
2823
[source,yaml]
@@ -37,7 +32,6 @@ spec:
3732
containers:
3833
- image: quay.io/openshift-knative/knative-eventing-sources-event-display:latest
3934
----
40-
4135
.. Create the service:
4236
+
4337
[source,terminal]
@@ -46,6 +40,7 @@ $ oc apply --filename service.yaml
4640
----
4741

4842
. For each set of ping events that you want to request, create a ping source in the same namespace as the event consumer.
43+
4944
.. Copy the example YAML into a file named `ping-source.yaml`:
5045
+
5146
[source,yaml]
@@ -63,7 +58,6 @@ spec:
6358
kind: Service
6459
name: event-display
6560
----
66-
6761
.. Create the ping source:
6862
+
6963
[source,terminal]
@@ -143,3 +137,18 @@ Data,
143137
"message": "Hello world!"
144138
}
145139
----
140+
141+
.Deleting the ping source
142+
143+
* Delete the ping source:
144+
+
145+
[source,terminal]
146+
----
147+
$ oc delete -f <ping_source_yaml_filename>
148+
----
149+
+
150+
.Example command
151+
[source,terminal]
152+
----
153+
$ oc delete -f ping-source.yaml
154+
----

serverless/develop/serverless-pingsource.adoc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
:_content-type: ASSEMBLY
22
[id="serverless-pingsource"]
3-
= Using a ping source
3+
= Creating a ping source
44
:context: serverless-pingsource
55
include::modules/serverless-document-attributes.adoc[]
66
include::modules/common-attributes.adoc[]
@@ -37,7 +37,5 @@ include::modules/serverless-pingsource-odc.adoc[leveloffset=+1]
3737
// kn commands
3838
include::modules/serverless-pingsource-kn.adoc[leveloffset=+1]
3939
include::modules/specifying-sink-flag-kn.adoc[leveloffset=+2]
40-
include::modules/deleting-pingsource-kn.adoc[leveloffset=+1]
4140
// YAML
4241
include::modules/serverless-pingsource-yaml.adoc[leveloffset=+1]
43-
include::modules/deleting-pingsource-yaml.adoc[leveloffset=+1]

serverless/reference/kn-eventing-ref.adoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,4 @@ include::modules/serverless-kn-containersource.adoc[leveloffset=+2]
1919
include::modules/apiserversource-kn.adoc[leveloffset=+2]
2020
include::modules/apiserversource-kn-delete.adoc[leveloffset=+2]
2121
include::modules/serverless-pingsource-kn.adoc[leveloffset=+2]
22-
include::modules/deleting-pingsource-kn.adoc[leveloffset=+2]
2322
include::modules/serverless-kafka-source-kn.adoc[leveloffset=+2]

0 commit comments

Comments
 (0)