diff --git a/_topic_map.yml b/_topic_map.yml index 807878109a26..551a630b34e0 100644 --- a/_topic_map.yml +++ b/_topic_map.yml @@ -2960,25 +2960,27 @@ Topics: - Name: Configuring channel defaults File: serverless-configuring-channels # Functions - uncomment at tech preview -#- Name: Functions -# Dir: functions -# Topics: -# - Name: About OpenShift Serverless Functions -# File: serverless-functions-about -# - Name: Setting up OpenShift Serverless Functions -# File: serverless-functions-setup -# - Name: Getting started with functions -# File: serverless-functions-getting-started -# - Name: Developing Node.js functions -# File: serverless-developing-nodejs-functions -# - Name: Developing Golang functions -# File: serverless-developing-go-functions -# - Name: Developing Python functions -# File: serverless-developing-python-functions -# - Name: Developing Quarkus functions -# File: serverless-developing-quarkus-functions -# - Name: Functions development reference guide -# File: serverless-functions-reference-guide +- Name: Functions + Dir: functions + Topics: + - Name: About OpenShift Serverless Functions + File: serverless-functions-about + - Name: Setting up OpenShift Serverless Functions + File: serverless-functions-setup + - Name: Getting started with functions + File: serverless-functions-getting-started + - Name: Developing Node.js functions + File: serverless-developing-nodejs-functions + - Name: Developing Golang functions + File: serverless-developing-go-functions + - Name: Developing Python functions + File: serverless-developing-python-functions + - Name: Developing Quarkus functions + File: serverless-developing-quarkus-functions + - Name: Using functions with Knative Eventing + File: serverless-functions-eventing + - Name: Functions development reference guide + File: serverless-functions-reference-guide # Networking - Name: Networking Dir: networking diff --git a/images/serverless-verify-source-channel.png b/images/serverless-verify-source-channel.png deleted file mode 100644 index 0fea95ba5f29..000000000000 Binary files a/images/serverless-verify-source-channel.png and /dev/null differ diff --git a/images/sink-pingsource-channel.png b/images/sink-pingsource-channel.png deleted file mode 100644 index 13cb3365e4ca..000000000000 Binary files a/images/sink-pingsource-channel.png and /dev/null differ diff --git a/modules/serverless-connect-channel-source-odc.adoc b/modules/serverless-connect-channel-source-odc.adoc deleted file mode 100644 index 4ff27a6828e8..000000000000 --- a/modules/serverless-connect-channel-source-odc.adoc +++ /dev/null @@ -1,32 +0,0 @@ -// Module included in the following assemblies: -// -// * serverless/channels/serverless-channels.adoc - -[id="serverless-connect-channel-source-odc_{context}"] -= Connect an event source to a channel using the Developer perspective - -You can create multiple event source types in {product-title} that can be connected to channels. - -.Prerequisites -To connect an event source to a channel using the *Developer* perspective, ensure that: - -* The {ServerlessOperatorName}, Knative Serving, and Knative Eventing are installed on your {product-title} cluster. -* You have logged in to the web console. -* 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}. -* You have created a channel by following the documentation on _Creating a channel using {product-title} web console_. - -.Procedure -. Create an event source of any type, by following the documentation on _Getting started with event sources_. -. In the *Developer* perspective, navigate to *Event Sources*. -. In the *Sink* section of the *Event Sources* form view, select *Resource*. Then use the drop-down to select your channel. -+ -image::sink-pingsource-channel.png[Use your channel as the Resource] -. Click *Create*. - -.Verification -You can verify that the event source was created and is connected to the sink by viewing the *Topology* page. - -. In the *Developer* perspective, navigate to *Topology*. -. View the event source and click on the connected channel to see the channel details in the side panel. -+ -image::serverless-verify-source-channel.png[View the source and connected channel] diff --git a/modules/serverless-connect-sink-source-odc.adoc b/modules/serverless-connect-sink-source-odc.adoc new file mode 100644 index 000000000000..ecc2212f5c86 --- /dev/null +++ b/modules/serverless-connect-sink-source-odc.adoc @@ -0,0 +1,34 @@ +// Module included in the following assemblies: +// +// * serverless/channels/connect-channels-event-source.adoc +// * serverless/event_sources/srvls-connecting-source-sinks.adoc + +[id="serverless-connect-sink-source-odc_{context}"] += Connect an event source to a sink using the Developer perspective + +You can create multiple event source types in {product-title} that can be connected to sinks. + +A sink is an addressable resource that can receive incoming events from other Knative Eventing resources. Knative services, channels, and brokers are all examples of sinks. +// Add functions as services to the list for tech preview + +.Prerequisites + +To connect an event source to a sink using the *Developer* perspective, ensure that: + +* The {ServerlessOperatorName}, Knative Serving, and Knative Eventing are installed on your {product-title} cluster. +* You have created a sink. +* You have logged in to the web console and are in the *Developer* perspective. +* 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}. + +.Procedure + +. Create an event source of any type, by navigating to *+Add* -> *Event Sources* and then selecting the event source type that you want to create. +. In the *Sink* section of the *Event Sources* form view, select *Resource*. Then use the drop-down list to select your sink. +. Click *Create*. + +.Verification + +You can verify that the event source was created and is connected to the sink by viewing the *Topology* page. + +. In the *Developer* perspective, navigate to *Topology*. +. View the event source and click on the connected sink to see the sink details in the side panel. diff --git a/serverless/channels/connect-channels-event-source.adoc b/serverless/channels/connect-channels-event-source.adoc index 943f15a56600..b8e26c949b5c 100644 --- a/serverless/channels/connect-channels-event-source.adoc +++ b/serverless/channels/connect-channels-event-source.adoc @@ -6,7 +6,14 @@ include::modules/common-attributes.adoc[] toc::[] -Connecting a channel to an event source allows the channel to receive events from that source. These events can then be forwarded to an event sink by using subscriptions. +Connecting a channel to an event source allows the channel to receive events from that source. -include::modules/serverless-connect-channel-source-odc.adoc[leveloffset=+1] +include::modules/serverless-connect-sink-source-odc.adoc[leveloffset=+1] // add kn, create module - modules/serverless-connect-channel-source-kn.adoc +// Using --sink flag with kn (generic) +include::modules/specifying-sink-flag-kn.adoc[leveloffset=+1] + +[id="next-steps_connect-channels-event-source"] +== Next steps + +* After a channel has started to receive events from a source, these events can be forwarded to another sink, such as a Knative service, by using xref:../../serverless/channels/serverless-subs.adoc#serverless-subs[subscriptions]. diff --git a/serverless/event_sources/srvls-connecting-source-sinks.adoc b/serverless/event_sources/srvls-connecting-source-sinks.adoc index bb72c84bbff9..bad194a55c88 100644 --- a/serverless/event_sources/srvls-connecting-source-sinks.adoc +++ b/serverless/event_sources/srvls-connecting-source-sinks.adoc @@ -6,15 +6,9 @@ include::modules/common-attributes.adoc[] toc::[] -When you xref:../../serverless/event_sources/knative-event-sources.adoc#knative-event-sources[create an event source], you can specify a sink where events are sent to from the source. A sink is an addressable resource that can receive incoming events from other Knative Eventing resources. Knative services, channels, and brokers are all examples of sinks. +When you xref:../../serverless/event_sources/knative-event-sources.adoc#knative-event-sources[create an event source], you can specify a sink where events are sent to from the source. // Using --sink flag with kn (generic) include::modules/specifying-sink-flag-kn.adoc[leveloffset=+1] -// Using ODC channels -include::modules/serverless-connect-channel-source-odc.adoc[leveloffset=+1] - -// TODO: -// brokers -// services -// ODC sources -// Show YAML +// Using ODC +include::modules/serverless-connect-sink-source-odc.adoc[leveloffset=+1] diff --git a/serverless/functions/serverless-functions-eventing.adoc b/serverless/functions/serverless-functions-eventing.adoc new file mode 100644 index 000000000000..8402023b791c --- /dev/null +++ b/serverless/functions/serverless-functions-eventing.adoc @@ -0,0 +1,14 @@ +include::modules/serverless-document-attributes.adoc[] +[id="serverless-functions-eventing"] += Using functions with Knative Eventing +:context: serverless-functions-eventing +include::modules/common-attributes.adoc[] + +toc::[] + +:FeatureName: {FunctionsProductName} +include::modules/technology-preview.adoc[leveloffset=+2] + +Functions are deployed as a Knative service on a {product-title} cluster, and can be connected as a sink to Knative Eventing components. + +include::modules/serverless-connect-sink-source-odc.adoc[leveloffset=+1] diff --git a/serverless/functions/serverless-functions-getting-started.adoc b/serverless/functions/serverless-functions-getting-started.adoc index 91ed4ed6dff3..09791ba74778 100644 --- a/serverless/functions/serverless-functions-getting-started.adoc +++ b/serverless/functions/serverless-functions-getting-started.adoc @@ -9,8 +9,7 @@ toc::[] :FeatureName: {FunctionsProductName} include::modules/technology-preview.adoc[leveloffset=+2] -This guide explains how you can create and manage a function on an {ServerlessProductName} installation by using the `kn` CLI. -// TODO: add info about developer console at 4.8 when this is supported. +This guide explains how you can get started with creating, building, and deploying a function on an {ServerlessProductName} installation. [id="prerequisites_serverless-functions-getting-started"] == Prerequisites @@ -21,3 +20,8 @@ include::modules/serverless-create-func-kn.adoc[leveloffset=+1] include::modules/serverless-build-func-kn.adoc[leveloffset=+1] include::modules/serverless-deploy-func-kn.adoc[leveloffset=+1] include::modules/serverless-functions-using-integrated-registry.adoc[leveloffset=+1] + +[id="next-steps_serverless-functions-getting-started"] +== Next steps + +* See xref:../../serverless/functions/serverless-functions-eventing.adoc#serverless-functions-eventing[Using functions with Knative Eventing].