remove old archive folder (#4566)
|
@ -1 +0,0 @@
|
|||
<!DOCTYPE html><html><head><title>https://knative.dev/v0.22-docs/client/</title><link rel="canonical" href="https://knative.dev/v0.22-docs/client/"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=https://knative.dev/v0.22-docs/client/" /></head></html>
|
|
@ -1,134 +0,0 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Knative – CLI tools</title>
|
||||
<link>https://knative.dev/v0.23-docs/client/</link>
|
||||
<description>Recent content in CLI tools on Knative</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
|
||||
<atom:link href="https://knative.dev/v0.23-docs/client/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<item>
|
||||
<title>V0.23-Docs: Installing kn</title>
|
||||
<link>https://knative.dev/v0.23-docs/client/install-kn/</link>
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>https://knative.dev/v0.23-docs/client/install-kn/</guid>
|
||||
<description>
|
||||
|
||||
|
||||
<p>This guide provides details about how you can install the Knative <code>kn</code> CLI.</p>
|
||||
<h2 id="install-kn-using-brew">Install kn using brew</h2>
|
||||
<p>For macOS, you can install <code>kn</code> by using <a href="https://github.com/knative/homebrew-client" target="_blank">Homebrew</a>.</p>
|
||||
<pre><code>brew install knative/client/kn
|
||||
</code></pre><h2 id="install-kn-using-a-binary">Install kn using a binary</h2>
|
||||
<p>You can install <code>kn</code> by downloading the executable binary for your system and placing it in the system path.</p>
|
||||
<p>A link to the latest stable binary release is available on the <a href="https://github.com/knative/client/releases" target="_blank"><code>kn</code> release page</a>.</p>
|
||||
<h3 id="install-kn-using-the-nightly-built-binary">Install kn using the nightly-built binary</h3>
|
||||
<p>Nightly-built executable binaries are available for users who want to install the latest pre-release build of <code>kn</code>.</p>
|
||||
<p><strong>WARNING:</strong> Nightly-built executable binaries include features which may not be included in the latest Knative release and are not considered to be stable.</p>
|
||||
<p>Links to the latest nightly-built executable binaries are available here:</p>
|
||||
<ul>
|
||||
<li><a href="https://storage.googleapis.com/knative-nightly/client/latest/kn-darwin-amd64" target="_blank">macOS</a></li>
|
||||
<li><a href="https://storage.googleapis.com/knative-nightly/client/latest/kn-linux-amd64" target="_blank">Linux</a></li>
|
||||
<li><a href="https://storage.googleapis.com/knative-nightly/client/latest/kn-windows-amd64.exe" target="_blank">Windows</a></li>
|
||||
</ul>
|
||||
<h2 id="install-kn-using-go">Install kn using Go</h2>
|
||||
<ol>
|
||||
<li>
|
||||
<p>Check out the <code>kn</code> client repository:</p>
|
||||
<pre><code>git clone https://github.com/knative/client.git
|
||||
cd client/
|
||||
</code></pre></li>
|
||||
<li>
|
||||
<p>Build an executable binary:</p>
|
||||
<pre><code>hack/build.sh -f
|
||||
</code></pre></li>
|
||||
<li>
|
||||
<p>Move <code>kn</code> into your system path, and verify that <code>kn</code> commands are working properly. For example:</p>
|
||||
<pre><code>kn version
|
||||
</code></pre></li>
|
||||
</ol>
|
||||
<h2 id="running-kn-using-container-images">Running kn using container images</h2>
|
||||
<p><strong>WARNING:</strong> Nightly container images include features which may not be included in the latest Knative release and are not considered to be stable.</p>
|
||||
<p>Links to images are available here:</p>
|
||||
<ul>
|
||||
<li><a href="https://gcr.io/knative-releases/knative.dev/client/cmd/kn" target="_blank">Latest release</a></li>
|
||||
<li><a href="https://gcr.io/knative-nightly/knative.dev/client/cmd/kn" target="_blank">Nightly container image</a></li>
|
||||
</ul>
|
||||
<p>You can run <code>kn</code> from a container image. For example:</p>
|
||||
<pre><code>docker run --rm -v &quot;$HOME/.kube/config:/root/.kube/config&quot; gcr.io/knative-releases/knative.dev/client/cmd/kn:latest service list
|
||||
</code></pre><p><strong>NOTE:</strong> Running <code>kn</code> from a container image does not place the binary on a permanent path. This procedure must be repeated each time you want to use <code>kn</code>.</p>
|
||||
<h2 id="using-kn-with-tekton">Using kn with Tekton</h2>
|
||||
<p>See the <a href="http://hub.tekton.dev/tekton/task/kn" target="_blank">Tekton documentation</a>.</p>
|
||||
|
||||
</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>V0.23-Docs: Customizing kn</title>
|
||||
<link>https://knative.dev/v0.23-docs/client/configure-kn/</link>
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>https://knative.dev/v0.23-docs/client/configure-kn/</guid>
|
||||
<description>
|
||||
|
||||
|
||||
<p>You can customize your <code>kn</code> CLI setup by creating a <code>config.yaml</code> configuration file. You can provide this configuration by using the <code>--config</code> flag, otherwise the configuration is picked up from a default location. The default configuration location conforms to the <a href="https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG Base Directory Specification</a>, and is different for Unix systems and Windows systems.</p>
|
||||
<ul>
|
||||
<li>If the <code>XDG_CONFIG_HOME</code> environment variable is set, the default configuration location that <code>kn</code> looks for is <code>$XDG_CONFIG_HOME/kn</code>.</li>
|
||||
<li>If the <code>XDG_CONFIG_HOME</code> environment variable is not set, <code>kn</code> looks for the configuration in the home directory of the user at <code>$HOME/.config/kn/config.yaml</code>.</li>
|
||||
<li>For Windows systems, the default <code>kn</code> configuration location is <code>%APPDATA%\kn</code>.</li>
|
||||
</ul>
|
||||
<h2 id="example-configuration-file">Example configuration file</h2>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">plugins</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">path-lookup</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">true</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">directory</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">~/.config/kn/plugins</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">eventing</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">sink-mappings</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">prefix</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">svc</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">group</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">core</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">version</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">resource</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">services</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><p>Where</p>
|
||||
<ul>
|
||||
<li><code>path-lookup</code> specifies whether <code>kn</code> should look for <a href="../kn-plugins">plugins</a> in the <code>PATH</code> environment variable. This is a boolean configuration option. The default value is <code>false</code>.</li>
|
||||
<li><code>directory</code> specifies the directory where <code>kn</code> will look for plugins. The default path depends on the operating system, as described above. This can be any directory that is visible to the user.</li>
|
||||
<li><code>sink-mappings</code> defines the Kubernetes Addressable resource that is used when you use the <code>--sink</code> flag with a <code>kn</code> CLI command.
|
||||
<ul>
|
||||
<li><code>prefix</code>: The prefix you want to use to describe your sink. Service, <code>svc</code>, <code>channel</code>, and <code>broker</code> are predefined prefixes in <code>kn</code>.</li>
|
||||
</ul>
|
||||
<!--can be a prefix be anything? Otherwise let's provide a full list of what's allowed, limitations, etc.-->
|
||||
<ul>
|
||||
<li><code>group</code>: The API group of the Kubernetes resource.</li>
|
||||
<li><code>version</code>: The version of the Kubernetes resource.</li>
|
||||
<li><code>resource</code>: The plural name of the Kubernetes resource type. For example, <code>services</code> or <code>brokers</code>.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>V0.23-Docs: kn plugins</title>
|
||||
<link>https://knative.dev/v0.23-docs/client/kn-plugins/</link>
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>https://knative.dev/v0.23-docs/client/kn-plugins/</guid>
|
||||
<description>
|
||||
|
||||
|
||||
<p>The <code>kn</code> CLI supports the use of plugins. Plugins enable you to extend the functionality of your <code>kn</code> installation by adding custom commands and other shared commands that are not part of the core distribution of <code>kn</code>.</p>
|
||||
<!--TODO: Add details about installing and using different available plugins, list of available plugins-->
|
||||
|
||||
</description>
|
||||
</item>
|
||||
|
||||
</channel>
|
||||
</rss>
|
|
@ -1,17 +0,0 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Knative – Knative concepts</title>
|
||||
<link>https://knative.dev/v0.23-docs/concepts/</link>
|
||||
<description>Recent content in Knative concepts on Knative</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
|
||||
<atom:link href="https://knative.dev/v0.23-docs/concepts/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</channel>
|
||||
</rss>
|
|
@ -1 +0,0 @@
|
|||
<!DOCTYPE html><html><head><title>https://knative.dev/v0.22-docs/</title><link rel="canonical" href="https://knative.dev/v0.22-docs/"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=https://knative.dev/v0.22-docs/" /></head></html>
|
|
@ -1 +0,0 @@
|
|||
<!DOCTYPE html><html><head><title>https://knative.dev/v0.21-docs/reference/resources/</title><link rel="canonical" href="https://knative.dev/v0.21-docs/reference/resources/"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=https://knative.dev/v0.21-docs/reference/resources/" /></head></html>
|
|
@ -1 +0,0 @@
|
|||
<!DOCTYPE html><html><head><title>https://knative.dev/community/contributing/</title><link rel="canonical" href="https://knative.dev/community/contributing/"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=https://knative.dev/community/contributing/" /></head></html>
|
|
@ -1,17 +0,0 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Knative – Alternate Brokers</title>
|
||||
<link>/docs/eventing/broker/alternate/</link>
|
||||
<description>Recent content in Alternate Brokers on Knative</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
|
||||
<atom:link href="/docs/eventing/broker/alternate/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</channel>
|
||||
</rss>
|
|
@ -1 +0,0 @@
|
|||
<!DOCTYPE html><html><head><title>https://knative.dev/docs/eventing/broker/configmaps/broker-configmaps/</title><link rel="canonical" href="https://knative.dev/docs/eventing/broker/configmaps/broker-configmaps/"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=https://knative.dev/docs/eventing/broker/configmaps/broker-configmaps/" /></head></html>
|
|
@ -1 +0,0 @@
|
|||
<!DOCTYPE html><html><head><title>https://knative.dev/v0.23-docs/eventing/broker/kafka-broker/</title><link rel="canonical" href="https://knative.dev/v0.23-docs/eventing/broker/kafka-broker/"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=https://knative.dev/v0.23-docs/eventing/broker/kafka-broker/" /></head></html>
|
|
@ -1 +0,0 @@
|
|||
<!DOCTYPE html><html><head><title>https://knative.dev/v0.23-docs/eventing/broker/triggers/</title><link rel="canonical" href="https://knative.dev/v0.23-docs/eventing/broker/triggers/"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=https://knative.dev/v0.23-docs/eventing/broker/triggers/" /></head></html>
|
Before Width: | Height: | Size: 82 KiB |
|
@ -1,753 +0,0 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Knative – Brokers</title>
|
||||
<link>https://knative.dev/v0.23-docs/eventing/broker/</link>
|
||||
<description>Recent content in Brokers on Knative</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
|
||||
<atom:link href="https://knative.dev/v0.23-docs/eventing/broker/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<item>
|
||||
<title>V0.23-Docs: Creating a broker</title>
|
||||
<link>https://knative.dev/v0.23-docs/eventing/broker/create-mtbroker/</link>
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>https://knative.dev/v0.23-docs/eventing/broker/create-mtbroker/</guid>
|
||||
<description>
|
||||
|
||||
|
||||
<p>Once you have installed Knative Eventing, you can create an instance of the multi-tenant (MT) channel-based broker that is provided by default. The default backing channel type for an MT channel-based broker is InMemoryChannel.</p>
|
||||
<p>You can create a broker by using the <code>kn</code> CLI or by applying YAML files using <code>kubectl</code>.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="nav nav-tabs" id="create-a-broker" role="tablist">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link active" id="create-a-broker-0-tab" data-toggle="tab" href="#create-a-broker-0" role="tab" aria-controls="create-a-broker-0" aria-selected="true">kn</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="nav-item ">
|
||||
<a class="nav-link " id="create-a-broker-1-tab" data-toggle="tab" href="#create-a-broker-1" role="tab" aria-controls="create-a-broker-1" aria-selected="true">kubectl</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<div class="tab-content" >
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="tab-pane fade show active" id="create-a-broker-0" role="tabpanel" aria-labelledby="create-a-broker-0-tab">
|
||||
|
||||
<ol>
|
||||
<li>
|
||||
<p>You can create a broker in current namespace by entering the following command:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">kn broker create &lt;broker-name&gt; -n &lt;namespace&gt;
|
||||
</code></pre></div><p><strong>NOTE:</strong> If you choose not to specify a namespace, the broker will be created in the current namespace.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Optional: Verify that the broker was created by listing existing brokers. Enter the following command:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">kn broker list
|
||||
</code></pre></div></li>
|
||||
<li>
|
||||
<p>Optional: You can also verify the broker exists by describing the broker you have created. Enter the following command:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">kn broker describe &lt;broker-name&gt;
|
||||
</code></pre></div></li>
|
||||
</ol>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="tab-pane fade " id="create-a-broker-1" role="tabpanel" aria-labelledby="create-a-broker-1-tab">
|
||||
|
||||
<p>The YAML in the following example creates a broker named <code>default</code> in the current namespace. For more information about configuring broker options using YAML, see the full <a href="../example-mtbroker">broker configuration example</a>.</p>
|
||||
<ol>
|
||||
<li>
|
||||
<p>Create a broker in the current namespace:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#000">kubectl apply -f - &lt;&lt;EOF</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">eventing.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Broker</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">&lt;broker-name&gt;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#000">EOF</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div></li>
|
||||
<li>
|
||||
<p>Optional: Verify that the broker is working correctly, by entering the following command:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">kubectl -n &lt;namespace&gt; get broker &lt;broker-name&gt;
|
||||
</code></pre></div><p>This shows information about your broker. If the broker is working correctly, it shows a <code>READY</code> status of <code>True</code>:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">NAME READY REASON URL AGE
|
||||
default True http://broker-ingress.knative-eventing.svc.cluster.local/event-example/default 1m
|
||||
</code></pre></div><p>If the <code>READY</code> status is <code>False</code>, wait a few moments and then run the command again.</p>
|
||||
</li>
|
||||
</ol>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>V0.23-Docs: Triggers</title>
|
||||
<link>https://knative.dev/v0.23-docs/eventing/broker/triggers/</link>
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>https://knative.dev/v0.23-docs/eventing/broker/triggers/</guid>
|
||||
<description>
|
||||
|
||||
|
||||
<p>A trigger represents a desire to subscribe to events from a specific broker.</p>
|
||||
<p>The <code>subscriber</code> value must be a <a href="https://pkg.go.dev/knative.dev/pkg/apis/duck/v1#Destination">Destination</a>.</p>
|
||||
<p>Simple example which will receive all the events from the given (<code>default</code>) broker and
|
||||
deliver them to Knative Serving service <code>my-service</code>:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">kubectl create -f - <span style="color:#4e9a06">&lt;&lt;EOF
|
||||
</span><span style="color:#4e9a06">apiVersion: eventing.knative.dev/v1
|
||||
</span><span style="color:#4e9a06">kind: Trigger
|
||||
</span><span style="color:#4e9a06">metadata:
|
||||
</span><span style="color:#4e9a06"> name: my-service-trigger
|
||||
</span><span style="color:#4e9a06">spec:
|
||||
</span><span style="color:#4e9a06"> broker: default
|
||||
</span><span style="color:#4e9a06"> subscriber:
|
||||
</span><span style="color:#4e9a06"> ref:
|
||||
</span><span style="color:#4e9a06"> apiVersion: serving.knative.dev/v1
|
||||
</span><span style="color:#4e9a06"> kind: Service
|
||||
</span><span style="color:#4e9a06"> name: my-service
|
||||
</span><span style="color:#4e9a06">EOF</span>
|
||||
</code></pre></div><p>Simple example which will receive all the events from the given (<code>default</code>) broker and
|
||||
deliver them to the custom path <code>/my-custom-path</code> for the Kubernetes service <code>my-service</code>:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">kubectl create -f - <span style="color:#4e9a06">&lt;&lt;EOF
|
||||
</span><span style="color:#4e9a06">apiVersion: eventing.knative.dev/v1
|
||||
</span><span style="color:#4e9a06">kind: Trigger
|
||||
</span><span style="color:#4e9a06">metadata:
|
||||
</span><span style="color:#4e9a06"> name: my-service-trigger
|
||||
</span><span style="color:#4e9a06">spec:
|
||||
</span><span style="color:#4e9a06"> broker: default
|
||||
</span><span style="color:#4e9a06"> subscriber:
|
||||
</span><span style="color:#4e9a06"> ref:
|
||||
</span><span style="color:#4e9a06"> apiVersion: v1
|
||||
</span><span style="color:#4e9a06"> kind: Service
|
||||
</span><span style="color:#4e9a06"> name: my-service
|
||||
</span><span style="color:#4e9a06"> uri: /my-custom-path
|
||||
</span><span style="color:#4e9a06">EOF</span>
|
||||
</code></pre></div><h3 id="trigger-filtering">Trigger filtering</h3>
|
||||
<p>Exact match filtering on any number of CloudEvents attributes as well as
|
||||
extensions are supported. If your filter sets multiple attributes, an event must
|
||||
have all of the attributes for the trigger to filter it. Note that we only
|
||||
support exact matching on string values.</p>
|
||||
<h4 id="example">Example</h4>
|
||||
<p>This example filters events from the <code>default</code> broker that are of type
|
||||
<code>dev.knative.foo.bar</code> and have the extension <code>myextension</code> with the value
|
||||
<code>my-extension-value</code>.</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">kubectl create -f - <span style="color:#4e9a06">&lt;&lt;EOF
|
||||
</span><span style="color:#4e9a06">apiVersion: eventing.knative.dev/v1
|
||||
</span><span style="color:#4e9a06">kind: Trigger
|
||||
</span><span style="color:#4e9a06">metadata:
|
||||
</span><span style="color:#4e9a06"> name: my-service-trigger
|
||||
</span><span style="color:#4e9a06">spec:
|
||||
</span><span style="color:#4e9a06"> broker: default
|
||||
</span><span style="color:#4e9a06"> filter:
|
||||
</span><span style="color:#4e9a06"> attributes:
|
||||
</span><span style="color:#4e9a06"> type: dev.knative.foo.bar
|
||||
</span><span style="color:#4e9a06"> myextension: my-extension-value
|
||||
</span><span style="color:#4e9a06"> subscriber:
|
||||
</span><span style="color:#4e9a06"> ref:
|
||||
</span><span style="color:#4e9a06"> apiVersion: serving.knative.dev/v1
|
||||
</span><span style="color:#4e9a06"> kind: Service
|
||||
</span><span style="color:#4e9a06"> name: my-service
|
||||
</span><span style="color:#4e9a06">EOF</span>
|
||||
</code></pre></div>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>V0.23-Docs: Event delivery</title>
|
||||
<link>https://knative.dev/v0.23-docs/eventing/broker/broker-event-delivery/</link>
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>https://knative.dev/v0.23-docs/eventing/broker/broker-event-delivery/</guid>
|
||||
<description>
|
||||
|
||||
|
||||
<p>You can configure how events are delivered for each broker by adding a <code>delivery</code> spec, as shown in the following example:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">eventing.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Broker</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">with-dead-letter-sink</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">delivery</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">deadLetterSink</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">ref</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">serving.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">example-sink</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">backoffDelay</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">&lt;duration&gt;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">backoffPolicy</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">&lt;policy-type&gt;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">retry</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">&lt;integer&gt;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><p>Where</p>
|
||||
<ul>
|
||||
<li>The <code>deadLetterSink</code> spec contains configuration settings to enable using a dead letter sink. This tells the subscription what happens to events that cannot be delivered to the subscriber. When this is configured, events that fail to be delivered are sent to the dead letter sink destination. The destination can be any Addressable object that conforms to the Knative Eventing sink contract, such as a Knative service, a Kubernetes service, or a URI. In the example, the destination is a <code>Service</code> object, or Knative service, named <code>example-sink</code>.</li>
|
||||
<li>The <code>backoffDelay</code> delivery parameter specifies the time delay before an event delivery retry is attempted after a failure. The duration of the <code>backoffDelay</code> parameter is specified using the ISO 8601 format. For example, <code>PT1S</code> specifies a 1 second delay.</li>
|
||||
<li>The <code>backoffPolicy</code> delivery parameter can be used to specify the retry back off policy. The policy can be specified as either <code>linear</code> or <code>exponential</code>. When using the <code>linear</code> back off policy, the back off delay is the time interval specified between retries. This is a linearly increasing delay, which means that the back off delay increases by the given interval for each retry. When using the <code>exponential</code> back off policy, the back off delay increases by a multiplier of the given interval for each retry.</li>
|
||||
<li><code>retry</code> specifies the number of times that event delivery is retried before the event is sent to the dead letter sink. The initial delivery attempt is not included in the retry count, so the total number of delivery attempts is equal to the <code>retry</code> value +1.</li>
|
||||
</ul>
|
||||
<h2 id="broker-support">Broker Support</h2>
|
||||
<p>The following table summarizes which delivery parameters are supported for each broker implementation type:</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Broker Class</th>
|
||||
<th>Supported Delivery Parameters</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>googlecloud</td>
|
||||
<td><code>deadLetterSink</code> <sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup>, <code>retry</code>, <code>backoffPolicy</code>, <code>backoffDelay</code> <sup id="fnref:2"><a href="#fn:2" class="footnote-ref" role="doc-noteref">2</a></sup></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Kafka</td>
|
||||
<td><code>deadLetterSink</code>, <code>retry</code>, <code>backoffPolicy</code>, <code>backoffDelay</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MTChannelBasedBroker</td>
|
||||
<td>depends on the underlying channel</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>RabbitMQBroker</td>
|
||||
<td><code>deadLetterSink</code>, <code>retry</code>, <code>backoffPolicy</code>, <code>backoffDelay</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<section class="footnotes" role="doc-endnotes">
|
||||
<hr>
|
||||
<ol>
|
||||
<li id="fn:1" role="doc-endnote">
|
||||
<p>deadLetterSink must be a GCP Pub/Sub topic URI:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">deadLetterSink</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">uri</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">pubsub://dead-letter-topic</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><p>See the <a href="https://github.com/google/knative-gcp/blob/master/config/core/configmaps/br-delivery.yaml"><code>config-br-delivery</code></a>
|
||||
ConfigMap for a complete example. <a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
|
||||
</li>
|
||||
<li id="fn:2" role="doc-endnote">
|
||||
<p>The <code>googlecloud</code> broker only supports the <code>exponential</code> back off policy. <a href="#fnref:2" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
|
||||
</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>V0.23-Docs: Broker configuration example</title>
|
||||
<link>https://knative.dev/v0.23-docs/eventing/broker/example-mtbroker/</link>
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>https://knative.dev/v0.23-docs/eventing/broker/example-mtbroker/</guid>
|
||||
<description>
|
||||
|
||||
|
||||
<p>The following is a full example of a multi-tenant (MT) channel-based Broker object which shows the possible configuration options that you can modify:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">eventing.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Broker</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">default</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">namespace</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">default</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">annotations</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">eventing.knative.dev/broker.class</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">MTChannelBasedBroker</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">config</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">ConfigMap</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">config-br-default-channel</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">namespace</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">knative-eventing</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">delivery</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">deadLetterSink</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">ref</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">namespace</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">example-namespace</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">example-service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">uri</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">example-uri</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">retry</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#0000cf;font-weight:bold">5</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">backoffPolicy</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">exponential</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">backoffDelay</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;2007-03-01T13:00:00Z/P1Y2M10DT2H30M&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><ul>
|
||||
<li>You can specify any valid <code>name</code> for your broker. Using <code>default</code> will create a broker named <code>default</code>.</li>
|
||||
<li>The <code>namespace</code> must be an existing namespace in your cluster. Using <code>default</code> will create the broker in the current namespace.</li>
|
||||
<li>You can set the <code>eventing.knative.dev/broker.class</code> annotation to change the class of the broker. The default broker class is <code>MTChannelBasedBroker</code>, but Knative also supports use of the <code>KafkaBroker</code> class. For more information about Kafka brokers, see the <a href="../kafka-broker">Apache Kafka Broker</a> documentation.</li>
|
||||
<li><code>spec.config</code> is used to specify the default backing channel configuration for MT channel-based broker implementations. For more information on configuring the default channel type, see the documentation on <a href="../configmaps/broker-configmaps">ConfigMaps</a>.</li>
|
||||
<li><code>spec.delivery</code> is used to configure event delivery options. Event delivery options specify what happens to an event that fails to be delivered to an event sink. For more information, see the documentation on <a href="../broker-event-delivery">broker event delivery</a>.</li>
|
||||
</ul>
|
||||
|
||||
</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>V0.23-Docs: ConfigMaps</title>
|
||||
<link>https://knative.dev/v0.23-docs/eventing/broker/configmaps/broker-configmaps/</link>
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>https://knative.dev/v0.23-docs/eventing/broker/configmaps/broker-configmaps/</guid>
|
||||
<description>
|
||||
|
||||
|
||||
<p>Knative Eventing provides a <code>config-br-defaults</code> ConfigMap that contains the configuration settings that govern default broker creation.</p>
|
||||
<!--TODO: Create a version of this doc for the channels doc section-->
|
||||
<p>The default <code>config-br-defaults</code> ConfigMap is as follows:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">ConfigMap</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">config-br-defaults</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">namespace</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">knative-eventing</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">labels</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">eventing.knative.dev/release</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">devel</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">data</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Configuration for defaulting channels that do not specify CRD implementations.</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">default-br-config</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">|</span><span style="color:#8f5902;font-style:italic">
|
||||
</span><span style="color:#8f5902;font-style:italic"> clusterDefault:
|
||||
</span><span style="color:#8f5902;font-style:italic"> brokerClass: MTChannelBasedBroker
|
||||
</span><span style="color:#8f5902;font-style:italic"> apiVersion: v1
|
||||
</span><span style="color:#8f5902;font-style:italic"> kind: ConfigMap
|
||||
</span><span style="color:#8f5902;font-style:italic"> name: config-br-default-channel
|
||||
</span><span style="color:#8f5902;font-style:italic"> namespace: knative-eventing</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><h2 id="channel-implementation-options">Channel implementation options</h2>
|
||||
<p>The following example shows a Broker object where the <code>spec.config</code> configuration is specified in a <code>config-br-default-channel</code> ConfigMap:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">eventing.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Broker</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">annotations</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">eventing.knative.dev/broker.class</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">MTChannelBasedBroker</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">default</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Configuration specific to this broker.</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">config</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">ConfigMap</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">config-br-default-channel</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">namespace</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">knative-eventing</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><p>A Broker object that does not have a <code>spec.config</code> specified uses the <code>config-br-default-channel</code> ConfigMap dy default because this is specified in the <code>config-br-defaults</code> ConfigMap.</p>
|
||||
<p>However, if you have installed a different channel implementation, for example, Kafka, and would like this to be used as the default channel implementation for any broker that is created, you can change the <code>config-br-defaults</code> ConfigMap to look like this:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">ConfigMap</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">config-br-defaults</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">namespace</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">knative-eventing</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">labels</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">eventing.knative.dev/release</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">devel</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">data</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Configuration for defaulting channels that do not specify CRD implementations.</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">default-br-config</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">|</span><span style="color:#8f5902;font-style:italic">
|
||||
</span><span style="color:#8f5902;font-style:italic"> clusterDefault:
|
||||
</span><span style="color:#8f5902;font-style:italic"> brokerClass: MTChannelBasedBroker
|
||||
</span><span style="color:#8f5902;font-style:italic"> apiVersion: v1
|
||||
</span><span style="color:#8f5902;font-style:italic"> kind: ConfigMap
|
||||
</span><span style="color:#8f5902;font-style:italic"> name: kafka-channel
|
||||
</span><span style="color:#8f5902;font-style:italic"> namespace: knative-eventing</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><p>Now every broker created in the cluster that does not have a <code>spec.config</code> will be configured to use the <code>kafka-channel</code> ConfigMap.</p>
|
||||
<p>For more information about creating a <code>kafka-channel</code> ConfigMap to use with your broker, see the <a href="../../broker/kafka-broker/kafka-configmap/">Kafka Channel ConfigMap</a> documentation.</p>
|
||||
<h3 id="changing-the-default-channel-implementation-for-a-namespace">Changing the default channel implementation for a namespace</h3>
|
||||
<p>You can modify the default broker creation behavior for one or more namespaces.</p>
|
||||
<p>For example, if you wanted to use the <code>kafka-channel</code> ConfigMap for all other brokers created, but wanted to use <code>config-br-default-channel</code> ConfigMap for <code>namespace-1</code> and <code>namespace-2</code>, you would use the following ConfigMap settings:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">ConfigMap</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">config-br-defaults</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">namespace</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">knative-eventing</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">labels</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">eventing.knative.dev/release</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">devel</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">data</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Configuration for defaulting channels that do not specify CRD implementations.</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">default-br-config</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">|</span><span style="color:#8f5902;font-style:italic">
|
||||
</span><span style="color:#8f5902;font-style:italic"> clusterDefault:
|
||||
</span><span style="color:#8f5902;font-style:italic"> brokerClass: MTChannelBasedBroker
|
||||
</span><span style="color:#8f5902;font-style:italic"> apiVersion: v1
|
||||
</span><span style="color:#8f5902;font-style:italic"> kind: ConfigMap
|
||||
</span><span style="color:#8f5902;font-style:italic"> name: config-kafka-channel
|
||||
</span><span style="color:#8f5902;font-style:italic"> namespace: knative-eventing
|
||||
</span><span style="color:#8f5902;font-style:italic"> namespaceDefaults:
|
||||
</span><span style="color:#8f5902;font-style:italic"> namespace-1:
|
||||
</span><span style="color:#8f5902;font-style:italic"> apiVersion: v1
|
||||
</span><span style="color:#8f5902;font-style:italic"> kind: ConfigMap
|
||||
</span><span style="color:#8f5902;font-style:italic"> name: config-br-default-channel
|
||||
</span><span style="color:#8f5902;font-style:italic"> namespace: knative-eventing
|
||||
</span><span style="color:#8f5902;font-style:italic"> namespace-2:
|
||||
</span><span style="color:#8f5902;font-style:italic"> apiVersion: v1
|
||||
</span><span style="color:#8f5902;font-style:italic"> kind: ConfigMap
|
||||
</span><span style="color:#8f5902;font-style:italic"> name: config-br-default-channel
|
||||
</span><span style="color:#8f5902;font-style:italic"> namespace: knative-eventing</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><h2 id="broker-class-options">Broker class options</h2>
|
||||
<p>When a broker is created without a specified <code>BrokerClass</code> annotation, the default <code>MTChannelBasedBroker</code> broker class is used, as specified in the <code>config-br-defaults</code> ConfigMap.</p>
|
||||
<p>The following example creates a broker called <code>default</code> in the default namespace, and uses <code>MTChannelBasedBroker</code> as the implementation:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">kubectl create -f - <span style="color:#4e9a06">&lt;&lt;EOF
|
||||
</span><span style="color:#4e9a06">apiVersion: eventing.knative.dev/v1
|
||||
</span><span style="color:#4e9a06">kind: Broker
|
||||
</span><span style="color:#4e9a06">metadata:
|
||||
</span><span style="color:#4e9a06"> name: default
|
||||
</span><span style="color:#4e9a06"> namespace: default
|
||||
</span><span style="color:#4e9a06">EOF</span>
|
||||
</code></pre></div><h3 id="configuring-the-broker-class">Configuring the broker class</h3>
|
||||
<p>To configure a broker class, you can modify the
|
||||
<code>eventing.knative.dev/broker.class</code> annotation and <code>spec.config</code> for the Broker
|
||||
object. <code>MTChannelBasedBroker</code> is the broker class default.</p>
|
||||
<ol>
|
||||
<li>
|
||||
<p>Modify the <code>eventing.knative.dev/broker.class</code> annotation. Replace
|
||||
<code>MTChannelBasedBroker</code> with the class type you want to use:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">eventing.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Broker</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">annotations</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">eventing.knative.dev/broker.class</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">MTChannelBasedBroker</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">default</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">namespace</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">default</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div></li>
|
||||
<li>
|
||||
<p>Configure the <code>spec.config</code> with the details of the ConfigMap that defines
|
||||
the backing channel for the broker class:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">eventing.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Broker</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">annotations</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">eventing.knative.dev/broker.class</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">MTChannelBasedBroker</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">default</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">namespace</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">default</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">config</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">ConfigMap</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">config-br-default-channel</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">namespace</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">knative-eventing</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div></li>
|
||||
</ol>
|
||||
<h3 id="configuring-the-default-brokerclass-for-the-cluster">Configuring the default BrokerClass for the cluster</h3>
|
||||
<p>
|
||||
You can configure the <code>clusterDefault</code> broker class so that any broker created in the cluster that does not have a <code>BrokerClass</code> annotation uses this default class.</p>
|
||||
<h4 id="example">Example</h4>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">ConfigMap</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">config-br-defaults</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">namespace</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">knative-eventing</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">labels</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">eventing.knative.dev/release</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">devel</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">data</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Configuration for defaulting channels that do not specify CRD implementations.</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">default-br-config</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">|</span><span style="color:#8f5902;font-style:italic">
|
||||
</span><span style="color:#8f5902;font-style:italic"> clusterDefault:
|
||||
</span><span style="color:#8f5902;font-style:italic"> brokerClass: MTChannelBasedBroker</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><p></p>
|
||||
<h3 id="configuring-the-default-brokerclass-for-namespaces">Configuring the default BrokerClass for namespaces</h3>
|
||||
<p>
|
||||
You can modify the default broker class for one or more namespaces.</p>
|
||||
<p>For example, if you want to use a <code>KafkaBroker</code> class for all other brokers created on the cluster, but you want to use the <code>MTChannelBasedBroker</code> class for brokers created in <code>namespace-1</code> and <code>namespace-2</code>, you would use the following ConfigMap settings:
|
||||
</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">ConfigMap</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">config-br-defaults</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">namespace</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">knative-eventing</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">labels</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">eventing.knative.dev/release</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">devel</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">data</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Configuration for defaulting channels that do not specify CRD implementations.</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">default-br-config</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">|</span><span style="color:#8f5902;font-style:italic">
|
||||
</span><span style="color:#8f5902;font-style:italic"> clusterDefault:
|
||||
</span><span style="color:#8f5902;font-style:italic"> brokerClass: KafkaBroker
|
||||
</span><span style="color:#8f5902;font-style:italic"> namespaceDefaults:
|
||||
</span><span style="color:#8f5902;font-style:italic"> namespace1:
|
||||
</span><span style="color:#8f5902;font-style:italic"> brokerClass: MTChannelBasedBroker
|
||||
</span><span style="color:#8f5902;font-style:italic"> namespace2:
|
||||
</span><span style="color:#8f5902;font-style:italic"> brokerClass: MTChannelBasedBroker</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>V0.23-Docs: Apache Kafka Broker</title>
|
||||
<link>https://knative.dev/v0.23-docs/eventing/broker/kafka-broker/</link>
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>https://knative.dev/v0.23-docs/eventing/broker/kafka-broker/</guid>
|
||||
<description>
|
||||
|
||||
|
||||
<p>The Apache Kafka Broker is a native Broker implementation, that reduces
|
||||
network hops, supports any Kafka version, and has a better integration
|
||||
with Apache Kafka for the Knative Broker and Trigger model.</p>
|
||||
<p>Notable features are:</p>
|
||||
<ul>
|
||||
<li>Control plane High Availability</li>
|
||||
<li>Horizontally scalable data plane</li>
|
||||
<li><a href="#kafka-producer-and-consumer-configurations">Extensively configurable</a></li>
|
||||
<li>Ordered delivery of events based on <a href="https://github.com/cloudevents/spec/blob/v1.0.1/extensions/partitioning.md">CloudEvents partitioning extension</a></li>
|
||||
<li>Support any Kafka version, see <a href="https://cwiki.apache.org/confluence/display/KAFKA/Compatibility+Matrix">compatibility matrix</a></li>
|
||||
</ul>
|
||||
<h2 id="prerequisites">Prerequisites</h2>
|
||||
<ol>
|
||||
<li><a href="../../../install/install-eventing-with-yaml">Installing Eventing using YAML files</a>.</li>
|
||||
<li>An Apache Kafka cluster (if you&rsquo;re just getting started you can follow <a href="https://strimzi.io/quickstarts/">Strimzi Quickstart page</a>).</li>
|
||||
</ol>
|
||||
<h2 id="installation">Installation</h2>
|
||||
<ol>
|
||||
<li>
|
||||
<p>Install the Kafka controller by entering the following command:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl apply --filename https://github.com/knative-sandbox/eventing-kafka-broker/releases/download/v0.23.0/eventing-kafka-controller.yaml
|
||||
</code></pre></div></li>
|
||||
<li>
|
||||
<p>Install the Kafka Broker data plane by entering the following command:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl apply --filename https://github.com/knative-sandbox/eventing-kafka-broker/releases/download/v0.23.0/eventing-kafka-broker.yaml
|
||||
</code></pre></div></li>
|
||||
<li>
|
||||
<p>Verify that <code>kafka-controller</code>, <code>kafka-broker-receiver</code> and <code>kafka-broker-dispatcher</code> are running,
|
||||
by entering the following command:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl get deployments.apps -n knative-eventing
|
||||
</code></pre></div><p>Example output:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">NAME READY UP-TO-DATE AVAILABLE AGE
|
||||
eventing-controller 1/1 <span style="color:#0000cf;font-weight:bold">1</span> <span style="color:#0000cf;font-weight:bold">1</span> 10s
|
||||
eventing-webhook 1/1 <span style="color:#0000cf;font-weight:bold">1</span> <span style="color:#0000cf;font-weight:bold">1</span> 9s
|
||||
kafka-controller 1/1 <span style="color:#0000cf;font-weight:bold">1</span> <span style="color:#0000cf;font-weight:bold">1</span> 3s
|
||||
kafka-broker-dispatcher 1/1 <span style="color:#0000cf;font-weight:bold">1</span> <span style="color:#0000cf;font-weight:bold">1</span> 4s
|
||||
kafka-broker-receiver 1/1 <span style="color:#0000cf;font-weight:bold">1</span> <span style="color:#0000cf;font-weight:bold">1</span> 5s
|
||||
</code></pre></div></li>
|
||||
</ol>
|
||||
<h2 id="create-a-kafka-broker">Create a Kafka Broker</h2>
|
||||
<p>A Kafka Broker object looks like this:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">eventing.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Broker</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">annotations</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># case-sensitive</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">eventing.knative.dev/broker.class</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Kafka</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">default</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">namespace</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">default</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Configuration specific to this broker.</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">config</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">ConfigMap</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">kafka-broker-config</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">namespace</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">knative-eventing</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Optional dead letter sink, you can specify either:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># - deadLetterSink.ref, which is a reference to a Callable</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># - deadLetterSink.uri, which is an absolute URI to a Callable (It can potentially be out of the Kubernetes cluster)</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">delivery</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">deadLetterSink</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">ref</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">serving.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">dlq-service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><p><code>spec.config</code> should reference any <code>ConfigMap</code> that looks like the following:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">ConfigMap</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">kafka-broker-config</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">namespace</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">knative-eventing</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">data</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Number of topic partitions</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">default.topic.partitions</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;10&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Replication factor of topic messages.</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">default.topic.replication.factor</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;1&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># A comma separated list of bootstrap servers. (It can be in or out the k8s cluster)</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">bootstrap.servers</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;my-cluster-kafka-bootstrap.kafka:9092&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><p>The above <code>ConfigMap</code> is installed in the cluster. You can edit
|
||||
the configuration or create a new one with the same values
|
||||
depending on your needs.</p>
|
||||
<p><strong>NOTE:</strong> The <code>default.topic.replication.factor</code> value must be less than or equal to the number of Kafka broker instances in your cluster. For example, if you only have one Kafka broker, the <code>default.topic.replication.factor</code> value should not be more than <code>1</code>.</p>
|
||||
<h2 id="set-as-default-broker-implementation">Set as default broker implementation</h2>
|
||||
<p>To set the Kafka broker as the default implementation for all brokers in the Knative deployment,
|
||||
you can apply global settings by modifying the <code>config-br-defaults</code> ConfigMap in the <code>knative-eventing</code> namespace.</p>
|
||||
<p>This allows you to avoid configuring individual or per-namespace settings for each broker,
|
||||
such as <code>metadata.annotations.eventing.knative.dev/broker.class</code> or <code>spec.config</code>.</p>
|
||||
<p>The following YAML is an example of a <code>config-br-defaults</code> ConfigMap using Kafka broker as the default implementation.</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">ConfigMap</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">config-br-defaults</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">namespace</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">knative-eventing</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">data</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">default-br-config</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">|</span><span style="color:#8f5902;font-style:italic">
|
||||
</span><span style="color:#8f5902;font-style:italic"> clusterDefault:
|
||||
</span><span style="color:#8f5902;font-style:italic"> brokerClass: Kafka
|
||||
</span><span style="color:#8f5902;font-style:italic"> apiVersion: v1
|
||||
</span><span style="color:#8f5902;font-style:italic"> kind: ConfigMap
|
||||
</span><span style="color:#8f5902;font-style:italic"> name: kafka-broker-config
|
||||
</span><span style="color:#8f5902;font-style:italic"> namespace: knative-eventing
|
||||
</span><span style="color:#8f5902;font-style:italic"> namespaceDefaults:
|
||||
</span><span style="color:#8f5902;font-style:italic"> namespace1:
|
||||
</span><span style="color:#8f5902;font-style:italic"> brokerClass: Kafka
|
||||
</span><span style="color:#8f5902;font-style:italic"> apiVersion: v1
|
||||
</span><span style="color:#8f5902;font-style:italic"> kind: ConfigMap
|
||||
</span><span style="color:#8f5902;font-style:italic"> name: kafka-broker-config
|
||||
</span><span style="color:#8f5902;font-style:italic"> namespace: knative-eventing
|
||||
</span><span style="color:#8f5902;font-style:italic"> namespace2:
|
||||
</span><span style="color:#8f5902;font-style:italic"> brokerClass: Kafka
|
||||
</span><span style="color:#8f5902;font-style:italic"> apiVersion: v1
|
||||
</span><span style="color:#8f5902;font-style:italic"> kind: ConfigMap
|
||||
</span><span style="color:#8f5902;font-style:italic"> name: kafka-broker-config
|
||||
</span><span style="color:#8f5902;font-style:italic"> namespace: knative-eventing</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><h2 id="security">Security</h2>
|
||||
<p>Apache Kafka supports different security features, Knative supports the followings:</p>
|
||||
<ul>
|
||||
<li><a href="#authentication-using-sasl">Authentication using <code>SASL</code> without encryption</a></li>
|
||||
<li><a href="#authentication-using-sasl-and-encryption-using-ssl">Authentication using <code>SASL</code> and encryption using <code>SSL</code></a></li>
|
||||
<li><a href="#authentication-and-encryption-using-ssl">Authentication and encryption using <code>SSL</code></a></li>
|
||||
<li><a href="#encryption-using-ssl-without-client-authentication">Encryption using <code>SSL</code> without client authentication</a></li>
|
||||
</ul>
|
||||
<p>To enable security features, in the <code>ConfigMap</code> referenced by <code>broker.spec.config</code>, we can reference a <code>Secret</code>:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">ConfigMap</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">kafka-broker-config</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">namespace</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">knative-eventing</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">data</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Other configurations</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># ...</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Reference a Secret called my_secret</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">auth.secret.ref.name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">my_secret</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><p>The <code>Secret</code> <code>my_secret</code> must exist in the same namespace of the <code>ConfigMap</code> referenced by <code>broker.spec.config</code>,
|
||||
in this case: <code>knative-eventing</code>.</p>
|
||||
<p><em>Note: Certificates and keys must be in <a href="https://en.wikipedia.org/wiki/Privacy-Enhanced_Mail"><code>PEM</code> format</a>.</em></p>
|
||||
<h3 id="authentication-using-sasl">Authentication using SASL</h3>
|
||||
<p>Knative supports the following SASL mechanisms:</p>
|
||||
<ul>
|
||||
<li><code>PLAIN</code></li>
|
||||
<li><code>SCRAM-SHA-256</code></li>
|
||||
<li><code>SCRAM-SHA-512</code></li>
|
||||
</ul>
|
||||
<p>To use a specific SASL mechanism replace <code>&lt;sasl_mechanism&gt;</code> with the mechanism of your choice.</p>
|
||||
<h3 id="authentication-using-sasl-without-encryption">Authentication using SASL without encryption</h3>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl create secret --namespace &lt;namespace&gt; generic &lt;my_secret&gt; <span style="color:#4e9a06">\
|
||||
</span><span style="color:#4e9a06"></span> --from-literal<span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#000">protocol</span><span style="color:#ce5c00;font-weight:bold">=</span>SASL_PLAINTEXT <span style="color:#4e9a06">\
|
||||
</span><span style="color:#4e9a06"></span> --from-literal<span style="color:#ce5c00;font-weight:bold">=</span>sasl.mechanism<span style="color:#ce5c00;font-weight:bold">=</span>&lt;sasl_mechanism&gt; <span style="color:#4e9a06">\
|
||||
</span><span style="color:#4e9a06"></span> --from-literal<span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#000">user</span><span style="color:#ce5c00;font-weight:bold">=</span>&lt;my_user&gt; <span style="color:#4e9a06">\
|
||||
</span><span style="color:#4e9a06"></span> --from-literal<span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#000">password</span><span style="color:#ce5c00;font-weight:bold">=</span>&lt;my_password&gt;
|
||||
</code></pre></div><h3 id="authentication-using-sasl-and-encryption-using-ssl">Authentication using SASL and encryption using SSL</h3>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl create secret --namespace &lt;namespace&gt; generic &lt;my_secret&gt; <span style="color:#4e9a06">\
|
||||
</span><span style="color:#4e9a06"></span> --from-literal<span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#000">protocol</span><span style="color:#ce5c00;font-weight:bold">=</span>SASL_SSL <span style="color:#4e9a06">\
|
||||
</span><span style="color:#4e9a06"></span> --from-literal<span style="color:#ce5c00;font-weight:bold">=</span>sasl.mechanism<span style="color:#ce5c00;font-weight:bold">=</span>&lt;sasl_mechanism&gt; <span style="color:#4e9a06">\
|
||||
</span><span style="color:#4e9a06"></span> --from-file<span style="color:#ce5c00;font-weight:bold">=</span>ca.crt<span style="color:#ce5c00;font-weight:bold">=</span>caroot.pem <span style="color:#4e9a06">\
|
||||
</span><span style="color:#4e9a06"></span> --from-literal<span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#000">user</span><span style="color:#ce5c00;font-weight:bold">=</span>&lt;my_user&gt; <span style="color:#4e9a06">\
|
||||
</span><span style="color:#4e9a06"></span> --from-literal<span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#000">password</span><span style="color:#ce5c00;font-weight:bold">=</span>&lt;my_password&gt;
|
||||
</code></pre></div><h3 id="encryption-using-ssl-without-client-authentication">Encryption using SSL without client authentication</h3>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl create secret --namespace &lt;namespace&gt; generic &lt;my_secret&gt; <span style="color:#4e9a06">\
|
||||
</span><span style="color:#4e9a06"></span> --from-literal<span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#000">protocol</span><span style="color:#ce5c00;font-weight:bold">=</span>SSL <span style="color:#4e9a06">\
|
||||
</span><span style="color:#4e9a06"></span> --from-file<span style="color:#ce5c00;font-weight:bold">=</span>ca.crt<span style="color:#ce5c00;font-weight:bold">=</span>&lt;my_caroot.pem_file_path&gt; <span style="color:#4e9a06">\
|
||||
</span><span style="color:#4e9a06"></span> --from-literal<span style="color:#ce5c00;font-weight:bold">=</span>user.skip<span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#204a87">true</span>
|
||||
</code></pre></div><h3 id="authentication-and-encryption-using-ssl">Authentication and encryption using SSL</h3>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl create secret --namespace &lt;namespace&gt; generic &lt;my_secret&gt; <span style="color:#4e9a06">\
|
||||
</span><span style="color:#4e9a06"></span> --from-literal<span style="color:#ce5c00;font-weight:bold">=</span><span style="color:#000">protocol</span><span style="color:#ce5c00;font-weight:bold">=</span>SSL <span style="color:#4e9a06">\
|
||||
</span><span style="color:#4e9a06"></span> --from-file<span style="color:#ce5c00;font-weight:bold">=</span>ca.crt<span style="color:#ce5c00;font-weight:bold">=</span>&lt;my_caroot.pem_file_path&gt; <span style="color:#4e9a06">\
|
||||
</span><span style="color:#4e9a06"></span> --from-file<span style="color:#ce5c00;font-weight:bold">=</span>user.crt<span style="color:#ce5c00;font-weight:bold">=</span>&lt;my_cert.pem_file_path&gt; <span style="color:#4e9a06">\
|
||||
</span><span style="color:#4e9a06"></span> --from-file<span style="color:#ce5c00;font-weight:bold">=</span>user.key<span style="color:#ce5c00;font-weight:bold">=</span>&lt;my_key.pem_file_path&gt;
|
||||
</code></pre></div><p><em>NOTE: <code>ca.crt</code> can be omitted to fallback to use system&rsquo;s root CA set.</em></p>
|
||||
<h2 id="kafka-producer-and-consumer-configurations">Kafka Producer and Consumer configurations</h2>
|
||||
<p>Knative exposes all available Kafka producer and consumer configurations that can be modified to suit your workloads.</p>
|
||||
<p>You can change these configurations by modifying the <code>config-kafka-broker-data-plane</code> <code>ConfigMap</code> in
|
||||
the <code>knative-eventing</code> namespace.</p>
|
||||
<p>Documentation for the settings available in this <code>ConfigMap</code> is available on the
|
||||
<a href="https://kafka.apache.org/documentation/">Apache Kafka website</a>,
|
||||
in particular, <a href="https://kafka.apache.org/documentation/#producerconfigs">Producer configurations</a>
|
||||
and <a href="https://kafka.apache.org/documentation/#consumerconfigs">Consumer configurations</a>.</p>
|
||||
<h2 id="enable-debug-logging-for-data-plane-components">Enable debug logging for data plane components</h2>
|
||||
<p>The following YAML shows the default logging configuration for data plane components, that is created during the
|
||||
installation step:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">ConfigMap</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">kafka-config-logging</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">namespace</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">knative-eventing</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">data</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">config.xml</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">|</span><span style="color:#8f5902;font-style:italic">
|
||||
</span><span style="color:#8f5902;font-style:italic"> &lt;configuration&gt;
|
||||
</span><span style="color:#8f5902;font-style:italic"> &lt;appender name=&#34;jsonConsoleAppender&#34; class=&#34;ch.qos.logback.core.ConsoleAppender&#34;&gt;
|
||||
</span><span style="color:#8f5902;font-style:italic"> &lt;encoder class=&#34;net.logstash.logback.encoder.LogstashEncoder&#34;/&gt;
|
||||
</span><span style="color:#8f5902;font-style:italic"> &lt;/appender&gt;
|
||||
</span><span style="color:#8f5902;font-style:italic"> &lt;root level=&#34;INFO&#34;&gt;
|
||||
</span><span style="color:#8f5902;font-style:italic"> &lt;appender-ref ref=&#34;jsonConsoleAppender&#34;/&gt;
|
||||
</span><span style="color:#8f5902;font-style:italic"> &lt;/root&gt;
|
||||
</span><span style="color:#8f5902;font-style:italic"> &lt;/configuration&gt;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><p>To change the logging level to <code>DEBUG</code>, you must:</p>
|
||||
<ol>
|
||||
<li>
|
||||
<p>Apply the following <code>kafka-config-logging</code> <code>ConfigMap</code> or replace <code>level=&quot;INFO&quot;</code> with <code>level=&quot;DEBUG&quot;</code> to the
|
||||
<code>ConfigMap</code> <code>kafka-config-logging</code>:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">ConfigMap</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">kafka-config-logging</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">namespace</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">knative-eventing</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">data</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">config.xml</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">|</span><span style="color:#8f5902;font-style:italic">
|
||||
</span><span style="color:#8f5902;font-style:italic"> &lt;configuration&gt;
|
||||
</span><span style="color:#8f5902;font-style:italic"> &lt;appender name=&#34;jsonConsoleAppender&#34; class=&#34;ch.qos.logback.core.ConsoleAppender&#34;&gt;
|
||||
</span><span style="color:#8f5902;font-style:italic"> &lt;encoder class=&#34;net.logstash.logback.encoder.LogstashEncoder&#34;/&gt;
|
||||
</span><span style="color:#8f5902;font-style:italic"> &lt;/appender&gt;
|
||||
</span><span style="color:#8f5902;font-style:italic"> &lt;root level=&#34;DEBUG&#34;&gt;
|
||||
</span><span style="color:#8f5902;font-style:italic"> &lt;appender-ref ref=&#34;jsonConsoleAppender&#34;/&gt;
|
||||
</span><span style="color:#8f5902;font-style:italic"> &lt;/root&gt;
|
||||
</span><span style="color:#8f5902;font-style:italic"> &lt;/configuration&gt;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div></li>
|
||||
<li>
|
||||
<p>Restart the <code>kafka-broker-receiver</code> and the <code>kafka-broker-dispatcher</code>, by entering the following commands:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-bash" data-lang="bash">kubectl rollout restart deployment -n knative-eventing kafka-broker-receiver
|
||||
kubectl rollout restart deployment -n knative-eventing kafka-broker-dispatcher
|
||||
</code></pre></div></li>
|
||||
</ol>
|
||||
<h2 id="configuring-the-order-of-delivered-events">Configuring the order of delivered events</h2>
|
||||
<p>When dispatching events, the Kafka broker can be configured to support different delivery ordering guarantees.</p>
|
||||
<p>You can configure the delivery order of events using the <code>kafka.eventing.knative.dev/delivery.order</code> annotation on the <code>Trigger</code> object:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">eventing.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Trigger</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">my-service-trigger</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">annotations</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kafka.eventing.knative.dev/delivery.order</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">ordered</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">broker</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">my-kafka-broker</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">subscriber</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">ref</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">serving.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">my-service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><p>The supported consumer delivery guarantees are:</p>
|
||||
<ul>
|
||||
<li><code>unordered</code>: An unordered consumer is a non-blocking consumer that delivers messages unordered, while preserving proper offset management.</li>
|
||||
<li><code>ordered</code>: An ordered consumer is a per-partition blocking consumer that waits for a successful response from the CloudEvent subscriber before it delivers the next message of the partition.</li>
|
||||
</ul>
|
||||
<p><code>unordered</code> is the default ordering guarantee, while <strong><code>ordered</code> is considered unstable, use with caution</strong>.</p>
|
||||
<h3 id="additional-information">Additional information</h3>
|
||||
<ul>
|
||||
<li>To report a bug or request a feature, open an issue in the <a href="https://github.com/knative-sandbox/eventing-kafka-broker">eventing-kafka-broker repository</a>.</li>
|
||||
</ul>
|
||||
|
||||
</description>
|
||||
</item>
|
||||
|
||||
</channel>
|
||||
</rss>
|
|
@ -1 +0,0 @@
|
|||
<!DOCTYPE html><html><head><title>https://knative.dev/v0.23-docs/eventing/broker/kafka-broker/kafka-configmap/</title><link rel="canonical" href="https://knative.dev/v0.23-docs/eventing/broker/kafka-broker/kafka-configmap/"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=https://knative.dev/v0.23-docs/eventing/broker/kafka-broker/kafka-configmap/" /></head></html>
|
|
@ -1,67 +0,0 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Knative – Apache Kafka Broker</title>
|
||||
<link>https://knative.dev/v0.23-docs/eventing/broker/kafka-broker/</link>
|
||||
<description>Recent content in Apache Kafka Broker on Knative</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
|
||||
<atom:link href="https://knative.dev/v0.23-docs/eventing/broker/kafka-broker/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<item>
|
||||
<title>V0.23-Docs: Kafka Channel ConfigMap</title>
|
||||
<link>https://knative.dev/v0.23-docs/eventing/broker/kafka-broker/kafka-configmap/</link>
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>https://knative.dev/v0.23-docs/eventing/broker/kafka-broker/kafka-configmap/</guid>
|
||||
<description>
|
||||
|
||||
|
||||
<p><strong>NOTE:</strong> This guide assumes Knative Eventing is installed in the <code>knative-eventing</code>
|
||||
namespace. If you have installed Knative Eventing in a different namespace, replace
|
||||
<code>knative-eventing</code> with the name of that namespace.</p>
|
||||
<p>To use Kafka channels, you must create a YAML file that specifies how these
|
||||
channels will be created.</p>
|
||||
<p><strong>NOTE:</strong> You must install the Kafka Channel first.</p>
|
||||
<p>You can copy the following sample code into your <code>kafka-channel</code> ConfigMap:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">ConfigMap</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">kafka-channel</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">namespace</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">knative-eventing</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">data</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">channelTemplateSpec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">|</span><span style="color:#8f5902;font-style:italic">
|
||||
</span><span style="color:#8f5902;font-style:italic"> apiVersion: messaging.knative.dev/v1beta1
|
||||
</span><span style="color:#8f5902;font-style:italic"> kind: KafkaChannel
|
||||
</span><span style="color:#8f5902;font-style:italic"> spec:
|
||||
</span><span style="color:#8f5902;font-style:italic"> numPartitions: 3
|
||||
</span><span style="color:#8f5902;font-style:italic"> replicationFactor: 1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><p><strong>NOTE:</strong> This example specifies two extra parameters that are specific to Kafka
|
||||
Channels; <code>numPartitions</code> and <code>replicationFactor</code>.</p>
|
||||
<p>To create a Broker that uses the KafkaChannel, specify the <code>kafka-channel</code> ConfigMap:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">kubectl create -f - <span style="color:#4e9a06">&lt;&lt;EOF
|
||||
</span><span style="color:#4e9a06">apiVersion: eventing.knative.dev/v1
|
||||
</span><span style="color:#4e9a06">kind: Broker
|
||||
</span><span style="color:#4e9a06">metadata:
|
||||
</span><span style="color:#4e9a06"> annotations:
|
||||
</span><span style="color:#4e9a06"> eventing.knative.dev/broker.class: MTChannelBasedBroker
|
||||
</span><span style="color:#4e9a06"> name: kafka-backed-broker
|
||||
</span><span style="color:#4e9a06"> namespace: default
|
||||
</span><span style="color:#4e9a06">spec:
|
||||
</span><span style="color:#4e9a06"> config:
|
||||
</span><span style="color:#4e9a06"> apiVersion: v1
|
||||
</span><span style="color:#4e9a06"> kind: ConfigMap
|
||||
</span><span style="color:#4e9a06"> name: kafka-channel
|
||||
</span><span style="color:#4e9a06"> namespace: knative-eventing
|
||||
</span><span style="color:#4e9a06">EOF</span>
|
||||
</code></pre></div>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
</channel>
|
||||
</rss>
|
|
@ -1,17 +0,0 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Knative – Triggers</title>
|
||||
<link>https://knative.dev/v0.23-docs/eventing/broker/triggers/</link>
|
||||
<description>Recent content in Triggers on Knative</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
|
||||
<atom:link href="https://knative.dev/v0.23-docs/eventing/broker/triggers/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</channel>
|
||||
</rss>
|
|
@ -1,32 +0,0 @@
|
|||
# List of available Channel implementation for persistence of the events associated with a given channel
|
||||
channels:
|
||||
- name: InMemoryChannel
|
||||
url: https://github.com/knative/eventing/tree/{{< branch >}}/config/channels/in-memory-channel/README.md
|
||||
status: Proof of Concept
|
||||
support: None
|
||||
description: >
|
||||
In-memory channels are a best effort Channel. They should NOT be used in Production. They are useful for development.
|
||||
- name: KafkaChannel
|
||||
url: https://github.com/knative-sandbox/eventing-kafka/tree/{{< branch >}}/pkg/channel/consolidated/README.md
|
||||
status: Proof of Concept
|
||||
support: None
|
||||
description: >
|
||||
Channels are backed by [Apache Kafka](http://kafka.apache.org/) topics.
|
||||
- name: NatssChannel
|
||||
url: https://github.com/knative-sandbox/eventing-natss/tree/{{< branch >}}/config/README.md
|
||||
status: Proof of Concept
|
||||
support: None
|
||||
description: >
|
||||
Channels are backed by [NATS Streaming](https://github.com/nats-io/nats-streaming-server#configuring).
|
||||
- name: GCP PubSub
|
||||
url: https://github.com/google/knative-gcp
|
||||
status: Proof of Concept
|
||||
support: None
|
||||
description: >
|
||||
Channels are backed by [GCP PubSub](https://cloud.google.com/pubsub/).
|
||||
- name: Knative sandbox channel that uses Confluent Go Client, and the librdkafka C library
|
||||
url: https://github.com/knative-sandbox/eventing-kafka
|
||||
status: Proof of Concept
|
||||
support: None
|
||||
description: >
|
||||
Kafka Channel implementation, contributed by SAP's Kyma project, is a Knative Eventing implementation of a Kafka backed channel which provides advanced functionality and production grade qualities.
|
|
@ -1 +0,0 @@
|
|||
<!DOCTYPE html><html><head><title>https://knative.dev/v0.22-docs/eventing/channels/</title><link rel="canonical" href="https://knative.dev/v0.22-docs/eventing/channels/"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=https://knative.dev/v0.22-docs/eventing/channels/" /></head></html>
|
|
@ -1,37 +0,0 @@
|
|||
---
|
||||
title: "Available Channels"
|
||||
#linkTitle: "Channels"
|
||||
weight: 40
|
||||
type: "docs"
|
||||
---
|
||||
|
||||
{{ "" }}
|
||||
|
||||
{{- /* This will be interpreted given a yamlChannels object. */ -}}
|
||||
|
||||
{{- /* Ignore this next paragraph, it is only intended in the generated markdown, not here. */ -}}
|
||||
<!--
|
||||
This is a generated file and should not be changed manually. All changes should follow the
|
||||
procedure:
|
||||
|
||||
1. Update the information in [`channels.yaml`](channels.yaml).
|
||||
|
||||
2. Run the generator tool:
|
||||
```shell
|
||||
go run eventing/channels/generator/main.go
|
||||
```
|
||||
-->
|
||||
|
||||
This is a non-exhaustive list of the available Channels for Knative Eventing.
|
||||
|
||||
Notes:
|
||||
|
||||
* Inclusion in this list is not an endorsement, nor does it imply any level of
|
||||
support.
|
||||
|
||||
Name | Status | Support | Description
|
||||
--- | --- | --- | ---
|
||||
{{ range .Channels -}}
|
||||
[{{ .Name }}]({{ .Url }}) | {{ .Status }} | {{ .Support }} | {{ .Description }}
|
||||
{{- end }}
|
||||
|
|
@ -1,105 +0,0 @@
|
|||
/*
|
||||
Copyright 2019 The Knative Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
"sort"
|
||||
"text/template"
|
||||
|
||||
yaml "gopkg.in/yaml.v2"
|
||||
)
|
||||
|
||||
var (
|
||||
yamlFile = flag.String("yaml", "eventing/channels/channels.yaml", "The YAML file to parse to generate the mark down.")
|
||||
templateFile = flag.String("template", "eventing/channels/generator/ReadmeTemplate.gomd", "The template file to fill in.")
|
||||
mdFile = flag.String("md", "eventing/channels/channels-crds.md", "The mark down file to write to. Any existing file will be overwritten.")
|
||||
)
|
||||
|
||||
func main() {
|
||||
flag.Parse()
|
||||
|
||||
yamlChannels := parseYaml()
|
||||
tmpl := createTemplate()
|
||||
writeMarkdown(yamlChannels, tmpl)
|
||||
}
|
||||
|
||||
func parseYaml() *yamlChannels {
|
||||
fileBytes, err := ioutil.ReadFile(*yamlFile)
|
||||
if err != nil {
|
||||
log.Fatalf("Unable to read the YAML file '%s': %v", *yamlFile, err)
|
||||
}
|
||||
|
||||
channels := &yamlChannels{}
|
||||
err = yaml.UnmarshalStrict(fileBytes, channels)
|
||||
if err != nil {
|
||||
log.Fatalf("Unable to unmarshal the YAML file '%s': %v", *yamlFile, err)
|
||||
}
|
||||
|
||||
// Sort the three lists.
|
||||
sortAlphabetically(channels.Channels)
|
||||
|
||||
return channels
|
||||
}
|
||||
|
||||
func sortAlphabetically(slice []channel) {
|
||||
sortByName := func(i, j int) bool {
|
||||
return slice[i].Name < slice[j].Name
|
||||
}
|
||||
sort.SliceStable(slice, sortByName)
|
||||
}
|
||||
|
||||
type yamlChannels struct {
|
||||
Channels []channel `yaml:"channels"`
|
||||
}
|
||||
|
||||
type channel struct {
|
||||
Name string `yaml:"name"`
|
||||
Url string `yaml:"url"`
|
||||
Status string `yaml:"status"` // TODO Make this an enum.
|
||||
Support string `yaml:"support"`
|
||||
Description string `yaml:"description"`
|
||||
}
|
||||
|
||||
func createTemplate() *template.Template {
|
||||
fileBytes, err := ioutil.ReadFile(*templateFile)
|
||||
if err != nil {
|
||||
log.Fatalf("Unable to read the template file '%s': %v", *templateFile, err)
|
||||
}
|
||||
fileString := string(fileBytes)
|
||||
tmpl, err := template.New("markdown template").Parse(fileString)
|
||||
if err != nil {
|
||||
log.Fatalf("Unable to parse the template file '%s': %v", *templateFile, err)
|
||||
}
|
||||
return tmpl
|
||||
}
|
||||
|
||||
func writeMarkdown(yamlChannels *yamlChannels, tmpl *template.Template) {
|
||||
md, err := os.Create(*mdFile)
|
||||
if err != nil {
|
||||
log.Fatalf("Unable to create the markdown file '%s': %v", *mdFile, err)
|
||||
}
|
||||
defer md.Close()
|
||||
|
||||
err = tmpl.Execute(md, yamlChannels)
|
||||
if err != nil {
|
||||
log.Fatalf("Unable to execute the template: %v", err)
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 33 KiB |
|
@ -1,376 +0,0 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Knative – Channels</title>
|
||||
<link>https://knative.dev/v0.23-docs/eventing/channels/</link>
|
||||
<description>Recent content in Channels on Knative</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
|
||||
<atom:link href="https://knative.dev/v0.23-docs/eventing/channels/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<item>
|
||||
<title>V0.23-Docs: Channel types and defaults</title>
|
||||
<link>https://knative.dev/v0.23-docs/eventing/channels/channel-types-defaults/</link>
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>https://knative.dev/v0.23-docs/eventing/channels/channel-types-defaults/</guid>
|
||||
<description>
|
||||
|
||||
|
||||
<p>Knative provides the InMemoryChannel channel implementation by default. This default implementation is useful for developers who do not want to configure a specific implementation type, such as Apache Kafka or NATSS channels.</p>
|
||||
<p><strong>NOTE:</strong> InMemoryChannel channels should not be used in production environments.</p>
|
||||
<p>The default channel implementation is specified in the <code>default-ch-webhook</code> ConfigMap in the <code>knative-eventing</code> namespace.
|
||||
For more information about modifying ConfigMaps, see <a href="../../../../docs/install/operator/configuring-eventing-cr">Configuring the Eventing Operator custom resource</a>.</p>
|
||||
<p>In the following example, the cluster default channel implementation is InMemoryChannel, while the namespace default channel implementation for the <code>example-namespace</code> is KafkaChannel.</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">ConfigMap</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">default-ch-webhook</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">namespace</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">knative-eventing</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">data</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">default-ch-config</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000;font-weight:bold">|</span><span style="color:#8f5902;font-style:italic">
|
||||
</span><span style="color:#8f5902;font-style:italic"> clusterDefault:
|
||||
</span><span style="color:#8f5902;font-style:italic"> apiVersion: messaging.knative.dev/v1
|
||||
</span><span style="color:#8f5902;font-style:italic"> kind: InMemoryChannel
|
||||
</span><span style="color:#8f5902;font-style:italic"> namespaceDefaults:
|
||||
</span><span style="color:#8f5902;font-style:italic"> example-namespace:
|
||||
</span><span style="color:#8f5902;font-style:italic"> apiVersion: messaging.knative.dev/v1beta1
|
||||
</span><span style="color:#8f5902;font-style:italic"> kind: KafkaChannel
|
||||
</span><span style="color:#8f5902;font-style:italic"> spec:
|
||||
</span><span style="color:#8f5902;font-style:italic"> numPartitions: 2
|
||||
</span><span style="color:#8f5902;font-style:italic"> replicationFactor: 1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><p>Default channels can be configured for the cluster, a namespace on the cluster, or both.</p>
|
||||
<p><strong>NOTE:</strong> If a default channel implementation is configured for a namespace, this will overwrite the configuration for the cluster.</p>
|
||||
<h2 id="next-steps">Next steps</h2>
|
||||
<ul>
|
||||
<li>Create an <a href="../../../create-default-channel">InMemoryChannel</a></li>
|
||||
</ul>
|
||||
|
||||
</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>V0.23-Docs: Creating a channel using cluster or namespace defaults</title>
|
||||
<link>https://knative.dev/v0.23-docs/eventing/channels/create-default-channel/</link>
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>https://knative.dev/v0.23-docs/eventing/channels/create-default-channel/</guid>
|
||||
<description>
|
||||
|
||||
|
||||
<p>Developers can create channels of any supported implementation type by creating an instance of a Channel object.</p>
|
||||
<ol>
|
||||
<li>
|
||||
<p>Create a Channel object:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">messaging.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Channel</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">my-channel</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">namespace</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">default</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><p>Since this object is created in the <code>default</code> namespace, according to the default ConfigMap example in the previous section, it will be an InMemoryChannel channel implementation.</p>
|
||||
</li>
|
||||
</ol>
|
||||
<!--TODO: Add tabs for kn etc-->
|
||||
<ol start="2">
|
||||
<li>
|
||||
<p>After the Channel object is created, a mutating admission webhook sets the
|
||||
<code>spec.channelTemplate</code> based on the default channel implementation:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">messaging.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Channel</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">my-channel</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">namespace</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">default</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">channelTemplate</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">messaging.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">InMemoryChannel</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><p><strong>NOTE:</strong> The <code>spec.channelTemplate</code> property cannot be changed after creation, since it is set by the default channel mechanism, not the user.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>The channel controller creates a backing channel instance
|
||||
based on the <code>spec.channelTemplate</code>.</p>
|
||||
<p>When this mechanism is used, two objects are created, a generic Channel object, and an InMemoryChannel object. The generic object acts as a proxy for the InMemoryChannel object, by copying its subscriptions to and setting its status to that of the InMemoryChannel object.</p>
|
||||
</li>
|
||||
</ol>
|
||||
<p><strong>NOTE:</strong> Defaults only apply on object creation. Defaults are applied by the webhook only on Channel or Sequence creation. If the default settings change, the new defaults will only apply to newly-created channels, brokers, or sequences. Existing ones will not change.</p>
|
||||
|
||||
</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>V0.23-Docs: Available Channels</title>
|
||||
<link>https://knative.dev/v0.23-docs/eventing/channels/channels-crds/</link>
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>https://knative.dev/v0.23-docs/eventing/channels/channels-crds/</guid>
|
||||
<description>
|
||||
|
||||
|
||||
<!--
|
||||
This is a generated file and should not be changed manually. All changes should follow the
|
||||
procedure:
|
||||
|
||||
1. Update the information in [`channels.yaml`](channels.yaml).
|
||||
|
||||
2. Run the generator tool:
|
||||
```shell
|
||||
go run eventing/channels/generator/main.go
|
||||
```
|
||||
-->
|
||||
<p>This is a non-exhaustive list of the available Channels for Knative Eventing.</p>
|
||||
<p>Notes:</p>
|
||||
<ul>
|
||||
<li>Inclusion in this list is not an endorsement, nor does it imply any level of
|
||||
support.</li>
|
||||
</ul>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Status</th>
|
||||
<th>Support</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a href="https://github.com/google/knative-gcp">GCP PubSub</a></td>
|
||||
<td>Proof of Concept</td>
|
||||
<td>None</td>
|
||||
<td>Channels are backed by <a href="https://cloud.google.com/pubsub/">GCP PubSub</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://github.com/knative/eventing/tree/release-0.23/config/channels/in-memory-channel/README.md">InMemoryChannel</a></td>
|
||||
<td>Proof of Concept</td>
|
||||
<td>None</td>
|
||||
<td>In-memory channels are a best effort Channel. They should NOT be used in Production. They are useful for development.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://github.com/knative-sandbox/eventing-kafka/tree/release-0.23/pkg/channel/consolidated/README.md">KafkaChannel - Consolidated</a></td>
|
||||
<td>Proof of Concept</td>
|
||||
<td>None</td>
|
||||
<td>Channels are backed by <a href="http://kafka.apache.org/">Apache Kafka</a> topics. The original Knative KafkaChannel implementation which utilizes a single combined Kafka Producer / Consumer deployment.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://github.com/knative-sandbox/eventing-kafka/tree/release-0.23/pkg/channel/distributed/README.md">KafkaChannel - Distributed</a></td>
|
||||
<td>Proof of Concept</td>
|
||||
<td>None</td>
|
||||
<td>Channels are backed by <a href="http://kafka.apache.org/">Apache Kafka</a> topics. An alternate KafkaChannel implementation, contributed by SAP&rsquo;s <a href="https://kyma-project.io/">Kyma</a> project, which provides a more granular deployment of Producers / Consumers.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://github.com/knative-sandbox/eventing-natss/tree/release-0.23/config/README.md">NatssChannel</a></td>
|
||||
<td>Proof of Concept</td>
|
||||
<td>None</td>
|
||||
<td>Channels are backed by <a href="https://github.com/nats-io/nats-streaming-server#configuring">NATS Streaming</a>.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>V0.23-Docs: Subscriptions</title>
|
||||
<link>https://knative.dev/v0.23-docs/eventing/channels/subscriptions/</link>
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>https://knative.dev/v0.23-docs/eventing/channels/subscriptions/</guid>
|
||||
<description>
|
||||
|
||||
|
||||
<p>After you have created a channel and a sink, you can create a subscription to enable event delivery.</p>
|
||||
<h2 id="creating-a-subscription">Creating a subscription</h2>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="nav nav-tabs" id="creating-a-subscription" role="tablist">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link active" id="creating-a-subscription-0-tab" data-toggle="tab" href="#creating-a-subscription-0" role="tab" aria-controls="creating-a-subscription-0" aria-selected="true">kn</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="nav-item ">
|
||||
<a class="nav-link " id="creating-a-subscription-1-tab" data-toggle="tab" href="#creating-a-subscription-1" role="tab" aria-controls="creating-a-subscription-1" aria-selected="true">YAML</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<div class="tab-content" >
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="tab-pane fade show active" id="creating-a-subscription-0" role="tabpanel" aria-labelledby="creating-a-subscription-0-tab">
|
||||
|
||||
<p>Create a subscription between a channel and a sink:</p>
|
||||
<pre><code>kn subscription create &lt;subscription_name&gt; \
|
||||
--channel &lt;Group:Version:Kind&gt;:&lt;channel_name&gt; \
|
||||
--sink &lt;sink_prefix&gt;:&lt;sink_name&gt; \
|
||||
--sink-reply &lt;sink_prefix&gt;:&lt;sink_name&gt; \
|
||||
--sink-dead-letter &lt;sink_prefix&gt;:&lt;sink_name&gt;
|
||||
</code></pre><ul>
|
||||
<li>
|
||||
<p><code>--channel</code> specifies the source for cloud events that should be processed. You must provide the channel name. If you are not using the default channel that is backed by the Channel resource, you must prefix the channel name with the <code>&lt;Group:Version:Kind&gt;</code> for the specified channel type. For example, this will be <code>messaging.knative.dev:v1beta1:KafkaChannel</code> for a Kafka backed channel.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>--sink</code> specifies the target destination to which the event should be delivered. By default, the <code>&lt;sink_name&gt;</code> is interpreted as a Knative service of this name, in the same namespace as the subscription. You can specify the type of the sink by using one of the following prefixes:</p>
|
||||
<ul>
|
||||
<li><code>ksvc</code>: A Knative service.</li>
|
||||
<li><code>svc</code>: A Kubernetes Service.</li>
|
||||
<li><code>channel</code>: A channel that should be used as destination. Only default channel types can be referenced here.</li>
|
||||
<li><code>broker</code>: An Eventing broker.
|
||||
<br>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<p><code>--sink-reply</code> and <code>--sink-dead-letter</code> are optional arguments. They can be used to specify where the sink reply will be sent to, and where to send the cloud event in case of a failure, respectively. Both use the same naming conventions for specifying the sink as the <code>--sink</code> flag.</p>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Example command:</p>
|
||||
<pre><code>kn subscription create mysubscription --channel mychannel --sink ksvc:myservice
|
||||
</code></pre><p>This example command creates a channel named <code>mysubscription</code>, that routes events from a channel named <code>mychannel</code> to a Knative service named <code>myservice</code>.</p>
|
||||
<p><strong>NOTE:</strong> The sink prefix is optional. It is also possible to specify the service for <code>--sink</code> as just <code>--sink &lt;service_name&gt;</code> and omit the <code>ksvc</code> prefix.</p>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="tab-pane fade " id="creating-a-subscription-1" role="tabpanel" aria-labelledby="creating-a-subscription-1-tab">
|
||||
|
||||
<ol>
|
||||
<li>
|
||||
<p>Create a Subscription object in a YAML file:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">messaging.knative.dev/v1beta1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Subscription</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">&lt;subscription_name&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Name of the subscription.</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">namespace</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">default</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">channel</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">messaging.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Channel</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">&lt;channel_name&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Configuration settings for the channel that the subscription connects to.</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">delivery</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">deadLetterSink</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">ref</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">serving.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">&lt;service_name&gt;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Configuration settings for event delivery.</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># This tells the subscription what happens to events that cannot be delivered to the subscriber.</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># When this is configured, events that failed to be consumed are sent to the deadLetterSink.</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># The event is dropped, no re-delivery of the event is attempted, and an error is logged in the system.</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># The deadLetterSink value must be a Destination.</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">subscriber</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">ref</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">serving.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">&lt;service_name&gt;</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#8f5902;font-style:italic"># Configuration settings for the subscriber. This is the event sink that events are delivered to from the channel.</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div></li>
|
||||
<li>
|
||||
<p>Apply the YAML file:</p>
|
||||
<pre><code>kubectl apply -f &lt;filename&gt;
|
||||
</code></pre></li>
|
||||
</ol>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<h2 id="listing-subscriptions">Listing subscriptions</h2>
|
||||
<p>You can list all existing subscriptions by using the <code>kn</code> CLI tool.</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>List all subscriptions:</p>
|
||||
<pre><code>kn subscription list
|
||||
</code></pre></li>
|
||||
<li>
|
||||
<p>List subscriptions in YAML format:</p>
|
||||
<pre><code>kn subscription list -o yaml
|
||||
</code></pre></li>
|
||||
</ul>
|
||||
<h2 id="describing-a-subscription">Describing a subscription</h2>
|
||||
<p>You can print details about a subscription by using the <code>kn</code> CLI tool:</p>
|
||||
<pre><code>kn subscription describe &lt;subscription_name&gt;
|
||||
</code></pre><!--TODO: Add an example command and output-->
|
||||
<!--TODO: Add details for kn subscription update - existing generated docs weren't clear enough, need better explained examples-->
|
||||
<h2 id="deleting-subscriptions">Deleting subscriptions</h2>
|
||||
<p>You can delete a subscription by using the <code>kn</code> or <code>kubectl</code> CLI tools.</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ul class="nav nav-tabs" id="deleting-a-subscription" role="tablist">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link active" id="deleting-a-subscription-0-tab" data-toggle="tab" href="#deleting-a-subscription-0" role="tab" aria-controls="deleting-a-subscription-0" aria-selected="true">kn</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="nav-item ">
|
||||
<a class="nav-link " id="deleting-a-subscription-1-tab" data-toggle="tab" href="#deleting-a-subscription-1" role="tab" aria-controls="deleting-a-subscription-1" aria-selected="true">kubectl</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<div class="tab-content" >
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="tab-pane fade show active" id="deleting-a-subscription-0" role="tabpanel" aria-labelledby="deleting-a-subscription-0-tab">
|
||||
|
||||
<pre><code>kn subscription delete &lt;subscription_name&gt;
|
||||
</code></pre>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="tab-pane fade " id="deleting-a-subscription-1" role="tabpanel" aria-labelledby="deleting-a-subscription-1-tab">
|
||||
|
||||
<pre><code>kubectl subscription delete &lt;subscription_name&gt;
|
||||
</code></pre>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</description>
|
||||
</item>
|
||||
|
||||
</channel>
|
||||
</rss>
|
|
@ -1 +0,0 @@
|
|||
<!DOCTYPE html><html><head><title>https://knative.dev/v0.23-docs/eventing/sources/ping-source/</title><link rel="canonical" href="https://knative.dev/v0.23-docs/eventing/sources/ping-source/"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=https://knative.dev/v0.23-docs/eventing/sources/ping-source/" /></head></html>
|
|
@ -1,610 +0,0 @@
|
|||
[
|
||||
{
|
||||
"duration": 19629,
|
||||
"id": "d48b4d96bb46c90f",
|
||||
"kind": "CLIENT",
|
||||
"localEndpoint": {
|
||||
"ipv4": "10.32.2.177",
|
||||
"port": 80,
|
||||
"serviceName": "br-broker-filter.includes-incoming-trace-id-2qszn"
|
||||
},
|
||||
"name": "/",
|
||||
"parentId": "cfb0c6b6b6104c7b",
|
||||
"tags": {
|
||||
"http.host": "",
|
||||
"http.method": "POST",
|
||||
"http.path": "/",
|
||||
"http.status_code": "200",
|
||||
"http.url": "http://transformer.includes-incoming-trace-id-2qszn.svc.cluster.local/",
|
||||
"opencensus.status_description": "OK"
|
||||
},
|
||||
"timestamp": 1571264371922002,
|
||||
"traceId": "ee46c4c6be1df717b3b82f55b531912f"
|
||||
},
|
||||
{
|
||||
"duration": 1700,
|
||||
"id": "eb4e31d92bc59aa4",
|
||||
"kind": "CLIENT",
|
||||
"localEndpoint": {
|
||||
"ipv4": "10.32.12.23",
|
||||
"port": 80,
|
||||
"serviceName": "br-broker.includes-incoming-trace-id-2qszn"
|
||||
},
|
||||
"name": "/",
|
||||
"parentId": "c6b6bb23406d262b",
|
||||
"tags": {
|
||||
"http.host": "",
|
||||
"http.method": "POST",
|
||||
"http.path": "/",
|
||||
"http.status_code": "202",
|
||||
"http.url": "http://br-kne-trigger-kn-channel.includes-incoming-trace-id-2qszn.svc.cluster.local/",
|
||||
"opencensus.status_description": "OK"
|
||||
},
|
||||
"timestamp": 1571264371972214,
|
||||
"traceId": "ee46c4c6be1df717b3b82f55b531912f"
|
||||
},
|
||||
{
|
||||
"annotations": [
|
||||
{
|
||||
"timestamp": 1571264371971464,
|
||||
"value": "Received 89 bytes"
|
||||
}
|
||||
],
|
||||
"duration": 2667,
|
||||
"id": "c6b6bb23406d262b",
|
||||
"kind": "SERVER",
|
||||
"localEndpoint": {
|
||||
"ipv4": "10.32.12.23",
|
||||
"port": 80,
|
||||
"serviceName": "br-broker.includes-incoming-trace-id-2qszn"
|
||||
},
|
||||
"name": "/",
|
||||
"parentId": "b4c0ea8c8dcca58c",
|
||||
"tags": {
|
||||
"http.host": "br-broker.includes-incoming-trace-id-2qszn.svc.cluster.local",
|
||||
"http.method": "POST",
|
||||
"http.path": "/",
|
||||
"http.status_code": "202",
|
||||
"http.url": "/",
|
||||
"http.user_agent": "Go-http-client/1.1",
|
||||
"opencensus.status_description": "OK"
|
||||
},
|
||||
"timestamp": 1571264371971443,
|
||||
"traceId": "ee46c4c6be1df717b3b82f55b531912f"
|
||||
},
|
||||
{
|
||||
"annotations": [
|
||||
{
|
||||
"timestamp": 1571264371920838,
|
||||
"value": "Received 79 bytes"
|
||||
},
|
||||
{
|
||||
"timestamp": 1571264371941945,
|
||||
"value": "Sent 89 bytes"
|
||||
}
|
||||
],
|
||||
"duration": 21519,
|
||||
"id": "cfb0c6b6b6104c7b",
|
||||
"kind": "SERVER",
|
||||
"localEndpoint": {
|
||||
"ipv4": "10.32.2.177",
|
||||
"port": 80,
|
||||
"serviceName": "br-broker-filter.includes-incoming-trace-id-2qszn"
|
||||
},
|
||||
"name": "/triggers/includes-incoming-trace-id-2qszn/transformer/f89da9fb-f062-11e9-8de0-42010a800086",
|
||||
"parentId": "5b25cd8f149589c0",
|
||||
"tags": {
|
||||
"http.host": "br-broker-filter.includes-incoming-trace-id-2qszn.svc.cluster.local",
|
||||
"http.method": "POST",
|
||||
"http.path": "/triggers/includes-incoming-trace-id-2qszn/transformer/f89da9fb-f062-11e9-8de0-42010a800086",
|
||||
"http.status_code": "202",
|
||||
"http.url": "/triggers/includes-incoming-trace-id-2qszn/transformer/f89da9fb-f062-11e9-8de0-42010a800086",
|
||||
"http.user_agent": "Go-http-client/1.1",
|
||||
"opencensus.status_description": "OK"
|
||||
},
|
||||
"timestamp": 1571264371920446,
|
||||
"traceId": "ee46c4c6be1df717b3b82f55b531912f"
|
||||
},
|
||||
{
|
||||
"annotations": [
|
||||
{
|
||||
"timestamp": 1571264371974164,
|
||||
"value": "Received 89 bytes"
|
||||
}
|
||||
],
|
||||
"duration": 23878,
|
||||
"id": "d966d475c07c46a4",
|
||||
"kind": "SERVER",
|
||||
"localEndpoint": {
|
||||
"ipv4": "10.32.2.177",
|
||||
"port": 80,
|
||||
"serviceName": "br-broker-filter.includes-incoming-trace-id-2qszn"
|
||||
},
|
||||
"name": "/triggers/includes-incoming-trace-id-2qszn/logger/f8804e2a-f062-11e9-8de0-42010a800086",
|
||||
"parentId": "cf78241d2df4b9b0",
|
||||
"tags": {
|
||||
"http.host": "br-broker-filter.includes-incoming-trace-id-2qszn.svc.cluster.local",
|
||||
"http.method": "POST",
|
||||
"http.path": "/triggers/includes-incoming-trace-id-2qszn/logger/f8804e2a-f062-11e9-8de0-42010a800086",
|
||||
"http.status_code": "202",
|
||||
"http.url": "/triggers/includes-incoming-trace-id-2qszn/logger/f8804e2a-f062-11e9-8de0-42010a800086",
|
||||
"http.user_agent": "Go-http-client/1.1",
|
||||
"opencensus.status_description": "OK"
|
||||
},
|
||||
"timestamp": 1571264371974140,
|
||||
"traceId": "ee46c4c6be1df717b3b82f55b531912f"
|
||||
},
|
||||
{
|
||||
"duration": 42942,
|
||||
"id": "5b25cd8f149589c0",
|
||||
"kind": "CLIENT",
|
||||
"localEndpoint": {
|
||||
"ipv4": "10.32.1.43",
|
||||
"port": 80,
|
||||
"serviceName": "imc-dispatcher"
|
||||
},
|
||||
"name": "/triggers/includes-incoming-trace-id-2qszn/transformer/f89da9fb-f062-11e9-8de0-42010a800086",
|
||||
"parentId": "1d42e9223b858118",
|
||||
"tags": {
|
||||
"http.host": "",
|
||||
"http.method": "POST",
|
||||
"http.path": "/triggers/includes-incoming-trace-id-2qszn/transformer/f89da9fb-f062-11e9-8de0-42010a800086",
|
||||
"http.status_code": "202",
|
||||
"http.url": "http://br-broker-filter.includes-incoming-trace-id-2qszn.svc.cluster.local/triggers/includes-incoming-trace-id-2qszn/transformer/f89da9fb-f062-11e9-8de0-42010a800086",
|
||||
"opencensus.status_description": "OK"
|
||||
},
|
||||
"timestamp": 1571264371900088,
|
||||
"traceId": "ee46c4c6be1df717b3b82f55b531912f"
|
||||
},
|
||||
{
|
||||
"annotations": [
|
||||
{
|
||||
"timestamp": 1571264371957188,
|
||||
"value": "Received 89 bytes"
|
||||
}
|
||||
],
|
||||
"duration": 398,
|
||||
"id": "76dd0620b4bc9de4",
|
||||
"kind": "SERVER",
|
||||
"localEndpoint": {
|
||||
"ipv4": "10.32.1.43",
|
||||
"port": 80,
|
||||
"serviceName": "imc-dispatcher"
|
||||
},
|
||||
"name": "/",
|
||||
"parentId": "d7eb9469c7b49910",
|
||||
"tags": {
|
||||
"http.host": "br-kne-ingress-kn-channel.includes-incoming-trace-id-2qszn.svc.cluster.local",
|
||||
"http.method": "POST",
|
||||
"http.path": "/",
|
||||
"http.status_code": "202",
|
||||
"http.url": "/",
|
||||
"http.user_agent": "Go-http-client/1.1",
|
||||
"opencensus.status_description": "OK"
|
||||
},
|
||||
"timestamp": 1571264371957174,
|
||||
"traceId": "ee46c4c6be1df717b3b82f55b531912f"
|
||||
},
|
||||
{
|
||||
"duration": 14477,
|
||||
"id": "d7eb9469c7b49910",
|
||||
"kind": "CLIENT",
|
||||
"localEndpoint": {
|
||||
"ipv4": "10.32.1.43",
|
||||
"port": 80,
|
||||
"serviceName": "imc-dispatcher"
|
||||
},
|
||||
"parentId": "1d42e9223b858118",
|
||||
"tags": {
|
||||
"http.host": "",
|
||||
"http.method": "POST",
|
||||
"http.path": "",
|
||||
"http.status_code": "202",
|
||||
"http.url": "http://br-kne-ingress-kn-channel.includes-incoming-trace-id-2qszn.svc.cluster.local",
|
||||
"opencensus.status_description": "OK"
|
||||
},
|
||||
"timestamp": 1571264371943313,
|
||||
"traceId": "ee46c4c6be1df717b3b82f55b531912f"
|
||||
},
|
||||
{
|
||||
"duration": 14773,
|
||||
"id": "b4c0ea8c8dcca58c",
|
||||
"kind": "CLIENT",
|
||||
"localEndpoint": {
|
||||
"ipv4": "10.32.1.43",
|
||||
"port": 80,
|
||||
"serviceName": "imc-dispatcher"
|
||||
},
|
||||
"name": "/",
|
||||
"parentId": "76dd0620b4bc9de4",
|
||||
"tags": {
|
||||
"http.host": "",
|
||||
"http.method": "POST",
|
||||
"http.path": "/",
|
||||
"http.status_code": "202",
|
||||
"http.url": "http://br-broker.includes-incoming-trace-id-2qszn.svc.cluster.local/",
|
||||
"opencensus.status_description": "OK"
|
||||
},
|
||||
"timestamp": 1571264371959548,
|
||||
"traceId": "ee46c4c6be1df717b3b82f55b531912f"
|
||||
},
|
||||
{
|
||||
"annotations": [
|
||||
{
|
||||
"timestamp": 1571264371860719,
|
||||
"value": "GetConn"
|
||||
},
|
||||
{
|
||||
"timestamp": 1571264371860796,
|
||||
"value": "DNSStart"
|
||||
},
|
||||
{
|
||||
"timestamp": 1571264371879299,
|
||||
"value": "DNSDone"
|
||||
},
|
||||
{
|
||||
"timestamp": 1571264371879313,
|
||||
"value": "ConnectStart"
|
||||
},
|
||||
{
|
||||
"timestamp": 1571264371881319,
|
||||
"value": "ConnectDone"
|
||||
},
|
||||
{
|
||||
"timestamp": 1571264371881372,
|
||||
"value": "GotConn"
|
||||
},
|
||||
{
|
||||
"timestamp": 1571264371881488,
|
||||
"value": "WroteHeaders"
|
||||
},
|
||||
{
|
||||
"timestamp": 1571264371881495,
|
||||
"value": "WroteRequest"
|
||||
},
|
||||
{
|
||||
"timestamp": 1571264371900479,
|
||||
"value": "GotFirstResponseByte"
|
||||
},
|
||||
{
|
||||
"timestamp": 1571264371900571,
|
||||
"value": "PutIdleConn"
|
||||
}
|
||||
],
|
||||
"duration": 40002,
|
||||
"id": "1616272c1fcedd5b",
|
||||
"kind": "CLIENT",
|
||||
"localEndpoint": {
|
||||
"ipv4": "10.28.6.176",
|
||||
"port": 80,
|
||||
"serviceName": "sender"
|
||||
},
|
||||
"tags": {
|
||||
"http.host": "",
|
||||
"http.method": "POST",
|
||||
"http.path": "",
|
||||
"http.status_code": "202",
|
||||
"http.url": "http://br-broker.includes-incoming-trace-id-2qszn.svc.cluster.local",
|
||||
"opencensus.status_description": "OK"
|
||||
},
|
||||
"timestamp": 1571264371860637,
|
||||
"traceId": "ee46c4c6be1df717b3b82f55b531912f"
|
||||
},
|
||||
{
|
||||
"duration": 17206,
|
||||
"id": "a11e466e5415b2b1",
|
||||
"kind": "CLIENT",
|
||||
"localEndpoint": {
|
||||
"ipv4": "10.32.12.23",
|
||||
"port": 80,
|
||||
"serviceName": "br-broker.includes-incoming-trace-id-2qszn"
|
||||
},
|
||||
"name": "/",
|
||||
"parentId": "7c86d0b868bd3d38",
|
||||
"tags": {
|
||||
"http.host": "",
|
||||
"http.method": "POST",
|
||||
"http.path": "/",
|
||||
"http.status_code": "202",
|
||||
"http.url": "http://br-kne-trigger-kn-channel.includes-incoming-trace-id-2qszn.svc.cluster.local/",
|
||||
"opencensus.status_description": "OK"
|
||||
},
|
||||
"timestamp": 1571264371882715,
|
||||
"traceId": "ee46c4c6be1df717b3b82f55b531912f"
|
||||
},
|
||||
{
|
||||
"annotations": [
|
||||
{
|
||||
"timestamp": 1571264371899323,
|
||||
"value": "Received 79 bytes"
|
||||
}
|
||||
],
|
||||
"duration": 319,
|
||||
"id": "1d42e9223b858118",
|
||||
"kind": "SERVER",
|
||||
"localEndpoint": {
|
||||
"ipv4": "10.32.1.43",
|
||||
"port": 80,
|
||||
"serviceName": "imc-dispatcher"
|
||||
},
|
||||
"name": "/",
|
||||
"parentId": "a11e466e5415b2b1",
|
||||
"tags": {
|
||||
"http.host": "br-kne-trigger-kn-channel.includes-incoming-trace-id-2qszn.svc.cluster.local",
|
||||
"http.method": "POST",
|
||||
"http.path": "/",
|
||||
"http.status_code": "202",
|
||||
"http.url": "/",
|
||||
"http.user_agent": "Go-http-client/1.1",
|
||||
"opencensus.status_description": "OK"
|
||||
},
|
||||
"timestamp": 1571264371899306,
|
||||
"traceId": "ee46c4c6be1df717b3b82f55b531912f"
|
||||
},
|
||||
{
|
||||
"duration": 21505,
|
||||
"id": "9908b1fceda49168",
|
||||
"kind": "CLIENT",
|
||||
"localEndpoint": {
|
||||
"ipv4": "10.32.1.43",
|
||||
"port": 80,
|
||||
"serviceName": "imc-dispatcher"
|
||||
},
|
||||
"name": "/triggers/includes-incoming-trace-id-2qszn/logger/f8804e2a-f062-11e9-8de0-42010a800086",
|
||||
"parentId": "1d42e9223b858118",
|
||||
"tags": {
|
||||
"http.host": "",
|
||||
"http.method": "POST",
|
||||
"http.path": "/triggers/includes-incoming-trace-id-2qszn/logger/f8804e2a-f062-11e9-8de0-42010a800086",
|
||||
"http.status_code": "202",
|
||||
"http.url": "http://br-broker-filter.includes-incoming-trace-id-2qszn.svc.cluster.local/triggers/includes-incoming-trace-id-2qszn/logger/f8804e2a-f062-11e9-8de0-42010a800086",
|
||||
"opencensus.status_description": "OK"
|
||||
},
|
||||
"timestamp": 1571264371900749,
|
||||
"traceId": "ee46c4c6be1df717b3b82f55b531912f"
|
||||
},
|
||||
{
|
||||
"annotations": [
|
||||
{
|
||||
"timestamp": 1571264371972653,
|
||||
"value": "Received 89 bytes"
|
||||
}
|
||||
],
|
||||
"duration": 425,
|
||||
"id": "53b25c437ad4a960",
|
||||
"kind": "SERVER",
|
||||
"localEndpoint": {
|
||||
"ipv4": "10.32.1.43",
|
||||
"port": 80,
|
||||
"serviceName": "imc-dispatcher"
|
||||
},
|
||||
"name": "/",
|
||||
"parentId": "eb4e31d92bc59aa4",
|
||||
"tags": {
|
||||
"http.host": "br-kne-trigger-kn-channel.includes-incoming-trace-id-2qszn.svc.cluster.local",
|
||||
"http.method": "POST",
|
||||
"http.path": "/",
|
||||
"http.status_code": "202",
|
||||
"http.url": "/",
|
||||
"http.user_agent": "Go-http-client/1.1",
|
||||
"opencensus.status_description": "OK"
|
||||
},
|
||||
"timestamp": 1571264371972631,
|
||||
"traceId": "ee46c4c6be1df717b3b82f55b531912f"
|
||||
},
|
||||
{
|
||||
"duration": 27202,
|
||||
"id": "cf78241d2df4b9b0",
|
||||
"kind": "CLIENT",
|
||||
"localEndpoint": {
|
||||
"ipv4": "10.32.1.43",
|
||||
"port": 80,
|
||||
"serviceName": "imc-dispatcher"
|
||||
},
|
||||
"name": "/triggers/includes-incoming-trace-id-2qszn/logger/f8804e2a-f062-11e9-8de0-42010a800086",
|
||||
"parentId": "53b25c437ad4a960",
|
||||
"tags": {
|
||||
"http.host": "",
|
||||
"http.method": "POST",
|
||||
"http.path": "/triggers/includes-incoming-trace-id-2qszn/logger/f8804e2a-f062-11e9-8de0-42010a800086",
|
||||
"http.status_code": "202",
|
||||
"http.url": "http://br-broker-filter.includes-incoming-trace-id-2qszn.svc.cluster.local/triggers/includes-incoming-trace-id-2qszn/logger/f8804e2a-f062-11e9-8de0-42010a800086",
|
||||
"opencensus.status_description": "OK"
|
||||
},
|
||||
"timestamp": 1571264371973561,
|
||||
"traceId": "ee46c4c6be1df717b3b82f55b531912f"
|
||||
},
|
||||
{
|
||||
"annotations": [
|
||||
{
|
||||
"timestamp": 1571264371992370,
|
||||
"value": "Received 89 bytes"
|
||||
}
|
||||
],
|
||||
"duration": 4860,
|
||||
"id": "9fd1516ec8487f29",
|
||||
"kind": "SERVER",
|
||||
"localEndpoint": {
|
||||
"ipv4": "10.28.5.249",
|
||||
"port": 80,
|
||||
"serviceName": "logger"
|
||||
},
|
||||
"name": "/",
|
||||
"parentId": "e31ce234cae840cd",
|
||||
"tags": {
|
||||
"http.host": "logger.includes-incoming-trace-id-2qszn.svc.cluster.local",
|
||||
"http.method": "POST",
|
||||
"http.path": "/",
|
||||
"http.status_code": "202",
|
||||
"http.url": "/",
|
||||
"http.user_agent": "Go-http-client/1.1",
|
||||
"opencensus.status_description": "OK"
|
||||
},
|
||||
"timestamp": 1571264371992328,
|
||||
"traceId": "ee46c4c6be1df717b3b82f55b531912f"
|
||||
},
|
||||
{
|
||||
"annotations": [
|
||||
{
|
||||
"timestamp": 1571264371881923,
|
||||
"value": "Received 79 bytes"
|
||||
}
|
||||
],
|
||||
"duration": 18198,
|
||||
"id": "7c86d0b868bd3d38",
|
||||
"kind": "SERVER",
|
||||
"localEndpoint": {
|
||||
"ipv4": "10.32.12.23",
|
||||
"port": 80,
|
||||
"serviceName": "br-broker.includes-incoming-trace-id-2qszn"
|
||||
},
|
||||
"name": "/",
|
||||
"parentId": "1616272c1fcedd5b",
|
||||
"tags": {
|
||||
"http.host": "br-broker.includes-incoming-trace-id-2qszn.svc.cluster.local",
|
||||
"http.method": "POST",
|
||||
"http.path": "/",
|
||||
"http.status_code": "202",
|
||||
"http.url": "/",
|
||||
"http.user_agent": "Go-http-client/1.1",
|
||||
"opencensus.status_description": "OK"
|
||||
},
|
||||
"timestamp": 1571264371881868,
|
||||
"traceId": "ee46c4c6be1df717b3b82f55b531912f"
|
||||
},
|
||||
{
|
||||
"annotations": [
|
||||
{
|
||||
"timestamp": 1571264371940689,
|
||||
"value": "Received 79 bytes"
|
||||
},
|
||||
{
|
||||
"timestamp": 1571264371941061,
|
||||
"value": "Sent 89 bytes"
|
||||
}
|
||||
],
|
||||
"duration": 487,
|
||||
"id": "ec377f2b219848d6",
|
||||
"kind": "SERVER",
|
||||
"localEndpoint": {
|
||||
"ipv4": "10.28.0.226",
|
||||
"port": 80,
|
||||
"serviceName": "transformer"
|
||||
},
|
||||
"name": "/",
|
||||
"parentId": "d48b4d96bb46c90f",
|
||||
"tags": {
|
||||
"http.host": "transformer.includes-incoming-trace-id-2qszn.svc.cluster.local",
|
||||
"http.method": "POST",
|
||||
"http.path": "/",
|
||||
"http.status_code": "200",
|
||||
"http.url": "/",
|
||||
"http.user_agent": "Go-http-client/1.1",
|
||||
"opencensus.status_description": "OK"
|
||||
},
|
||||
"timestamp": 1571264371940634,
|
||||
"traceId": "ee46c4c6be1df717b3b82f55b531912f"
|
||||
},
|
||||
{
|
||||
"duration": 2608,
|
||||
"id": "3087b26640ecb5dc",
|
||||
"kind": "CLIENT",
|
||||
"localEndpoint": {
|
||||
"ipv4": "10.32.1.43",
|
||||
"port": 80,
|
||||
"serviceName": "imc-dispatcher"
|
||||
},
|
||||
"name": "/triggers/includes-incoming-trace-id-2qszn/transformer/f89da9fb-f062-11e9-8de0-42010a800086",
|
||||
"parentId": "53b25c437ad4a960",
|
||||
"tags": {
|
||||
"http.host": "",
|
||||
"http.method": "POST",
|
||||
"http.path": "/triggers/includes-incoming-trace-id-2qszn/transformer/f89da9fb-f062-11e9-8de0-42010a800086",
|
||||
"http.status_code": "202",
|
||||
"http.url": "http://br-broker-filter.includes-incoming-trace-id-2qszn.svc.cluster.local/triggers/includes-incoming-trace-id-2qszn/transformer/f89da9fb-f062-11e9-8de0-42010a800086",
|
||||
"opencensus.status_description": "OK"
|
||||
},
|
||||
"timestamp": 1571264371973526,
|
||||
"traceId": "ee46c4c6be1df717b3b82f55b531912f"
|
||||
},
|
||||
{
|
||||
"annotations": [
|
||||
{
|
||||
"timestamp": 1571264371920415,
|
||||
"value": "Received 79 bytes"
|
||||
}
|
||||
],
|
||||
"duration": 1335,
|
||||
"id": "cad53fd7b1dacee6",
|
||||
"kind": "SERVER",
|
||||
"localEndpoint": {
|
||||
"ipv4": "10.32.2.177",
|
||||
"port": 80,
|
||||
"serviceName": "br-broker-filter.includes-incoming-trace-id-2qszn"
|
||||
},
|
||||
"name": "/triggers/includes-incoming-trace-id-2qszn/logger/f8804e2a-f062-11e9-8de0-42010a800086",
|
||||
"parentId": "9908b1fceda49168",
|
||||
"tags": {
|
||||
"http.host": "br-broker-filter.includes-incoming-trace-id-2qszn.svc.cluster.local",
|
||||
"http.method": "POST",
|
||||
"http.path": "/triggers/includes-incoming-trace-id-2qszn/logger/f8804e2a-f062-11e9-8de0-42010a800086",
|
||||
"http.status_code": "202",
|
||||
"http.url": "/triggers/includes-incoming-trace-id-2qszn/logger/f8804e2a-f062-11e9-8de0-42010a800086",
|
||||
"http.user_agent": "Go-http-client/1.1",
|
||||
"opencensus.status_description": "OK"
|
||||
},
|
||||
"timestamp": 1571264371920397,
|
||||
"traceId": "ee46c4c6be1df717b3b82f55b531912f"
|
||||
},
|
||||
{
|
||||
"annotations": [
|
||||
{
|
||||
"timestamp": 1571264371974165,
|
||||
"value": "Received 89 bytes"
|
||||
}
|
||||
],
|
||||
"duration": 1476,
|
||||
"id": "de415b55c5b2c338",
|
||||
"kind": "SERVER",
|
||||
"localEndpoint": {
|
||||
"ipv4": "10.32.2.177",
|
||||
"port": 80,
|
||||
"serviceName": "br-broker-filter.includes-incoming-trace-id-2qszn"
|
||||
},
|
||||
"name": "/triggers/includes-incoming-trace-id-2qszn/transformer/f89da9fb-f062-11e9-8de0-42010a800086",
|
||||
"parentId": "3087b26640ecb5dc",
|
||||
"tags": {
|
||||
"http.host": "br-broker-filter.includes-incoming-trace-id-2qszn.svc.cluster.local",
|
||||
"http.method": "POST",
|
||||
"http.path": "/triggers/includes-incoming-trace-id-2qszn/transformer/f89da9fb-f062-11e9-8de0-42010a800086",
|
||||
"http.status_code": "202",
|
||||
"http.url": "/triggers/includes-incoming-trace-id-2qszn/transformer/f89da9fb-f062-11e9-8de0-42010a800086",
|
||||
"http.user_agent": "Go-http-client/1.1",
|
||||
"opencensus.status_description": "OK"
|
||||
},
|
||||
"timestamp": 1571264371974140,
|
||||
"traceId": "ee46c4c6be1df717b3b82f55b531912f"
|
||||
},
|
||||
{
|
||||
"duration": 23207,
|
||||
"id": "e31ce234cae840cd",
|
||||
"kind": "CLIENT",
|
||||
"localEndpoint": {
|
||||
"ipv4": "10.32.2.177",
|
||||
"port": 80,
|
||||
"serviceName": "br-broker-filter.includes-incoming-trace-id-2qszn"
|
||||
},
|
||||
"name": "/",
|
||||
"parentId": "d966d475c07c46a4",
|
||||
"tags": {
|
||||
"http.host": "",
|
||||
"http.method": "POST",
|
||||
"http.path": "/",
|
||||
"http.status_code": "202",
|
||||
"http.url": "http://logger.includes-incoming-trace-id-2qszn.svc.cluster.local/",
|
||||
"opencensus.status_description": "OK"
|
||||
},
|
||||
"timestamp": 1571264371974586,
|
||||
"traceId": "ee46c4c6be1df717b3b82f55b531912f"
|
||||
}
|
||||
]
|
Before Width: | Height: | Size: 14 KiB |
|
@ -1,153 +0,0 @@
|
|||
# This is a simple example that creates a source and sends events to a function.
|
||||
|
||||
# The namespace the example lives in.
|
||||
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: knative-debug
|
||||
|
||||
---
|
||||
|
||||
# The event source.
|
||||
|
||||
apiVersion: sources.knative.dev/v1alpha1
|
||||
kind: ApiServerSource
|
||||
metadata:
|
||||
name: src
|
||||
namespace: knative-debug
|
||||
spec:
|
||||
serviceAccountName: service-account
|
||||
mode: Resource
|
||||
resources:
|
||||
- apiVersion: v1
|
||||
kind: Event
|
||||
sink:
|
||||
ref:
|
||||
apiVersion: messaging.knative.dev/v1
|
||||
kind: InMemoryChannel
|
||||
name: chan
|
||||
|
||||
---
|
||||
|
||||
# The Channel events are sent to.
|
||||
|
||||
apiVersion: messaging.knative.dev/v1
|
||||
kind: InMemoryChannel
|
||||
metadata:
|
||||
name: chan
|
||||
namespace: knative-debug
|
||||
---
|
||||
|
||||
# The Subscription to the InMemoryChannel.
|
||||
|
||||
apiVersion: messaging.knative.dev/v1
|
||||
kind: Subscription
|
||||
metadata:
|
||||
name: sub
|
||||
namespace: knative-debug
|
||||
spec:
|
||||
channel:
|
||||
apiVersion: messaging.knative.dev/v1
|
||||
kind: InMemoryChannel
|
||||
name: chan
|
||||
subscriber:
|
||||
ref:
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
name: svc
|
||||
|
||||
---
|
||||
|
||||
# K8s Service which points at the Deployment below.
|
||||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: svc
|
||||
namespace: knative-debug
|
||||
spec:
|
||||
selector:
|
||||
app: fn
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 80
|
||||
targetPort: 8080
|
||||
|
||||
---
|
||||
|
||||
# K8s Deployment that simply writes input requests to its log.
|
||||
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: fn
|
||||
namespace: knative-debug
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: fn
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: fn
|
||||
spec:
|
||||
containers:
|
||||
- name: user-container
|
||||
image: gcr.io/knative-releases/knative.dev/eventing/cmd/event_display
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
|
||||
---
|
||||
|
||||
# Everything after this is just structure for the above.
|
||||
|
||||
---
|
||||
|
||||
# K8s Service Account that runs `src`'s container.
|
||||
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: service-account
|
||||
namespace: knative-debug
|
||||
|
||||
---
|
||||
|
||||
# The permissions that `src` needs.
|
||||
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: event-watcher
|
||||
namespace: knative-debug
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
|
||||
---
|
||||
|
||||
# Give `src`'s service account the necessary permissions.
|
||||
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: k8s-ra-event-watcher
|
||||
namespace: knative-debug
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: event-watcher
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: service-account
|
||||
namespace: knative-debug
|
|
@ -1 +0,0 @@
|
|||
<!DOCTYPE html><html><head><title>https://knative.dev/v0.23-docs/eventing/broker/</title><link rel="canonical" href="https://knative.dev/v0.23-docs/eventing/broker/"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=https://knative.dev/v0.23-docs/eventing/broker/" /></head></html>
|
|
@ -1,140 +0,0 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Knative – Eventing Flows</title>
|
||||
<link>https://knative.dev/v0.23-docs/eventing/flows/</link>
|
||||
<description>Recent content in Eventing Flows on Knative</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
|
||||
<atom:link href="https://knative.dev/v0.23-docs/eventing/flows/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<item>
|
||||
<title>V0.23-Docs: Parallel</title>
|
||||
<link>https://knative.dev/v0.23-docs/eventing/flows/parallel/</link>
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>https://knative.dev/v0.23-docs/eventing/flows/parallel/</guid>
|
||||
<description>
|
||||
|
||||
|
||||
<p>Parallel CRD provides a way to easily define a list of branches, each receiving
|
||||
the same CloudEvent sent to the Parallel ingress channel. Typically, each branch
|
||||
consists of a filter function guarding the execution of the branch.</p>
|
||||
<p>Parallel creates <code>Channel</code>s and <code>Subscription</code>s under the hood.</p>
|
||||
<h2 id="usage">Usage</h2>
|
||||
<h3 id="parallel-spec">Parallel Spec</h3>
|
||||
<p>Parallel has three parts for the Spec:</p>
|
||||
<ol>
|
||||
<li><code>branches</code> defines the list of <code>filter</code> and <code>subscriber</code> pairs, one per branch,
|
||||
and optionally a <code>reply</code> object. For each branch:
|
||||
<ol>
|
||||
<li>(optional) the <code>filter</code> is evaluated and when it returns an event the <code>subscriber</code> is
|
||||
executed. Both <code>filter</code> and <code>subscriber</code> must be <code>Addressable</code>.</li>
|
||||
<li>the event returned by the <code>subscriber</code> is sent to the branch <code>reply</code>
|
||||
object. When the <code>reply</code> is empty, the event is sent to the <code>spec.reply</code>
|
||||
object (see below).</li>
|
||||
</ol>
|
||||
</li>
|
||||
<li>(optional) <code>channelTemplate</code> defines the Template which will be used to
|
||||
create <code>Channel</code>s.</li>
|
||||
<li>(optional) <code>reply</code> defines where the result of each branch is sent to when
|
||||
the branch does not have its own <code>reply</code> object.</li>
|
||||
</ol>
|
||||
<h3 id="parallel-status">Parallel Status</h3>
|
||||
<p>Parallel has three parts for the Status:</p>
|
||||
<ol>
|
||||
<li><code>conditions</code> which details the overall status of the Parallel object</li>
|
||||
<li><code>ingressChannelStatus</code> and <code>branchesStatuses</code> which convey the status of
|
||||
underlying <code>Channel</code> and <code>Subscription</code> resource that are created as part of
|
||||
this Parallel.</li>
|
||||
<li><code>address</code> which is exposed so that Parallel can be used where Addressable can
|
||||
be used. Sending to this address will target the <code>Channel</code> which is fronting
|
||||
this Parallel (same as <code>ingressChannelStatus</code>).</li>
|
||||
</ol>
|
||||
<h2 id="examples">Examples</h2>
|
||||
<p>Learn how to use Parallel by following the <a href="../../samples/parallel/">examples</a></p>
|
||||
|
||||
</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>V0.23-Docs: Sequence</title>
|
||||
<link>https://knative.dev/v0.23-docs/eventing/flows/sequence/</link>
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>https://knative.dev/v0.23-docs/eventing/flows/sequence/</guid>
|
||||
<description>
|
||||
|
||||
|
||||
<p>Sequence CRD provides a way to define an in-order list of functions that will be
|
||||
invoked. Each step can modify, filter or create a new kind of an event. Sequence
|
||||
creates <code>Channel</code>s and <code>Subscription</code>s under the hood.</p>
|
||||
<h2 id="usage">Usage</h2>
|
||||
<h3 id="sequence-spec">Sequence Spec</h3>
|
||||
<p>Sequence has three parts for the Spec:</p>
|
||||
<ol>
|
||||
<li><code>Steps</code> which defines the in-order list of <code>Subscriber</code>s, aka, which
|
||||
functions are executed in the listed order. These are specified using the
|
||||
<code>messaging.v1.SubscriberSpec</code> just like you would when creating
|
||||
<code>Subscription</code>. Each step should be <code>Addressable</code>.</li>
|
||||
<li><code>ChannelTemplate</code> defines the Template which will be used to create
|
||||
<code>Channel</code>s between the steps.</li>
|
||||
<li><code>Reply</code> (Optional) Reference to where the results of the final step in the
|
||||
sequence are sent to.</li>
|
||||
</ol>
|
||||
<h3 id="sequence-status">Sequence Status</h3>
|
||||
<p>Sequence has four parts for the Status:</p>
|
||||
<ol>
|
||||
<li>Conditions which detail the overall Status of the Sequence object</li>
|
||||
<li>ChannelStatuses which convey the Status of underlying <code>Channel</code> resources
|
||||
that are created as part of this Sequence. It is an array and each Status
|
||||
corresponds to the Step number, so the first entry in the array is the Status
|
||||
of the <code>Channel</code> before the first Step.</li>
|
||||
<li>SubscriptionStatuses which convey the Status of underlying <code>Subscription</code>
|
||||
resources that are created as part of this Sequence. It is an array and each
|
||||
Status corresponds to the Step number, so the first entry in the array is the
|
||||
<code>Subscription</code> which is created to wire the first channel to the first step
|
||||
in the <code>Steps</code> array.</li>
|
||||
<li>AddressStatus which is exposed so that Sequence can be used where Addressable
|
||||
can be used. Sending to this address will target the <code>Channel</code> which is
|
||||
fronting the first Step in the Sequence.</li>
|
||||
</ol>
|
||||
<h2 id="examples">Examples</h2>
|
||||
<p>For each of these examples below, You will use a <a href="../../samples/ping-source/"><code>PingSource</code></a> as the source of events.</p>
|
||||
<p>We also use a very simple <a href="https://github.com/vaikas-google/transformer">transformer</a> which performs very trivial transformation of the incoming events to demonstrate they have passed through each stage.</p>
|
||||
<h3 id="sequence-with-no-reply-terminal-last-stepsequencesequence-terminal"><a href="../sequence/sequence-terminal/">Sequence with no reply (terminal last Step)</a></h3>
|
||||
<p>For the first example, we&rsquo;ll use a 3 Step <code>Sequence</code> that is wired directly into
|
||||
the <code>PingSource</code>. Each of the steps simply tacks on &ldquo;- Handled by
|
||||
<STEP NUMBER>&rdquo;, for example the first Step in the <code>Sequence</code> will take the
|
||||
incoming message and append &ldquo;- Handled by 0&rdquo; to the incoming message.</p>
|
||||
<h3 id="sequence-with-reply-last-step-produces-outputsequencesequence-reply-to-event-display"><a href="../sequence/sequence-reply-to-event-display/">Sequence with reply (last Step produces output)</a></h3>
|
||||
<p>For the next example, we&rsquo;ll use the same 3 Step <code>Sequence</code> that is wired
|
||||
directly into the <code>PingSource</code>. Each of the steps simply tacks on &ldquo;- Handled
|
||||
by <STEP NUMBER>&rdquo;, for example the first Step in the <code>Sequence</code> will take the
|
||||
incoming message and append &ldquo;- Handled by 0&rdquo; to the incoming message.</p>
|
||||
<p>The only difference is that we&rsquo;ll use the <code>Subscriber.Spec.Reply</code> field to wire
|
||||
the output of the last Step to an event display pod.</p>
|
||||
<h3 id="chaining-sequences-togethersequencesequence-reply-to-sequence"><a href="../sequence/sequence-reply-to-sequence/">Chaining Sequences together</a></h3>
|
||||
<p>For the next example, we&rsquo;ll use the same 3 Step <code>Sequence</code> that is wired
|
||||
directly into the <code>PingSource</code>. Each of the steps simply tacks on &ldquo;- Handled
|
||||
by <STEP NUMBER>&rdquo;, for example the first Step in the <code>Sequence</code> will take the
|
||||
incoming message and append &ldquo;- Handled by 0&rdquo; to the incoming message.</p>
|
||||
<p>The only difference is that we&rsquo;ll use the <code>Subscriber.Spec.Reply</code> field to wire
|
||||
the output of the last Step to another <code>Sequence</code> that does the same message
|
||||
modifications as the first pipeline (with different steps however).</p>
|
||||
<h3 id="using-sequence-with-brokertrigger-modelsequencesequence-with-broker-trigger"><a href="../sequence/sequence-with-broker-trigger/">Using Sequence with Broker/Trigger model</a></h3>
|
||||
<p>You can also create a Trigger which targets <code>Sequence</code>. This time we&rsquo;ll wire
|
||||
<code>PingSource</code> to send events to a <code>Broker</code> and then we&rsquo;ll have the <code>Sequence</code>
|
||||
emit the resulting Events back into the Broker so that the results of the
|
||||
<code>Sequence</code> can be observed by other <code>Trigger</code>s.</p>
|
||||
|
||||
</description>
|
||||
</item>
|
||||
|
||||
</channel>
|
||||
</rss>
|
|
@ -1,775 +0,0 @@
|
|||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>Knative – Sequence</title>
|
||||
<link>https://knative.dev/v0.23-docs/eventing/flows/sequence/</link>
|
||||
<description>Recent content in Sequence on Knative</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
|
||||
<atom:link href="https://knative.dev/v0.23-docs/eventing/flows/sequence/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<item>
|
||||
<title>V0.23-Docs: Sequence terminal</title>
|
||||
<link>https://knative.dev/v0.23-docs/eventing/flows/sequence/sequence-terminal/</link>
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>https://knative.dev/v0.23-docs/eventing/flows/sequence/sequence-terminal/</guid>
|
||||
<description>
|
||||
|
||||
|
||||
<p>We are going to create the following logical configuration. We create a
|
||||
PingSource, feeding events to a <a href="../../../flows/sequence"><code>Sequence</code></a>.
|
||||
Sequence can then do either external work, or out of band create additional
|
||||
events.</p>
|
||||
<p><img src="./sequence-terminal.png" alt="Logical Configuration"></p>
|
||||
<p>The functions used in these examples live in
|
||||
<a href="https://github.com/knative/eventing/blob/main/cmd/appender/main.go">https://github.com/knative/eventing/blob/main/cmd/appender/main.go</a>.</p>
|
||||
<h2 id="prerequisites">Prerequisites</h2>
|
||||
<p>For this example, we&rsquo;ll assume you have set up an <code>InMemoryChannel</code> as well as
|
||||
Knative Serving (for our functions). The examples use <code>default</code> namespace,
|
||||
again, if you want to deploy to another Namespace, you will need to modify the
|
||||
examples to reflect this.</p>
|
||||
<p>If you want to use different type of <code>Channel</code>, you will have to modify the
|
||||
<code>Sequence.Spec.ChannelTemplate</code> to create the appropriate Channel resources.</p>
|
||||
<h2 id="setup">Setup</h2>
|
||||
<h3 id="create-the-knative-services">Create the Knative Services</h3>
|
||||
<p>First create the 3 steps that will be referenced in the Steps.</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">serving.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">first</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">template</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">containers</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">image</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">gcr.io/knative-releases/knative.dev/eventing/cmd/appender</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">env</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">MESSAGE</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">value</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34; - Handled by 0&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#000">---</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">serving.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">second</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">template</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">containers</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">image</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">gcr.io/knative-releases/knative.dev/eventing/cmd/appender</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">env</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">MESSAGE</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">value</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34; - Handled by 1&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#000">---</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">serving.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">third</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">template</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">containers</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">image</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">gcr.io/knative-releases/knative.dev/eventing/cmd/appender</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">env</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">MESSAGE</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">value</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34; - Handled by 2&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#000">---</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">kubectl -n default create -f ./steps.yaml
|
||||
</code></pre></div><h3 id="create-the-sequence">Create the Sequence</h3>
|
||||
<p>The <code>sequence.yaml</code> file contains the specifications for creating the Sequence.
|
||||
If you are using a different type of Channel, you need to change the
|
||||
spec.channelTemplate to point to your desired Channel.</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">flows.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Sequence</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">sequence</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">channelTemplate</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">messaging.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">InMemoryChannel</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">steps</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">ref</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">serving.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">first</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">ref</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">serving.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">second</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">ref</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">serving.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">third</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><p>Change <code>default</code> below to create the <code>Sequence</code> in the Namespace where you want
|
||||
the resources to be created.</p>
|
||||
<p>Here, if you are using different type of Channel, you need to change the
|
||||
spec.channelTemplate to point to your desired Channel.</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">kubectl -n default create -f ./sequence.yaml
|
||||
</code></pre></div><h3 id="create-the-pingsource-targeting-the-sequence">Create the PingSource targeting the Sequence</h3>
|
||||
<p>This will create a PingSource which will send a CloudEvent with
|
||||
<code>{&quot;message&quot;: &quot;Hello world!&quot;}</code> as the data payload every 2 minutes.</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">sources.knative.dev/v1beta2</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">PingSource</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">ping-source</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">schedule</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;*/2 * * * *&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">contentType</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;application/json&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">data</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#39;{&#34;message&#34;: &#34;Hello world!&#34;}&#39;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">sink</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">ref</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">flows.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Sequence</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">sequence</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">kubectl -n default create -f ./ping-source.yaml
|
||||
</code></pre></div><h3 id="inspecting-the-results">Inspecting the results</h3>
|
||||
<p>You can now see the final output by inspecting the logs of the event-display
|
||||
pods. Note that since we set the <code>PingSource</code> to emit every 2 minutes, it might
|
||||
take some time for the events to show up in the logs.</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">kubectl -n default get pods
|
||||
</code></pre></div><p>Let&rsquo;s look at the logs for the first <code>Step</code> in the <code>Sequence</code>:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">kubectl -n default logs -l serving.knative.dev/service<span style="color:#ce5c00;font-weight:bold">=</span>first -c user-container --tail<span style="color:#ce5c00;font-weight:bold">=</span>-1
|
||||
|
||||
2020/03/02 21:28:00 listening on 8080, appending <span style="color:#4e9a06">&#34; - Handled by 0&#34;</span> to events
|
||||
2020/03/02 21:28:01 Received a new event:
|
||||
2020/03/02 21:28:01 <span style="color:#ce5c00;font-weight:bold">[</span>2020-03-02T21:28:00.0010247Z<span style="color:#ce5c00;font-weight:bold">]</span> /apis/v1/namespaces/default/pingsources/ping-source dev.knative.sources.ping: <span style="color:#000;font-weight:bold">&amp;</span><span style="color:#ce5c00;font-weight:bold">{</span>Sequence:0 Message:Hello world!<span style="color:#ce5c00;font-weight:bold">}</span>
|
||||
2020/03/02 21:28:01 Transform the event to:
|
||||
2020/03/02 21:28:01 <span style="color:#ce5c00;font-weight:bold">[</span>2020-03-02T21:28:00.0010247Z<span style="color:#ce5c00;font-weight:bold">]</span> /apis/v1/namespaces/default/pingsources/ping-source dev.knative.sources.ping: <span style="color:#000;font-weight:bold">&amp;</span><span style="color:#ce5c00;font-weight:bold">{</span>Sequence:0 Message:Hello world! - Handled by 0<span style="color:#ce5c00;font-weight:bold">}</span>
|
||||
</code></pre></div><p>And you can see that the initial PingSource message <code>(&quot;Hello World!&quot;)</code> has now
|
||||
been modified by the first step in the Sequence to include &quot; - Handled by 0&quot;.
|
||||
Exciting :)</p>
|
||||
<p>Then we can look at the output of the second Step in the <code>Sequence</code>:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">kubectl -n default logs -l serving.knative.dev/service<span style="color:#ce5c00;font-weight:bold">=</span>second -c user-container --tail<span style="color:#ce5c00;font-weight:bold">=</span>-1
|
||||
|
||||
2020/03/02 21:28:02 listening on 8080, appending <span style="color:#4e9a06">&#34; - Handled by 1&#34;</span> to events
|
||||
2020/03/02 21:28:02 Received a new event:
|
||||
2020/03/02 21:28:02 <span style="color:#ce5c00;font-weight:bold">[</span>2020-03-02T21:28:00.0010247Z<span style="color:#ce5c00;font-weight:bold">]</span> /apis/v1/namespaces/default/pingsources/ping-source dev.knative.sources.ping: <span style="color:#000;font-weight:bold">&amp;</span><span style="color:#ce5c00;font-weight:bold">{</span>Sequence:0 Message:Hello world! - Handled by 0<span style="color:#ce5c00;font-weight:bold">}</span>
|
||||
2020/03/02 21:28:02 Transform the event to:
|
||||
2020/03/02 21:28:02 <span style="color:#ce5c00;font-weight:bold">[</span>2020-03-02T21:28:00.0010247Z<span style="color:#ce5c00;font-weight:bold">]</span> /apis/v1/namespaces/default/pingsources/ping-source dev.knative.sources.ping: <span style="color:#000;font-weight:bold">&amp;</span><span style="color:#ce5c00;font-weight:bold">{</span>Sequence:0 Message:Hello world! - Handled by <span style="color:#0000cf;font-weight:bold">0</span> - Handled by 1<span style="color:#ce5c00;font-weight:bold">}</span>
|
||||
</code></pre></div><p>And as expected it&rsquo;s now been handled by both the first and second Step as
|
||||
reflected by the Message being now: &ldquo;Hello world! - Handled by 0 - Handled by 1&rdquo;</p>
|
||||
<p>Then we can look at the output of the last Step in the <code>Sequence</code>:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">kubectl -n default logs -l serving.knative.dev/service<span style="color:#ce5c00;font-weight:bold">=</span>third -c user-container --tail<span style="color:#ce5c00;font-weight:bold">=</span>-1
|
||||
|
||||
2020/03/02 21:28:03 listening on 8080, appending <span style="color:#4e9a06">&#34; - Handled by 2&#34;</span> to events
|
||||
2020/03/02 21:28:03 Received a new event:
|
||||
2020/03/02 21:28:03 <span style="color:#ce5c00;font-weight:bold">[</span>2020-03-02T21:28:00.0010247Z<span style="color:#ce5c00;font-weight:bold">]</span> /apis/v1/namespaces/default/pingsources/ping-source dev.knative.sources.ping: <span style="color:#000;font-weight:bold">&amp;</span><span style="color:#ce5c00;font-weight:bold">{</span>Sequence:0 Message:Hello world! - Handled by <span style="color:#0000cf;font-weight:bold">0</span> - Handled by 1<span style="color:#ce5c00;font-weight:bold">}</span>
|
||||
2020/03/02 21:28:03 Transform the event to:
|
||||
2020/03/02 21:28:03 <span style="color:#ce5c00;font-weight:bold">[</span>2020-03-02T21:28:00.0010247Z<span style="color:#ce5c00;font-weight:bold">]</span> /apis/v1/namespaces/default/pingsources/ping-source dev.knative.sources.ping: <span style="color:#000;font-weight:bold">&amp;</span><span style="color:#ce5c00;font-weight:bold">{</span>Sequence:0 Message:Hello world! - Handled by <span style="color:#0000cf;font-weight:bold">0</span> - Handled by <span style="color:#0000cf;font-weight:bold">1</span> - Handled by 2<span style="color:#ce5c00;font-weight:bold">}</span>
|
||||
</code></pre></div>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>V0.23-Docs: Sequence wired to event-display</title>
|
||||
<link>https://knative.dev/v0.23-docs/eventing/flows/sequence/sequence-reply-to-event-display/</link>
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>https://knative.dev/v0.23-docs/eventing/flows/sequence/sequence-reply-to-event-display/</guid>
|
||||
<description>
|
||||
|
||||
|
||||
<p>We are going to create the following logical configuration. We create a
|
||||
PingSource, feeding events to a <a href="../../../flows/sequence"><code>Sequence</code></a>, then
|
||||
taking the output of that <code>Sequence</code> and displaying the resulting output.</p>
|
||||
<p><img src="./sequence-reply-to-event-display.png" alt="Logical Configuration"></p>
|
||||
<p>The functions used in these examples live in
|
||||
<a href="https://github.com/knative/eventing/blob/main/cmd/appender/main.go">https://github.com/knative/eventing/blob/main/cmd/appender/main.go</a>.</p>
|
||||
<h2 id="prerequisites">Prerequisites</h2>
|
||||
<p>For this example, we&rsquo;ll assume you have set up an <code>InMemoryChannel</code> as well as
|
||||
Knative Serving (for our functions). The examples use <code>default</code> namespace,
|
||||
again, if you want to deploy to another Namespace, you will need to modify the
|
||||
examples to reflect this.</p>
|
||||
<p>If you want to use different type of <code>Channel</code>, you will have to modify the
|
||||
<code>Sequence.Spec.ChannelTemplate</code> to create the appropriate Channel resources.</p>
|
||||
<h2 id="setup">Setup</h2>
|
||||
<h3 id="create-the-knative-services">Create the Knative Services</h3>
|
||||
<p>Change <code>default</code> below to create the steps in the Namespace where you want
|
||||
resources created.</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">serving.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">first</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">template</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">containers</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">image</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">gcr.io/knative-releases/knative.dev/eventing/cmd/appender</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">env</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">MESSAGE</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">value</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34; - Handled by 0&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#000">---</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">serving.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">second</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">template</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">containers</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">image</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">gcr.io/knative-releases/knative.dev/eventing/cmd/appender</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">env</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">MESSAGE</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">value</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34; - Handled by 1&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#000">---</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">serving.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">third</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">template</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">containers</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">image</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">gcr.io/knative-releases/knative.dev/eventing/cmd/appender</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">env</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">MESSAGE</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">value</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34; - Handled by 2&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#000">---</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">kubectl -n default create -f ./steps.yaml
|
||||
</code></pre></div><h3 id="create-the-sequence">Create the Sequence</h3>
|
||||
<p>The <code>sequence.yaml</code> file contains the specifications for creating the Sequence.
|
||||
If you are using a different type of Channel, you need to change the
|
||||
spec.channelTemplate to point to your desired Channel.</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">flows.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Sequence</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">sequence</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">channelTemplate</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">messaging.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">InMemoryChannel</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">steps</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">ref</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">serving.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">first</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">ref</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">serving.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">second</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">ref</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">serving.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">third</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">reply</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">ref</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">serving.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">event-display</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><p>Change <code>default</code> below to create the <code>Sequence</code> in the Namespace where you want
|
||||
the resources to be created.</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">kubectl -n default create -f ./sequence.yaml
|
||||
</code></pre></div><h3 id="create-the-service-displaying-the-events-created-by-sequence">Create the Service displaying the events created by Sequence</h3>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">serving.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">event-display</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">template</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">containers</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">image</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">gcr.io/knative-releases/knative.dev/eventing/cmd/event_display</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><p>Change <code>default</code> below to create the <code>Sequence</code> in the Namespace where you want
|
||||
your resources to be created.</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">kubectl -n default create -f ./event-display.yaml
|
||||
</code></pre></div><h3 id="create-the-pingsource-targeting-the-sequence">Create the PingSource targeting the Sequence</h3>
|
||||
<p>This will create a PingSource which will send a CloudEvent with {&ldquo;message&rdquo;:
|
||||
&ldquo;Hello world!&quot;} as the data payload every 2 minutes.</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">sources.knative.dev/v1beta2</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">PingSource</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">ping-source</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">schedule</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;*/2 * * * *&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">contentType</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;application/json&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">data</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#39;{&#34;message&#34;: &#34;Hello world!&#34;}&#39;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">sink</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">ref</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">flows.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Sequence</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">sequence</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">kubectl -n default create -f ./ping-source.yaml
|
||||
</code></pre></div><h3 id="inspecting-the-results">Inspecting the results</h3>
|
||||
<p>You can now see the final output by inspecting the logs of the event-display
|
||||
pods.</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">kubectl -n default get pods
|
||||
</code></pre></div><p>Wait a bit and then look at the logs for the event-display pod:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">kubectl -n default logs -l serving.knative.dev/service<span style="color:#ce5c00;font-weight:bold">=</span>event-display -c user-container --tail<span style="color:#ce5c00;font-weight:bold">=</span>-1
|
||||
☁️ cloudevents.Event
|
||||
Validation: valid
|
||||
Context Attributes,
|
||||
specversion: 1.0
|
||||
type: samples.http.mode3
|
||||
source: /apis/v1/namespaces/default/pingsources/ping-source
|
||||
id: e8fa7906-ab62-4e61-9c13-a9406e2130a9
|
||||
time: 2020-03-02T20:52:00.0004957Z
|
||||
datacontenttype: application/json
|
||||
Extensions,
|
||||
knativehistory: sequence-kn-sequence-0-kn-channel.default.svc.cluster.local<span style="color:#000;font-weight:bold">;</span> sequence-kn-sequence-1-kn-channel.default.svc.cluster.local<span style="color:#000;font-weight:bold">;</span> sequence-kn-sequence-2-kn-channel.default.svc.cluster.local
|
||||
traceparent: 00-6e2947379387f35ddc933b9190af16ad-de3db0bc4e442394-00
|
||||
Data,
|
||||
<span style="color:#ce5c00;font-weight:bold">{</span>
|
||||
<span style="color:#4e9a06">&#34;id&#34;</span>: 0,
|
||||
<span style="color:#4e9a06">&#34;message&#34;</span>: <span style="color:#4e9a06">&#34;Hello world! - Handled by 0 - Handled by 1 - Handled by 2&#34;</span>
|
||||
<span style="color:#ce5c00;font-weight:bold">}</span>
|
||||
</code></pre></div><p>And you can see that the initial PingSource message <code>(&quot;Hello World!&quot;)</code> has been
|
||||
appended to it by each of the steps in the Sequence.</p>
|
||||
|
||||
</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>V0.23-Docs: Sequence wired to another Sequence</title>
|
||||
<link>https://knative.dev/v0.23-docs/eventing/flows/sequence/sequence-reply-to-sequence/</link>
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>https://knative.dev/v0.23-docs/eventing/flows/sequence/sequence-reply-to-sequence/</guid>
|
||||
<description>
|
||||
|
||||
|
||||
<p>We are going to create the following logical configuration. We create a
|
||||
PingSource, feeding events to a <a href="../../../flows/sequence"><code>Sequence</code></a>, then
|
||||
taking the output of that <code>Sequence</code> and sending it to a second <code>Sequence</code> and
|
||||
finally displaying the resulting output.</p>
|
||||
<p><img src="./sequence-reply-to-sequence.png" alt="Logical Configuration"></p>
|
||||
<p>The functions used in these examples live in
|
||||
<a href="https://github.com/knative/eventing/blob/main/cmd/appender/main.go">https://github.com/knative/eventing/blob/main/cmd/appender/main.go</a>.</p>
|
||||
<h2 id="prerequisites">Prerequisites</h2>
|
||||
<p>For this example, we&rsquo;ll assume you have set up an <code>InMemoryChannel</code> as well as
|
||||
Knative Serving (for our functions). The examples use <code>default</code> namespace,
|
||||
again, if you want to deploy to another namespace, you will need to modify the
|
||||
examples to reflect this.</p>
|
||||
<p>If you want to use different type of <code>Channel</code>, you will have to modify the
|
||||
<code>Sequence.Spec.ChannelTemplate</code> to create the appropriate Channel resources.</p>
|
||||
<h2 id="setup">Setup</h2>
|
||||
<h3 id="create-the-knative-services">Create the Knative Services</h3>
|
||||
<p>Change <code>default</code> below to create the steps in the Namespace where you want
|
||||
resources created.</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">serving.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">first</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">template</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">containers</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">image</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">gcr.io/knative-releases/knative.dev/eventing/cmd/appender</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">env</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">MESSAGE</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">value</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34; - Handled by 0&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#000">---</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">serving.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">second</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">template</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">containers</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">image</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">gcr.io/knative-releases/knative.dev/eventing/cmd/appender</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">env</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">MESSAGE</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">value</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34; - Handled by 1&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#000">---</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">serving.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">third</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">template</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">containers</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">image</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">gcr.io/knative-releases/knative.dev/eventing/cmd/appender</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">env</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">MESSAGE</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">value</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34; - Handled by 2&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#000">---</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">serving.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">fourth</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">template</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">containers</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">image</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">gcr.io/knative-releases/knative.dev/eventing/cmd/appender</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">env</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">MESSAGE</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">value</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34; - Handled by 3&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#000">---</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">serving.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">fifth</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">template</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">containers</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">image</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">gcr.io/knative-releases/knative.dev/eventing/cmd/appender</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">env</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">MESSAGE</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">value</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34; - Handled by 4&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#000">---</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">serving.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">sixth</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">template</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">containers</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">image</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">gcr.io/knative-releases/knative.dev/eventing/cmd/appender</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">env</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">MESSAGE</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">value</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34; - Handled by 5&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#000">---</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">kubectl -n default create -f ./steps.yaml
|
||||
</code></pre></div><h3 id="create-the-first-sequence">Create the first Sequence</h3>
|
||||
<p>The <code>sequence1.yaml</code> file contains the specifications for creating the Sequence.
|
||||
If you are using a different type of Channel, you need to change the
|
||||
spec.channelTemplate to point to your desired Channel.</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">flows.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Sequence</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">first-sequence</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">channelTemplate</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">messaging.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">InMemoryChannel</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">steps</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">ref</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">serving.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">first</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">ref</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">serving.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">second</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">ref</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">serving.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">third</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">reply</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">ref</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Sequence</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">flows.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">second-sequence</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><p>Change <code>default</code> below to create the <code>Sequence</code> in the Namespace where you want
|
||||
your resources created.</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">kubectl -n default create -f ./sequence1.yaml
|
||||
</code></pre></div><h3 id="create-the-second-sequence">Create the second Sequence</h3>
|
||||
<p>The <code>sequence2.yaml</code> file contains the specifications for creating the Sequence.
|
||||
If you are using a different type of Channel, you need to change the
|
||||
spec.channelTemplate to point to your desired Channel.</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">flows.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Sequence</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">second-sequence</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">channelTemplate</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">messaging.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">InMemoryChannel</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">steps</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">ref</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">serving.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">fourth</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">ref</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">serving.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">fifth</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">ref</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">serving.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">sixth</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">reply</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">ref</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">serving.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">event-display</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">kubectl -n default create -f ./sequence2.yaml
|
||||
</code></pre></div><h3 id="create-the-service-displaying-the-events-created-by-sequence">Create the Service displaying the events created by Sequence</h3>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">serving.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">event-display</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">template</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">containerers</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">image</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">gcr.io/knative-releases/knative.dev/eventing/cmd/event_display</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><p>Change <code>default</code> below to create the <code>Sequence</code> in the Namespace where you want
|
||||
your resources created.</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">kubectl -n default create -f ./event-display.yaml
|
||||
</code></pre></div><h3 id="create-the-pingsource-targeting-the-first-sequence">Create the PingSource targeting the first Sequence</h3>
|
||||
<p>This will create a PingSource which will send a CloudEvent with
|
||||
<code>{&quot;message&quot;: &quot;Hello world!&quot;}</code> as the data payload every 2 minutes.</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">sources.knative.dev/v1beta2</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">PingSource</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">ping-source</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">schedule</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;*/2 * * * *&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">contentType</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;application/json&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">data</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#39;{&#34;message&#34;: &#34;Hello world!&#34;}&#39;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">sink</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">ref</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">flows.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Sequence</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">first-sequence</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">kubectl -n default create -f ./ping-source.yaml
|
||||
</code></pre></div><h3 id="inspecting-the-results">Inspecting the results</h3>
|
||||
<p>You can now see the final output by inspecting the logs of the event-display
|
||||
pods.</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">kubectl -n default get pods
|
||||
</code></pre></div><p>Then look at the logs for the event-display pod:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">kubectl -n default logs -l serving.knative.dev/service<span style="color:#ce5c00;font-weight:bold">=</span>event-display -c user-container --tail<span style="color:#ce5c00;font-weight:bold">=</span>-1
|
||||
☁️ cloudevents.Event
|
||||
Validation: valid
|
||||
Context Attributes,
|
||||
specversion: 1.0
|
||||
type: dev.knative.sources.ping
|
||||
source: /apis/v1/namespaces/default/pingsources/ping-source
|
||||
id: 29d531df-78d8-4d11-9ffd-ba24045241a9
|
||||
time: 2020-03-02T21:18:00.0011708Z
|
||||
datacontenttype: application/json
|
||||
Extensions,
|
||||
knativehistory: first-sequence-kn-sequence-0-kn-channel.default.svc.cluster.local<span style="color:#000;font-weight:bold">;</span> first-sequence-kn-sequence-1-kn-channel.default.svc.cluster.local<span style="color:#000;font-weight:bold">;</span> first-sequence-kn-sequence-2-kn-channel.default.svc.cluster.local<span style="color:#000;font-weight:bold">;</span> second-sequence-kn-sequence-0-kn-channel.default.svc.cluster.local<span style="color:#000;font-weight:bold">;</span> second-sequence-kn-sequence-1-kn-channel.default.svc.cluster.local<span style="color:#000;font-weight:bold">;</span> second-sequence-kn-sequence-2-kn-channel.default.svc.cluster.local
|
||||
traceparent: 00-e5abc9de525a89ead80560b8f328de5c-fc12b64a6296f541-00
|
||||
Data,
|
||||
<span style="color:#ce5c00;font-weight:bold">{</span>
|
||||
<span style="color:#4e9a06">&#34;id&#34;</span>: 0,
|
||||
<span style="color:#4e9a06">&#34;message&#34;</span>: <span style="color:#4e9a06">&#34;Hello world! - Handled by 0 - Handled by 1 - Handled by 2 - Handled by 3 - Handled by 4 - Handled by 5&#34;</span>
|
||||
<span style="color:#ce5c00;font-weight:bold">}</span>
|
||||
</code></pre></div><p>And you can see that the initial PingSource message <code>(&quot;Hello World!&quot;)</code> has been
|
||||
appended to it by each of the steps in the Sequence.</p>
|
||||
|
||||
</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>V0.23-Docs: Using Sequence with Broker and Trigger</title>
|
||||
<link>https://knative.dev/v0.23-docs/eventing/flows/sequence/sequence-with-broker-trigger/</link>
|
||||
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
|
||||
|
||||
<guid>https://knative.dev/v0.23-docs/eventing/flows/sequence/sequence-with-broker-trigger/</guid>
|
||||
<description>
|
||||
|
||||
|
||||
<p>We are going to create the following logical configuration. We create a
|
||||
PingSource, feeding events into the Broker, then we create a <code>Filter</code> that wires
|
||||
those events into a <a href="../../../flows/sequence"><code>Sequence</code></a> consisting of 3
|
||||
steps. Then we take the end of the Sequence and feed newly minted events back
|
||||
into the Broker and create another Trigger which will then display those events.</p>
|
||||
<h2 id="prerequisites">Prerequisites</h2>
|
||||
<ul>
|
||||
<li>Knative Serving</li>
|
||||
<li><code>InMemoryChannel</code></li>
|
||||
</ul>
|
||||
<p><strong>NOTE:</strong> The examples use the <code>default</code> namespace.</p>
|
||||
<p>If you want to use different type of <code>Channel</code>, you will have to modify the
|
||||
<code>Sequence.Spec.ChannelTemplate</code> to create the appropriate Channel resources.</p>
|
||||
<p><img src="./sequence-with-broker-trigger.png" alt="Logical Configuration"></p>
|
||||
<p>The functions used in these examples live in
|
||||
<a href="https://github.com/knative/eventing/blob/main/cmd/appender/main.go">https://github.com/knative/eventing/blob/main/cmd/appender/main.go</a>.</p>
|
||||
<h2 id="setup">Setup</h2>
|
||||
<h3 id="creating-the-broker">Creating the Broker</h3>
|
||||
<p>To create the cluster default Broker type:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">kubectl create -f - <span style="color:#4e9a06">&lt;&lt;EOF
|
||||
</span><span style="color:#4e9a06">apiVersion: eventing.knative.dev/v1
|
||||
</span><span style="color:#4e9a06">kind: Broker
|
||||
</span><span style="color:#4e9a06">metadata:
|
||||
</span><span style="color:#4e9a06"> name: default
|
||||
</span><span style="color:#4e9a06">EOF</span>
|
||||
</code></pre></div><h3 id="create-the-knative-services">Create the Knative Services</h3>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">serving.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">first</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">template</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">containers</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">image</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">gcr.io/knative-releases/knative.dev/eventing/cmd/appender</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">env</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">MESSAGE</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">value</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34; - Handled by 0&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#000">---</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">serving.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">second</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">template</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">containers</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">image</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">gcr.io/knative-releases/knative.dev/eventing/cmd/appender</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">env</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">MESSAGE</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">value</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34; - Handled by 1&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#000">---</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">serving.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">third</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">template</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">containers</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">image</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">gcr.io/knative-releases/knative.dev/eventing/cmd/appender</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">env</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">MESSAGE</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">value</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34; - Handled by 2&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">TYPE</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">value</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;samples.http.mod3&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#000">---</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><p>Change the <code>default</code> namespace below to create the services in the namespace where you have
|
||||
configured your broker.</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">kubectl -n default create -f ./steps.yaml
|
||||
</code></pre></div><h3 id="create-the-sequence">Create the Sequence</h3>
|
||||
<p>The <code>sequence.yaml</code> file contains the specifications for creating the Sequence.
|
||||
If you are using a different type of Channel, you need to change the
|
||||
spec.channelTemplate to point to your desired Channel.</p>
|
||||
<p>Also, change the spec.reply.name to point to your <code>Broker</code></p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">flows.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Sequence</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">sequence</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">channelTemplate</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">messaging.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">InMemoryChannel</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">steps</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">ref</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">serving.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">first</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">ref</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">serving.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">second</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">ref</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">serving.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">third</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">reply</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">ref</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Broker</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">eventing.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">default</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><p>Change the <code>default</code> namespace below to create the sequence in the namespace where you have
|
||||
configured your broker.</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">kubectl -n default create -f ./sequence.yaml
|
||||
</code></pre></div><h3 id="create-the-pingsource-targeting-the-broker">Create the PingSource targeting the Broker</h3>
|
||||
<p>This will create a PingSource which will send a CloudEvent with {&ldquo;message&rdquo;:
|
||||
&ldquo;Hello world!&quot;} as the data payload every 2 minutes.</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">sources.knative.dev/v1beta2</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">PingSource</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">ping-source</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">schedule</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;*/2 * * * *&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">contentType</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#34;application/json&#34;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">data</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#4e9a06">&#39;{&#34;message&#34;: &#34;Hello world!&#34;}&#39;</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">sink</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">ref</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">eventing.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Broker</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">default</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><p>Change the <code>default</code> namespace below to create the PingSource in the namespace where you have
|
||||
configured your broker and sequence.</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">kubectl -n default create -f ./ping-source.yaml
|
||||
</code></pre></div><h3 id="create-the-trigger-targeting-the-sequence">Create the Trigger targeting the Sequence</h3>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">eventing.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Trigger</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">sequence-trigger</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">broker</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">default</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">filter</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">attributes</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">type</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">dev.knative.sources.ping</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">subscriber</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">ref</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">flows.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Sequence</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">sequence</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><p>Change the <code>default</code> namespace below to create the trigger in the namespace where you have
|
||||
configured your broker and sequence.</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">kubectl -n default create -f ./trigger.yaml
|
||||
|
||||
</code></pre></div><h3 id="create-the-service-and-trigger-displaying-the-events-created-by-sequence">Create the Service and Trigger displaying the events created by Sequence</h3>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-yaml" data-lang="yaml"><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">serving.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">sequence-display</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">template</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">containers</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span>- <span style="color:#204a87;font-weight:bold">image</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">gcr.io/knative-releases/knative.dev/eventing/cmd/appender</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#000">---</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">eventing.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Trigger</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">metadata</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">display-trigger</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#204a87;font-weight:bold">spec</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">broker</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">default</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">filter</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">attributes</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">type</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">samples.http.mod3</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">subscriber</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">ref</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">apiVersion</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">serving.knative.dev/v1</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">kind</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">Service</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#204a87;font-weight:bold">name</span><span style="color:#000;font-weight:bold">:</span><span style="color:#f8f8f8;text-decoration:underline"> </span><span style="color:#000">sequence-display</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline"></span><span style="color:#000">---</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span><span style="color:#f8f8f8;text-decoration:underline">
|
||||
</span></code></pre></div><p>Change <code>default</code> namespace below to create the service and trigger in the namespace
|
||||
where you have configured your broker.</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">kubectl -n default create -f ./display-trigger.yaml
|
||||
</code></pre></div><h3 id="inspecting-the-results">Inspecting the results</h3>
|
||||
<p>You can now see the final output by inspecting the logs of the sequence-display
|
||||
pods.</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">kubectl -n default get pods
|
||||
</code></pre></div><p>View the logs for the <code>sequence-display</code> pod:</p>
|
||||
<div class="highlight"><pre style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell">kubectl -n default logs -l serving.knative.dev/service<span style="color:#ce5c00;font-weight:bold">=</span>sequence-display -c user-container --tail<span style="color:#ce5c00;font-weight:bold">=</span>-1
|
||||
☁️ cloudevents.Event
|
||||
Validation: valid
|
||||
Context Attributes,
|
||||
specversion: 1.0
|
||||
type: samples.http.mod3
|
||||
source: /apis/v1/namespaces/default/pingsources/ping-source
|
||||
id: 159bba01-054a-4ae7-b7be-d4e7c5f773d2
|
||||
time: 2020-03-03T14:56:00.000652027Z
|
||||
datacontenttype: application/json
|
||||
Extensions,
|
||||
knativearrivaltime: 2020-03-03T14:56:00.018390608Z
|
||||
knativehistory: default-kne-trigger-kn-channel.default.svc.cluster.local<span style="color:#000;font-weight:bold">;</span> sequence-kn-sequence-0-kn-channel.default.svc.cluster.local<span style="color:#000;font-weight:bold">;</span> sequence-kn-sequence-1-kn-channel.default.svc.cluster.local<span style="color:#000;font-weight:bold">;</span> sequence-kn-sequence-2-kn-channel.default.svc.cluster.local<span style="color:#000;font-weight:bold">;</span> default-kne-trigger-kn-channel.default.svc.cluster.local
|
||||
traceparent: 00-e893412106ff417a90a5695e53ffd9cc-5829ae45a14ed462-00
|
||||
Data,
|
||||
<span style="color:#ce5c00;font-weight:bold">{</span>
|
||||
<span style="color:#4e9a06">&#34;id&#34;</span>: 0,
|
||||
<span style="color:#4e9a06">&#34;message&#34;</span>: <span style="color:#4e9a06">&#34;Hello world! - Handled by 0 - Handled by 1 - Handled by 2&#34;</span>
|
||||
<span style="color:#ce5c00;font-weight:bold">}</span>
|
||||
</code></pre></div><p>And you can see that the initial PingSource message <code>{&quot;Hello World!&quot;}</code> has been
|
||||
appended to it by each of the steps in the Sequence.</p>
|
||||
|
||||
</description>
|
||||
</item>
|
||||
|
||||
</channel>
|
||||
</rss>
|
|
@ -1,9 +0,0 @@
|
|||
apiVersion: serving.knative.dev/v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: event-display
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- image: gcr.io/knative-releases/knative.dev/eventing/cmd/event_display
|
|
@ -1,13 +0,0 @@
|
|||
apiVersion: sources.knative.dev/v1beta2
|
||||
kind: PingSource
|
||||
metadata:
|
||||
name: ping-source
|
||||
spec:
|
||||
schedule: "*/2 * * * *"
|
||||
contentType: "application/json"
|
||||
data: '{"message": "Hello world!"}'
|
||||
sink:
|
||||
ref:
|
||||
apiVersion: flows.knative.dev/v1
|
||||
kind: Sequence
|
||||
name: sequence
|
Before Width: | Height: | Size: 19 KiB |
|
@ -1,26 +0,0 @@
|
|||
apiVersion: flows.knative.dev/v1
|
||||
kind: Sequence
|
||||
metadata:
|
||||
name: sequence
|
||||
spec:
|
||||
channelTemplate:
|
||||
apiVersion: messaging.knative.dev/v1
|
||||
kind: InMemoryChannel
|
||||
steps:
|
||||
- ref:
|
||||
apiVersion: serving.knative.dev/v1
|
||||
kind: Service
|
||||
name: first
|
||||
- ref:
|
||||
apiVersion: serving.knative.dev/v1
|
||||
kind: Service
|
||||
name: second
|
||||
- ref:
|
||||
apiVersion: serving.knative.dev/v1
|
||||
kind: Service
|
||||
name: third
|
||||
reply:
|
||||
ref:
|
||||
kind: Service
|
||||
apiVersion: serving.knative.dev/v1
|
||||
name: event-display
|
|
@ -1,42 +0,0 @@
|
|||
apiVersion: serving.knative.dev/v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: first
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- image: gcr.io/knative-releases/knative.dev/eventing/cmd/appender
|
||||
env:
|
||||
- name: MESSAGE
|
||||
value: " - Handled by 0"
|
||||
|
||||
---
|
||||
apiVersion: serving.knative.dev/v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: second
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- image: gcr.io/knative-releases/knative.dev/eventing/cmd/appender
|
||||
env:
|
||||
- name: MESSAGE
|
||||
value: " - Handled by 1"
|
||||
---
|
||||
apiVersion: serving.knative.dev/v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: third
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- image: gcr.io/knative-releases/knative.dev/eventing/cmd/appender
|
||||
env:
|
||||
- name: MESSAGE
|
||||
value: " - Handled by 2"
|
||||
- name: TYPE
|
||||
value: "samples.http.mod3"
|
||||
---
|
|
@ -1,9 +0,0 @@
|
|||
apiVersion: serving.knative.dev/v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: event-display
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- image: gcr.io/knative-releases/knative.dev/eventing/cmd/event_display
|
|
@ -1,13 +0,0 @@
|
|||
apiVersion: sources.knative.dev/v1beta2
|
||||
kind: PingSource
|
||||
metadata:
|
||||
name: ping-source
|
||||
spec:
|
||||
schedule: "*/2 * * * *"
|
||||
contentType: "application/json"
|
||||
data: '{"message": "Hello world!"}'
|
||||
sink:
|
||||
ref:
|
||||
apiVersion: flows.knative.dev/v1
|
||||
kind: Sequence
|
||||
name: first-sequence
|
Before Width: | Height: | Size: 24 KiB |
|
@ -1,26 +0,0 @@
|
|||
apiVersion: flows.knative.dev/v1
|
||||
kind: Sequence
|
||||
metadata:
|
||||
name: first-sequence
|
||||
spec:
|
||||
channelTemplate:
|
||||
apiVersion: messaging.knative.dev/v1
|
||||
kind: InMemoryChannel
|
||||
steps:
|
||||
- ref:
|
||||
apiVersion: serving.knative.dev/v1
|
||||
kind: Service
|
||||
name: first
|
||||
- ref:
|
||||
apiVersion: serving.knative.dev/v1
|
||||
kind: Service
|
||||
name: second
|
||||
- ref:
|
||||
apiVersion: serving.knative.dev/v1
|
||||
kind: Service
|
||||
name: third
|
||||
reply:
|
||||
ref:
|
||||
kind: Sequence
|
||||
apiVersion: flows.knative.dev/v1beta1
|
||||
name: second-sequence
|
|
@ -1,26 +0,0 @@
|
|||
apiVersion: flows.knative.dev/v1
|
||||
kind: Sequence
|
||||
metadata:
|
||||
name: second-sequence
|
||||
spec:
|
||||
channelTemplate:
|
||||
apiVersion: messaging.knative.dev/v1
|
||||
kind: InMemoryChannel
|
||||
steps:
|
||||
- ref:
|
||||
apiVersion: serving.knative.dev/v1
|
||||
kind: Service
|
||||
name: fourth
|
||||
- ref:
|
||||
apiVersion: serving.knative.dev/v1
|
||||
kind: Service
|
||||
name: fifth
|
||||
- ref:
|
||||
apiVersion: serving.knative.dev/v1
|
||||
kind: Service
|
||||
name: sixth
|
||||
reply:
|
||||
ref:
|
||||
kind: Service
|
||||
apiVersion: serving.knative.dev/v1
|
||||
name: event-display
|
|
@ -1,80 +0,0 @@
|
|||
apiVersion: serving.knative.dev/v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: first
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- image: gcr.io/knative-releases/knative.dev/eventing/cmd/appender
|
||||
env:
|
||||
- name: MESSAGE
|
||||
value: " - Handled by 0"
|
||||
|
||||
---
|
||||
apiVersion: serving.knative.dev/v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: second
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- image: gcr.io/knative-releases/knative.dev/eventing/cmd/appender
|
||||
env:
|
||||
- name: MESSAGE
|
||||
value: " - Handled by 1"
|
||||
---
|
||||
apiVersion: serving.knative.dev/v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: third
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- image: gcr.io/knative-releases/knative.dev/eventing/cmd/appender
|
||||
env:
|
||||
- name: MESSAGE
|
||||
value: " - Handled by 2"
|
||||
|
||||
---
|
||||
apiVersion: serving.knative.dev/v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: fourth
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- image: gcr.io/knative-releases/knative.dev/eventing/cmd/appender
|
||||
env:
|
||||
- name: MESSAGE
|
||||
value: " - Handled by 3"
|
||||
---
|
||||
apiVersion: serving.knative.dev/v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: fifth
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- image: gcr.io/knative-releases/knative.dev/eventing/cmd/appender
|
||||
env:
|
||||
- name: MESSAGE
|
||||
value: " - Handled by 4"
|
||||
---
|
||||
apiVersion: serving.knative.dev/v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: sixth
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- image: gcr.io/knative-releases/knative.dev/eventing/cmd/appender
|
||||
env:
|
||||
- name: MESSAGE
|
||||
value: " - Handled by 5"
|
||||
---
|
|
@ -1,13 +0,0 @@
|
|||
apiVersion: sources.knative.dev/v1beta2
|
||||
kind: PingSource
|
||||
metadata:
|
||||
name: ping-source
|
||||
spec:
|
||||
schedule: "*/2 * * * *"
|
||||
contentType: "application/json"
|
||||
data: '{"message": "Hello world!"}'
|
||||
sink:
|
||||
ref:
|
||||
apiVersion: flows.knative.dev/v1
|
||||
kind: Sequence
|
||||
name: sequence
|
Before Width: | Height: | Size: 13 KiB |
|
@ -1,21 +0,0 @@
|
|||
apiVersion: flows.knative.dev/v1
|
||||
kind: Sequence
|
||||
metadata:
|
||||
name: sequence
|
||||
spec:
|
||||
channelTemplate:
|
||||
apiVersion: messaging.knative.dev/v1
|
||||
kind: InMemoryChannel
|
||||
steps:
|
||||
- ref:
|
||||
apiVersion: serving.knative.dev/v1
|
||||
kind: Service
|
||||
name: first
|
||||
- ref:
|
||||
apiVersion: serving.knative.dev/v1
|
||||
kind: Service
|
||||
name: second
|
||||
- ref:
|
||||
apiVersion: serving.knative.dev/v1
|
||||
kind: Service
|
||||
name: third
|
|
@ -1,40 +0,0 @@
|
|||
apiVersion: serving.knative.dev/v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: first
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- image: gcr.io/knative-releases/knative.dev/eventing/cmd/appender
|
||||
env:
|
||||
- name: MESSAGE
|
||||
value: " - Handled by 0"
|
||||
|
||||
---
|
||||
apiVersion: serving.knative.dev/v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: second
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- image: gcr.io/knative-releases/knative.dev/eventing/cmd/appender
|
||||
env:
|
||||
- name: MESSAGE
|
||||
value: " - Handled by 1"
|
||||
---
|
||||
apiVersion: serving.knative.dev/v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: third
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- image: gcr.io/knative-releases/knative.dev/eventing/cmd/appender
|
||||
env:
|
||||
- name: MESSAGE
|
||||
value: " - Handled by 2"
|
||||
---
|
|
@ -1,25 +0,0 @@
|
|||
apiVersion: serving.knative.dev/v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: sequence-display
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- image: gcr.io/knative-releases/knative.dev/eventing/cmd/event_display
|
||||
---
|
||||
apiVersion: eventing.knative.dev/v1
|
||||
kind: Trigger
|
||||
metadata:
|
||||
name: display-trigger
|
||||
spec:
|
||||
broker: default
|
||||
filter:
|
||||
attributes:
|
||||
type: samples.http.mod3
|
||||
subscriber:
|
||||
ref:
|
||||
apiVersion: serving.knative.dev/v1
|
||||
kind: Service
|
||||
name: sequence-display
|
||||
---
|
|
@ -1,13 +0,0 @@
|
|||
apiVersion: sources.knative.dev/v1beta2
|
||||
kind: PingSource
|
||||
metadata:
|
||||
name: ping-source
|
||||
spec:
|
||||
schedule: "*/2 * * * *"
|
||||
contentType: "application/json"
|
||||
data: '{"message": "Hello world!"}'
|
||||
sink:
|
||||
ref:
|
||||
apiVersion: eventing.knative.dev/v1
|
||||
kind: Broker
|
||||
name: default
|
Before Width: | Height: | Size: 38 KiB |
|
@ -1,26 +0,0 @@
|
|||
apiVersion: flows.knative.dev/v1
|
||||
kind: Sequence
|
||||
metadata:
|
||||
name: sequence
|
||||
spec:
|
||||
channelTemplate:
|
||||
apiVersion: messaging.knative.dev/v1
|
||||
kind: InMemoryChannel
|
||||
steps:
|
||||
- ref:
|
||||
apiVersion: serving.knative.dev/v1
|
||||
kind: Service
|
||||
name: first
|
||||
- ref:
|
||||
apiVersion: serving.knative.dev/v1
|
||||
kind: Service
|
||||
name: second
|
||||
- ref:
|
||||
apiVersion: serving.knative.dev/v1
|
||||
kind: Service
|
||||
name: third
|
||||
reply:
|
||||
ref:
|
||||
kind: Broker
|
||||
apiVersion: eventing.knative.dev/v1
|
||||
name: default
|
|
@ -1,43 +0,0 @@
|
|||
apiVersion: serving.knative.dev/v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: first
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- image: gcr.io/knative-releases/knative.dev/eventing/cmd/appender
|
||||
env:
|
||||
- name: MESSAGE
|
||||
value: " - Handled by 0"
|
||||
|
||||
---
|
||||
apiVersion: serving.knative.dev/v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: second
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- image: gcr.io/knative-releases/knative.dev/eventing/cmd/appender
|
||||
env:
|
||||
- name: MESSAGE
|
||||
value: " - Handled by 1"
|
||||
---
|
||||
apiVersion: serving.knative.dev/v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: third
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- image: gcr.io/knative-releases/knative.dev/eventing/cmd/appender
|
||||
env:
|
||||
- name: MESSAGE
|
||||
value: " - Handled by 2"
|
||||
- name: TYPE
|
||||
value: "samples.http.mod3"
|
||||
|
||||
---
|
|
@ -1,14 +0,0 @@
|
|||
apiVersion: eventing.knative.dev/v1
|
||||
kind: Trigger
|
||||
metadata:
|
||||
name: sequence-trigger
|
||||
spec:
|
||||
broker: default
|
||||
filter:
|
||||
attributes:
|
||||
type: dev.knative.sources.ping
|
||||
subscriber:
|
||||
ref:
|
||||
apiVersion: flows.knative.dev/v1
|
||||
kind: Sequence
|
||||
name: sequence
|
Before Width: | Height: | Size: 150 KiB |
Before Width: | Height: | Size: 131 KiB |
Before Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 36 KiB |
|
@ -1 +0,0 @@
|
|||
<!DOCTYPE html><html><head><title>https://knative.dev/v0.22-docs/eventing/flows/parallel/</title><link rel="canonical" href="https://knative.dev/v0.22-docs/eventing/flows/parallel/"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=https://knative.dev/v0.22-docs/eventing/flows/parallel/" /></head></html>
|
|
@ -1,39 +0,0 @@
|
|||
# Channel for testing events.
|
||||
|
||||
apiVersion: messaging.knative.dev/v1
|
||||
kind: InMemoryChannel
|
||||
metadata:
|
||||
name: camel-test
|
||||
|
||||
---
|
||||
|
||||
# Subscription from the CamelSource's output Channel to the Knative Service below.
|
||||
|
||||
apiVersion: messaging.knative.dev/v1
|
||||
kind: Subscription
|
||||
metadata:
|
||||
name: camel-source-display
|
||||
spec:
|
||||
channel:
|
||||
apiVersion: messaging.knative.dev/v1
|
||||
kind: InMemoryChannel
|
||||
name: camel-test
|
||||
subscriber:
|
||||
ref:
|
||||
apiVersion: serving.knative.dev/v1
|
||||
kind: Service
|
||||
name: camel-event-display
|
||||
|
||||
---
|
||||
|
||||
# This is a very simple Knative Service that prints the input event to its log.
|
||||
|
||||
apiVersion: serving.knative.dev/v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: camel-event-display
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- image: gcr.io/knative-releases/knative.dev/eventing-contrib/cmd/event_display
|
|
@ -1 +0,0 @@
|
|||
<!DOCTYPE html><html><head><title>https://knative.dev/v0.22-docs/eventing/sources/apache-camel-source/</title><link rel="canonical" href="https://knative.dev/v0.22-docs/eventing/sources/apache-camel-source/"/><meta name="robots" content="noindex"><meta charset="utf-8" /><meta http-equiv="refresh" content="0; url=https://knative.dev/v0.22-docs/eventing/sources/apache-camel-source/" /></head></html>
|
|
@ -1,26 +0,0 @@
|
|||
# Apache Camel Http Poller Source
|
||||
#
|
||||
# Timer Component documentation: https://camel.apache.org/components/latest/timer-component.html
|
||||
# Http Component documentation: https://camel.apache.org/components/latest/http-component.html
|
||||
#
|
||||
# List of available Apache Camel components: https://camel.apache.org/components/latest/
|
||||
#
|
||||
apiVersion: sources.knative.dev/v1alpha1
|
||||
kind: CamelSource
|
||||
metadata:
|
||||
name: camel-http-poller-source
|
||||
spec:
|
||||
source:
|
||||
flow:
|
||||
from:
|
||||
uri: timer:tick?period=10s
|
||||
steps:
|
||||
- to: https://gist.githubusercontent.com/nicolaferraro/e3c72ace3c751f9f88273896611ce5fe/raw/3b6f54060bacb56b6719b7386a4645cb59ad6cc1/quote.json
|
||||
- set-header:
|
||||
name: Content-Type
|
||||
constant: application/json
|
||||
sink:
|
||||
ref:
|
||||
apiVersion: messaging.knative.dev/v1
|
||||
kind: InMemoryChannel
|
||||
name: camel-test
|
|
@ -1,32 +0,0 @@
|
|||
# Apache Camel MQTT Source
|
||||
#
|
||||
# Paho Component documentation: https://camel.apache.org/components/latest/paho-component.html
|
||||
#
|
||||
# List of available Apache Camel components: https://camel.apache.org/components/latest/
|
||||
#
|
||||
apiVersion: sources.knative.dev/v1alpha1
|
||||
kind: CamelSource
|
||||
metadata:
|
||||
name: camel-mqtt-source
|
||||
spec:
|
||||
source:
|
||||
# To increase throughput, you can (optionally) read using multiple pods in parallel
|
||||
integration:
|
||||
replicas: 2
|
||||
flow:
|
||||
from:
|
||||
# Specify here the topic to subscribe to
|
||||
uri: paho:mytopic
|
||||
parameters:
|
||||
# URL of the MQTT source
|
||||
brokerUrl: tcp://mosquitto:1883
|
||||
# A unique client ID for the source
|
||||
clientId: mqtt-knative-bridge
|
||||
steps:
|
||||
- log:
|
||||
message: "Forwarding: ${body}"
|
||||
sink:
|
||||
ref:
|
||||
apiVersion: messaging.knative.dev/v1
|
||||
kind: InMemoryChannel
|
||||
name: camel-test
|
|
@ -1,35 +0,0 @@
|
|||
# Apache Camel Telegram Source
|
||||
#
|
||||
# Telegram Component documentation: https://camel.apache.org/components/latest/telegram-component.html
|
||||
# Simple language documentation: https://camel.apache.org/manual/latest/simple-language.html
|
||||
#
|
||||
# List of available Apache Camel components: https://camel.apache.org/components/latest/
|
||||
#
|
||||
apiVersion: sources.knative.dev/v1alpha1
|
||||
kind: CamelSource
|
||||
metadata:
|
||||
name: camel-telegram-source
|
||||
spec:
|
||||
source:
|
||||
flow:
|
||||
from:
|
||||
uri: telegram:bots
|
||||
parameters:
|
||||
authorizationToken: "<put-your-token-here>"
|
||||
steps:
|
||||
- set-header:
|
||||
name: ce-author
|
||||
simple: "${body.from.firstName} ${body.from.lastName}"
|
||||
- set-header:
|
||||
name: ce-chat
|
||||
simple: "${body.chat.id}"
|
||||
- set-header:
|
||||
name: Content-Type
|
||||
constant: text/plain
|
||||
- transform:
|
||||
simple: "${body.text}"
|
||||
sink:
|
||||
ref:
|
||||
apiVersion: messaging.knative.dev/v1
|
||||
kind: InMemoryChannel
|
||||
name: camel-test
|
|
@ -1,28 +0,0 @@
|
|||
# Apache Camel Timer Source
|
||||
#
|
||||
# Timer Component documentation: https://camel.apache.org/components/latest/timer-component.html
|
||||
#
|
||||
# List of available Apache Camel components: https://camel.apache.org/components/latest/
|
||||
#
|
||||
apiVersion: sources.knative.dev/v1alpha1
|
||||
kind: CamelSource
|
||||
metadata:
|
||||
name: camel-timer-source
|
||||
spec:
|
||||
source:
|
||||
flow:
|
||||
from:
|
||||
uri: timer:tick
|
||||
parameters:
|
||||
period: 3s
|
||||
steps:
|
||||
- set-header:
|
||||
name: Content-Type
|
||||
constant: text/plain
|
||||
- set-body:
|
||||
constant: Hello world!
|
||||
sink:
|
||||
ref:
|
||||
apiVersion: messaging.knative.dev/v1
|
||||
kind: InMemoryChannel
|
||||
name: camel-test
|