diff --git a/README.md b/README.md index 96f8320d..a577ef51 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Eventing Manager is a standard Kubernetes [operator](https://kubernetes.io/docs/ This project is scaffolded using [Kubebuilder](https://book.kubebuilder.io), and all the Kubebuilder `makefile` helpers mentioned [here](https://book.kubebuilder.io/reference/makefile-helpers.html) can be used. -## Get started +## Get Started You need a Kubernetes cluster to run against. You can use [k3d](https://k3d.io/) to get a local cluster for testing, or run against a remote cluster. > **Note:** Your controller automatically uses the current context in your kubeconfig file, that is, whatever cluster `kubectl cluster-info` shows. @@ -42,7 +42,7 @@ You need a Kubernetes cluster to run against. You can use [k3d](https://k3d.io/) - [kustomize](https://kustomize.io/) - Access to Kubernetes cluster ([k3d](https://k3d.io/) / k8s) -### Run Eventing Manager locally +### Run Eventing Manager Locally 1. Install the CRDs into the cluster: @@ -58,7 +58,7 @@ You need a Kubernetes cluster to run against. You can use [k3d](https://k3d.io/) > **NOTE:** You can also run this in one step with the command: `make install run`. -### Run tests +### Run Tests Run the unit and integration tests: @@ -76,7 +76,7 @@ make generate-and-test make lint ``` -### Modify the API definitions +### Modify the API Definitions If you are editing the API definitions, generate the manifests such as CRs or CRDs: @@ -88,7 +88,7 @@ make manifests For more information, see the [Kubebuilder documentation](https://book.kubebuilder.io/introduction.html). -### Build container images +### Build Container Images Build and push your image to the location specified by `IMG`: @@ -107,7 +107,7 @@ make docker-buildx IMG=/eventing-manager: You need a Kubernetes cluster to run against. You can use [k3d](https://k3d.io/) to get a local cluster for testing, or run against a remote cluster. > **Note:** Your controller automatically uses the current context in your kubeconfig file, that is, whatever cluster `kubectl cluster-info` shows. -### Deploy on the cluster +### Deploy on the Cluster 1. Download Go packages: @@ -133,14 +133,15 @@ You need a Kubernetes cluster to run against. You can use [k3d](https://k3d.io/) make deploy IMG=/eventing-manager: ``` -4. [Optional] Install `Eventing` Custom Resource: +5. [Optional] Install `Eventing` Custom Resource: ```sh kubectl apply -f config/samples/default.yaml ``` -5. For EventMesh backend, if the Kyma Kubernetes cluster is managed by Gardener, then the Eventing Manager reads the cluster public domain from the ConfigMap **kube-system/shoot-info**. +6. For EventMesh backend, if the Kyma Kubernetes cluster is managed by Gardener, then the Eventing Manager reads the cluster public domain from the ConfigMap **kube-system/shoot-info**. Otherwise, set the **spec.backend.config.domain** to the cluster public domain in the `eventing` custom resource; for example: + ```yaml spec: backend: @@ -167,7 +168,7 @@ To delete the CRDs from the cluster: make uninstall ``` -### Deploy Eventing Manager module with [Kyma Lifecycle Manager](https://github.com/kyma-project/lifecycle-manager/tree/main) +### Deploy Eventing Manager Module With [Kyma Lifecycle Manager](https://github.com/kyma-project/lifecycle-manager/tree/main) 1. Deploy the Lifecycle Manager to the Kubernetes cluster: @@ -203,7 +204,7 @@ To delete the CRDs from the cluster: kubectl get -n kyma-system kyma ``` -### Uninstall Eventing Manager module with [Kyma Lifecycle Manager](https://github.com/kyma-project/lifecycle-manager/tree/main) +### Uninstall Eventing Manager Module With [Kyma Lifecycle Manager](https://github.com/kyma-project/lifecycle-manager/tree/main) 1. Delete Eventing custom resource (CR) from the Kubernetes cluster (if exists): diff --git a/docs/assets/evnt-architecture.svg b/docs/assets/evnt-architecture.svg index 2e27ffbe..9347ff5e 100644 --- a/docs/assets/evnt-architecture.svg +++ b/docs/assets/evnt-architecture.svg @@ -1,4 +1,4 @@ - + -
Event Source
Event Source
User Namespace
User Namespace
Subscription CR
sink: function: test
Subscription CR...
kyma-system Namespace
kyma-system Namespace
Kyma cluster
Kyma cluster
NATS publisher proxy
NATS publisher pr...
NATS
 server
NATS...
publishes events
publishes events
sends event
sends event
dispatches events
dispatches events
1
1
2%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22%26lt%3Bfont%20color%3D%26quot%3B%23ffffff%26quot%3B%20style%3D%26quot%3Bfont-size%3A%2019px%26quot%3B%26gt%3B1%26lt%3B%2Ffont%26gt%3B%22%20style%3D%22ellipse%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3BstrokeColor%3D%230A6ED1%3BfillColor%3D%230A6ED1%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20x%3D%22185%22%20y%3D%22220%22%20width%3D%2240%22%20height%3D%2240%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3E
2%3Cmx...
4
4
3
3
5
5
creates infrastructure
creates infrastructure
watches subscription
watches subscription
dispatches event
dispatches event
6
6
Reference key:
Reference key:
function: test
function: test
Dashed connectors represent background processes
Dashed connectors represent background processes
NATS eventing controller
NATS eventing contro...
Text is not SVG - cannot display
\ No newline at end of file +Kyma ClusterUser Namespace
Event Source
Event Source
Subscription CR
sink: function: test
Subscription CR...
<kyma-system> Namespace
NATS publisher proxy
NATS publisher pr...
NATS
 server
NATS...
function: test
function: test
NATS eventing controller
NATS eventing con...
Reference key:
Reference key:
Dashed connectors represent background processes
Dashed connectors represent background processes
watches subscription
watches subscription
dispatches event
dispatches event
1
1
6
6
dispatches events
dispatches events
creates infrastructure
creates infrastructure
2%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22%26lt%3Bfont%20color%3D%26quot%3B%23ffffff%26quot%3B%20style%3D%26quot%3Bfont-size%3A%2019px%26quot%3B%26gt%3B1%26lt%3B%2Ffont%26gt%3B%22%20style%3D%22ellipse%3BwhiteSpace%3Dwrap%3Bhtml%3D1%3BstrokeColor%3D%230A6ED1%3BfillColor%3D%230A6ED1%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20x%3D%22185%22%20y%3D%22220%22%20width%3D%2240%22%20height%3D%2240%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3E
2%3Cmx...
5
5
sends event
sends event
4
4
publishes
 events
publishes...
3
3
Text is not SVG - cannot display
\ No newline at end of file diff --git a/docs/assets/evnt-pubsub.svg b/docs/assets/evnt-pubsub.svg index e82bc8fc..c29eb07d 100644 --- a/docs/assets/evnt-pubsub.svg +++ b/docs/assets/evnt-pubsub.svg @@ -1,4 +1,4 @@ - + -
Publisher
Publisher
Backend
Backend
publish events
(A and B)
publish events...
filter and
send events
filter and...
Subscriber (A)
Subscriber (A)
Subscriber
Subscriber
Subscribers (B)
Subscribers (B)
Text is not SVG - cannot display
\ No newline at end of file +
Publisher
Publisher
Backend
Backend
Subscriber (A)
Subscriber (A)
Subscriber
Subscriber
publish events
(A and B)
publish events...
filter and
send events
filter and...
Subscribers (B)
Subscribers (B)
Text is not SVG - cannot display
\ No newline at end of file diff --git a/docs/assets/reconcileLoop.svg b/docs/assets/reconcileLoop.svg index 1605fbbf..8ade93cc 100644 --- a/docs/assets/reconcileLoop.svg +++ b/docs/assets/reconcileLoop.svg @@ -1,4 +1,4 @@ -
Eventing CR
Eventing CR
Eventing Reconciler
Eventing Reconciler
NATS Path
NATS Path
EventMesh Path
EventMesh Path
Reconciliation Loop
Reconciliation Loop
Text is not SVG - cannot display
\ No newline at end of file +
Eventing CR
Eventing CR
Eventing Reconciler
Eventing Reconciler
NATS Path
NATS Path
EventMesh Path
EventMesh Path
Reconciliation Loop
Reconciliation Loop
Text is not SVG - cannot display
\ No newline at end of file diff --git a/docs/contributor/development.md b/docs/contributor/development.md index c3db1814..96fef022 100644 --- a/docs/contributor/development.md +++ b/docs/contributor/development.md @@ -13,7 +13,8 @@ Projects created by Kubebuilder contain a Makefile with tooling that must be loc - [kustomize](https://kustomize.io/) - [golangci-lint](https://golangci-lint.run/) -## Available commands +## Available Commands + Commands are available for easier development and installation of Eventing Manager. To find out which commands are available and for some more details about each command, run: diff --git a/docs/contributor/governance.md b/docs/contributor/governance.md index 9d111c79..508dca1b 100644 --- a/docs/contributor/governance.md +++ b/docs/contributor/governance.md @@ -3,7 +3,7 @@ Some quality aspects are covered by automated verification, so you must execute tooling locally before a commit. This document guides you through the development flow. -## Modifying the API definitions +## Modifying the API Definitions This project uses the [controller-gen](https://book.kubebuilder.io/reference/controller-gen.html) tool provided by [Kubebuilder](https://book.kubebuilder.io/). To modify the API definitions, you must adapt the ["marker comments"](https://book.kubebuilder.io/reference/markers.html) in the Go code. @@ -13,17 +13,19 @@ The rules are written using the [Common Expression Language](https://github.com/ For further information and examples, look to the [Kubernetes documentation](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#validation) of validation rules and the CEL [language definition](https://github.com/google/cel-spec/blob/v0.10.0/doc/langdef.md). After the modifications, run the following command to generate the new manifests, such as custom resources (CRs) and CustomResourceDefinitions (CRDs): + ```sh make manifests ``` If changes to the `runtime.Object` interface were made, the `DeepCopy` functions must be updated as well. The generation is controlled by [Kubebuilder markers](https://book.kubebuilder.io/reference/markers/object.html?highlight=deep#objectdeepcopy). + ```sh make generate ``` -## Source code linting +## Source Code Linting The quality of this project is ensured by source code linting using [golangci-lint](https://golangci-lint.run/). diff --git a/docs/contributor/installation.md b/docs/contributor/installation.md index a9bd95eb..01e4553a 100644 --- a/docs/contributor/installation.md +++ b/docs/contributor/installation.md @@ -1,14 +1,15 @@ -# Installation and uninstallation +# Installation and Uninstallation There are several ways to install Eventing Manager. For development, you must run some make targets beforehand. For information about the prerequisites, refer to [Development](./development.md) and for a detailed guide to the development flow, visit [Governance](./governance.md). -## Run the manager on a (k3d) cluster using a Docker image +## Run the Manager on a (k3d) Cluster Using a Docker Image ### Installation 1. Ensure you have a k3d cluster ready. + ```sh k3d create cluster ``` @@ -57,9 +58,9 @@ This step depends on your desired backend: NATS or EventMesh. ```sh kubectl apply -f config/samples/default.yaml ``` - + The `spec.backend.type` needs to be set to `NATS`. You can configure the backend using the `NATS` related field in `spec.backend.config`. - + ```sh spec: backend: @@ -78,12 +79,12 @@ This step depends on your desired backend: NATS or EventMesh. ```sh kubectl apply -f config/samples/default_eventmesh.yaml ``` - + - `spec.backend.type`: set to `EventMesh` - `spec.backend.config.eventMeshSecret`: set it to the `/` where you applied the secret - `spec.backend.config.eventTypePrefix`: change to your desired value or leave as is - `spec.backend.config.domain`: set to the cluster public domain - + If the Kyma Kubernetes cluster is managed by Gardener, Eventing Manager reads the cluster public domain automatically from the ConfigMap `kube-system/shoot-info`. Otherwise, you need to additionally set `spec.backend.config.domain` in the configuration. @@ -123,7 +124,7 @@ This step depends on your desired backend: NATS or EventMesh. make uninstall ``` -## Run Eventing Manager on a cluster using the Go runtime environment +## Run Eventing Manager on a Cluster Using the Go Runtime Environment ### Installation @@ -157,7 +158,7 @@ Remove the resources. make uninstall ``` -## Run Eventing Manager using Kyma's Lifecycle Manager +## Run Eventing Manager Using Kyma’s Lifecycle Manager [Kyma's Lifecycle Manager](https://github.com/kyma-project/lifecycle-manager) helps manage the lifecycle of each module in the cluster and can be used to install Eventing Manager. diff --git a/docs/contributor/testing.md b/docs/contributor/testing.md index 30a07abd..3a08b1ac 100644 --- a/docs/contributor/testing.md +++ b/docs/contributor/testing.md @@ -12,7 +12,7 @@ This document provides an overview of the testing activities used in this projec > **NOTE:** The validation and defaulting rules are tested within the integration tests. -### Unit tests and env-tests +### Unit Tests and Env-Tests To run the unit and integration tests, the following command must be executed. If necessary, the needed binaries for the integration tests are downloaded to `./bin`. Further information about integration tests can be found in the [Kubebuilder book](https://book.kubebuilder.io/reference/envtest.html). @@ -27,7 +27,7 @@ If changes to the source code were made, or if this is your first time to execut make test ``` -### E2E tests +### E2E Tests Because E2E tests need a Kubernetes cluster to run on, they are separate from the remaining tests. diff --git a/docs/contributor/troubleshooting.md b/docs/contributor/troubleshooting.md index 3bc55344..47315c2c 100644 --- a/docs/contributor/troubleshooting.md +++ b/docs/contributor/troubleshooting.md @@ -4,23 +4,23 @@ This document contains tips and tricks for common problems with Eventing Manager If you cannot find your issue described here, take a look at the [Eventing Troubleshooting](https://github.com/kyma-project/eventing-manager/blob/main/docs/user/troubleshooting/README.md) -## Troubleshooting: Installing Eventing Manager using a Docker image +## Troubleshooting: Installing Eventing Manager Using a Docker Image -### Error while deploying Eventing Manager +### Error While Deploying Eventing Manager **Symptom:** The `make deploy` step fails with the following error message: `Error from server (NotFound): error when creating "STDIN": namespaces kyma-system not found` -**Cause:** The Namespace of the Deployment does not exist yet. +**Cause:** The namespace of the Deployment does not exist yet. -**Remedy:** Create the Namespace. +**Remedy:** Create the namespace. ```sh kubectl create ns kyma-system ``` -## Reach out to us +## Reach Out to Us If you encounter an issue or want to report a bug, please create a [GitHub issue](https://github.com/kyma-project/nats-manager/issues) with background information and steps on how to reproduce. diff --git a/docs/user/01-manager.md b/docs/user/01-manager.md index 6a6c3063..1833f076 100644 --- a/docs/user/01-manager.md +++ b/docs/user/01-manager.md @@ -1,8 +1,8 @@ -# Eventing manager +# Eventing Manager This module ships Eventing Manager. Once this module is enabled, it provides the functionality to send and receive events. -## Module lifecycle +## Module Lifecycle Upon starting Eventing Manager, the controller (following the [Kubebuilder concept](https://book.kubebuilder.io/architecture.html)) creates, watches, and reconciles the following resources: @@ -31,6 +31,6 @@ Eventing Manager supports switching between two different backends. [NATS](https For more information about the possible configuration of Eventing Manager using NATS or EventMesh backend, refer to the [backend configuration](02-configuration.md#reference). -## Removing the module +## Removing the Module The module cannot be removed as long as Subscription CRs exist. After the user cleans up all the subscriptions, the Eventing module can be removed. The module takes care of cleaning up all resources owned by it. diff --git a/docs/user/README.md b/docs/user/README.md index 76a405f3..2c2704a9 100644 --- a/docs/user/README.md +++ b/docs/user/README.md @@ -1,6 +1,6 @@ -# Eventing module +# Eventing Module -This module ships Eventing Manager, which is a standard Kubernetes operator that observes the state of Eventing resources and reconciles them according to the desired state. +The Eventing module ships Eventing Manager, which is a standard Kubernetes operator that observes the state of Eventing resources and reconciles them according to the desired state. With Kyma Eventing, you can focus on your business workflows and trigger them with events to implement asynchronous flows within Kyma. Generally, eventing consists of event producers (or publishers) and consumers (or subscribers) that send events to or receive events from an event processing backend. @@ -12,7 +12,7 @@ Kyma Eventing uses the following technology: - [HTTP POST](https://www.w3schools.com/tags/ref_httpmethods.asp) requests to simplify sending and receiving events - Declarative [Subscription custom resource (CR)](./resources/evnt-cr-subscription.md) to subscribe to events -## Kyma Eventing flow +## Kyma Eventing Flow Kyma Eventing follows the PubSub messaging pattern: Kyma publishes messages to a messaging backend, which filters these messages and sends them to interested subscribers. Kyma does not send messages directly to the subscribers as shown below: @@ -39,44 +39,3 @@ For more information, read [Eventing architecture](evnt-architecture.md). - **Delivery Guarantees** - `at least once` delivery: With NATS JetStream, Kyma ensures that for each event published, all the subscribers subscribed to that event receive the event at least once. - `max bytes and discard policy`: NATS JetStream uses these configurations to ensure that no messages are lost when the storage is almost full. By default, Kyma ensures that no new messages are accepted when the storage reaches 90% capacity. - -## Documentation overview - -To learn more about how Eventing works, see: - -- [Eventing module](01-manager.md) - provides a general overview of the Eventing module -- [Eventing module configuration](02-configuration.md) - contains information about configuring the Eventing module -- [Eventing architecture](evnt-architecture.md) - describes how Eventing works and the main actors involved, such as Eventing Manager and Event Publisher Proxy. -- [Event names](evnt-event-names.md) - contains information about event names and event name cleanup. -- [Subscription CR](./resources/evnt-cr-subscription.md) - describes the Subscription custom resource, which you need to subscribe to events. -- [CloudEvents](https://cloudevents.io/) - provides information about the CloudEvents specification used in Kyma. -- [NATS JetStream](https://docs.nats.io/nats-concepts/jetstream) - provides more information about the backend technology behind Eventing in Kyma. [Eventing Architecture](evnt-architecture.md#jet-stream) provides details on the functionalities and higher qualities of service on top of Core NATS. - -To learn more about technical details aimed at possible contributors, check out the following documents: -- [Development](../contributor/development.md) - provides general information about the setup -- [Governance](../contributor/governance.md) - provides information about the rules and norms of this project -- [Installation guide](../contributor/installation.md) - contains information about the different ways to install the Eventing module -- [Testing](../contributor/testing.md) - describes the test coverage of the project -- [Troubleshooting](../contributor/troubleshooting.md) - provides general information about troubleshooting the module - -To perform tasks with Eventing, go through these tutorials: - -- [Tutorial: Trigger your workload with an event](https://kyma-project.io/#/02-get-started/04-trigger-workload-with-event) - shows how to deploy a Function and trigger it with an event. -- [Tutorial: Create Subscription subscribing to multiple event types](tutorials/evnt-02-subs-with-multiple-filters.md) - shows how to subscribe to one or more event types using the Kyma Subscription. -- [Tutorial: Event name cleanup in Subscriptions](tutorials/evnt-03-type-cleanup.md) - explains how Kyma Eventing filters out prohibited characters from event names. -- [Tutorial: Changing Events Max-In-Flight in Subscriptions](tutorials/evnt-04-change-max-in-flight-in-sub.md) - shows how to set idle "in-flight messages" limit in Kyma Subscriptions. -- [Tutorial: Publish legacy events using Kyma Eventing](tutorials/evnt-05-send-legacy-events.md) - demonstrates how to send legacy events using Kyma Eventing. - -To troubleshoot Eventing-related issues: - -- [Basic Eventing Troubleshooting](troubleshooting/evnt-01-eventing-troubleshooting.md) -- [NATS JetStream Troubleshooting](troubleshooting/evnt-02-jetstream-troubleshooting.md) -- [Event Type Collision](troubleshooting/evnt-03-type-collision.md) -- [Eventing Backend Storage Full](troubleshooting/evnt-04-free-jetstream-storage.md) - -For other technical resources, check out these links on the Kyma GitHub repository: - -- [Eventing Helm chart](https://github.com/kyma-project/kyma/tree/main/resources/eventing) -- [Event Publishing Proxy](https://github.com/kyma-project/kyma/tree/main/components/event-publisher-proxy) -- [Eventing Manager](https://github.com/kyma-project/kyma/tree/main/components/eventing-controller) -- [Eventing Metrics](evnt-eventing-metrics.md) diff --git a/docs/user/_sidebar.md b/docs/user/_sidebar.md index 23ab3f94..23828dfe 100644 --- a/docs/user/_sidebar.md +++ b/docs/user/_sidebar.md @@ -1,21 +1,23 @@ -* [Home](/README.md) -* [Eventing module](README.md) -* [Module lifecycle](01-manager.md) -* [Configuration](02-configuration.md) -* [Eventing architecture](evnt-architecture.md) -* [Event names](evnt-event-names.md) -* [Eventing metrics](evnt-eventing-metrics.md) + +* [Back to Kyma Home](/) +* [Eventing module](/eventing-manager/user/README.md) +* [Module lifecycle](/eventing-manager/user/01-manager.md) +* [Configuration](/eventing-manager/user/02-configuration.md) +* [Eventing Architecture](/eventing-manager/user/evnt-architecture.md) +* [Event Names](/eventing-manager/user/evnt-event-names.md) +* [Eventing Metrics](/eventing-manager/user/evnt-eventing-metrics.md) * Tutorials - * [Prerequisites](./tutorials/evnt-01-prerequisites.md) - * [Create Subscription subscribing to multiple event types](./tutorials/evnt-02-subs-with-multiple-filters.md) - * [Event name cleanup in Subscriptions](./tutorials/evnt-03-type-cleanup.md) - * [Changing events max-in-flight in Subscriptions](./tutorials/evnt-04-change-max-in-flight-in-sub.md) - * [Publish legacy events using Kyma Eventing](./tutorials/evnt-05-send-legacy-events.md) + * [Prerequisites](/eventing-manager/user/tutorials/evnt-01-prerequisites.md) + * [Create Subscription Subscribing to Multiple Event Types](/eventing-manager/user/tutorials/evnt-02-subs-with-multiple-filters.md) + * [Event Name Cleanup in Subscriptions](/eventing-manager/user/tutorials/evnt-03-type-cleanup.md) + * [Changing Events Max-In-Flight in Subscriptions](/eventing-manager/user/tutorials/evnt-04-change-max-in-flight-in-sub.md) + * [Publish Legacy Events Using Kyma Eventing](/eventing-manager/user/tutorials/evnt-05-send-legacy-events.md) * Resources - * [Subscription CR](./resources/evnt-cr-subscription.md) + * [Subscription CR](/eventing-manager/user/resources/evnt-cr-subscription.md) * Troubleshooting - * [Kyma Eventing - basic diagnostics](./troubleshooting/evnt-01-eventing-troubleshooting.md) - * [NATS JetStream backend troubleshooting](./troubleshooting/evnt-02-jetstream-troubleshooting.md) - * [Subscriber receives irrelevant events](./troubleshooting/evnt-03-type-collision.md) - * [Eventing backend stopped receiving events due to full storage](./troubleshooting/evnt-04-free-jetstream-storage.md) - * [Published events are pending in the stream](./troubleshooting/evnt-05-fix-pending-messages.md) + * [Kyma Eventing - Basic Diagnostics](/eventing-manager/user/troubleshooting/evnt-01-eventing-troubleshooting.md) + * [NATS JetStream Backend Troubleshooting](/eventing-manager/user/troubleshooting/evnt-02-jetstream-troubleshooting.md) + * [Subscriber Receives Irrelevant Events](/eventing-manager/user/troubleshooting/evnt-03-type-collision.md) + * [Eventing Backend Stopped Receiving Events Due To Full Storage](/eventing-manager/user/troubleshooting/evnt-04-free-jetstream-storage.md) + * [Published Events Are Pending in the Stream](/eventing-manager/user/troubleshooting/evnt-05-fix-pending-messages.md) + diff --git a/docs/user/evnt-architecture.md b/docs/user/evnt-architecture.md index 264b7987..e53043cd 100644 --- a/docs/user/evnt-architecture.md +++ b/docs/user/evnt-architecture.md @@ -1,8 +1,8 @@ -# Eventing architecture +# Eventing Architecture Eventing uses Event Publisher Proxy and Eventing Manager to connect to the default NATS JetStream backend. They work together to process and deliver events in Kyma. -## Event processing and delivery +## Event Processing and Delivery The event processing and delivery flow uses the NATS server to process events and send them to subscribers. This diagram explains the event flow in Kyma, from the moment an event source sends an event, to the point when the event triggers the Function. diff --git a/docs/user/evnt-event-names.md b/docs/user/evnt-event-names.md index da1d8e5b..a6c6aad5 100644 --- a/docs/user/evnt-event-names.md +++ b/docs/user/evnt-event-names.md @@ -1,27 +1,30 @@ -# Event names +# Event Names Event names depend on the type of event. Eventing supports the following event types: + - [CloudEvents](https://cloudevents.io/) - they use a specification for describing event data in a common way. - legacy events - they are converted to CloudEvents by [Event Publisher Proxy](evnt-architecture.md#event-publisher-proxy). -## Event name format +## Event Name Format For a Subscription custom resource (CR), the fully qualified event name takes the sample form of `order.created.v1` or `Account.Root.Created.v1`. The event type is composed of the following components: + - Event: can have two or more segments separated by `.`; for example, `order.created` or `Account.Root.Created` - Version: `v1` For publishers, the event type takes this sample form: + - `order.created` or `Account.Root.Created` for legacy events coming from the `commerce` application - `order.created.v1` or `Account.Root.Created.v1` for CloudEvents -## Event name cleanup +## Event Name Cleanup To conform to Cloud Event specifications, sometimes Eventing must modify the event name before dispatching an event. -### Special characters +### Special Characters If the event name contains any prohibited characters as per [NATS JetStream specifications](https://docs.nats.io/running-a-nats-service/nats_admin/jetstream_admin/naming), the underlying Eventing services use a clean name with allowed characters only; for example, `system>prod*` becomes `systemprod`. diff --git a/docs/user/evnt-eventing-metrics.md b/docs/user/evnt-eventing-metrics.md index 53645ffa..08d4d215 100644 --- a/docs/user/evnt-eventing-metrics.md +++ b/docs/user/evnt-eventing-metrics.md @@ -1,9 +1,9 @@ -# Kyma Eventing metrics +# Kyma Eventing Metrics Kyma Eventing provides various metrics, so you can monitor statistics and other information in real time. The metrics follow the [Prometheus naming convention](https://prometheus.io/docs/practices/naming/). -## Metrics emitted by Eventing Publisher Proxy +## Metrics Emitted by Eventing Publisher Proxy | Metric | Description | | ---------------------------------------------- | :------------------------------------------------------------------------------- | @@ -13,7 +13,7 @@ The metrics follow the [Prometheus naming convention](https://prometheus.io/docs | **eventing_epp_requests_duration_seconds** | The duration of processing an incoming request (includes sending to the backend) | | **eventing_epp_requests_total** | The total number of requests | -## Metrics emitted by Eventing Manager +## Metrics Emitted by Eventing Manager | Metric | Description | | --------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------- | @@ -23,6 +23,6 @@ The metrics follow the [Prometheus naming convention](https://prometheus.io/docs | **eventing_ec_nats_subscriber_dispatch_duration_seconds** | The duration of sending an incoming NATS message to the subscriber (not including processing the message in the dispatcher) | | **eventing_ec_subscription_status** | The status of a subscription. `1` indicates the subscription is marked as ready | -### Metrics emitted by NATS Exporter: +### Metrics Emitted by NATS Exporter The [Prometheus NATS Exporter](https://github.com/nats-io/prometheus-nats-exporter) also emits metrics that you can monitor. Learn more about [NATS Monitoring](https://docs.nats.io/running-a-nats-service/configuration/monitoring#jetstream-information). diff --git a/docs/user/resources/_sidebar.md b/docs/user/resources/_sidebar.md deleted file mode 100644 index 60cea1af..00000000 --- a/docs/user/resources/_sidebar.md +++ /dev/null @@ -1,3 +0,0 @@ -- [Eventing module](../README.md) -- Resources - - [Subscription](evnt-cr-subscription.md) \ No newline at end of file diff --git a/docs/user/resources/evnt-cr-subscription.md b/docs/user/resources/evnt-cr-subscription.md index e10549de..30594c53 100644 --- a/docs/user/resources/evnt-cr-subscription.md +++ b/docs/user/resources/evnt-cr-subscription.md @@ -4,13 +4,13 @@ The `subscriptions.eventing.kyma-project.io` CustomResourceDefinition (CRD) is a `kubectl get crd subscriptions.eventing.kyma-project.io -o yaml` -## Sample custom resource +## Sample Custom Resource This sample Subscription custom resource (CR) subscribes to an event called `order.created.v1`. > **WARNING:** Prohibited characters in event names under the **spec.types** property, are not supported in some backends. If any are detected, Eventing will remove them. Read [Event names](../evnt-event-names.md#event-name-cleanup) for more information. -> **NOTE:** Both the subscriber and the Subscription should exist in the same Namespace. +> **NOTE:** Both the subscriber and the Subscription should exist in the same namespace. ```yaml apiVersion: eventing.kyma-project.io/v1alpha2 @@ -28,7 +28,7 @@ spec: maxInFlightMessages: "10" ``` -## Custom resource parameters +## Custom Resource Parameters This table lists all the possible parameters of a given resource together with their descriptions: @@ -145,7 +145,7 @@ This table lists all the possible parameters of a given resource together with t -## Related resources and components +## Related Resources and Components These components use this CR: diff --git a/docs/user/troubleshooting/_sidebar.md b/docs/user/troubleshooting/_sidebar.md deleted file mode 100644 index 6eedc6bb..00000000 --- a/docs/user/troubleshooting/_sidebar.md +++ /dev/null @@ -1,9 +0,0 @@ -- [Eventing module](../README.md) -- Troubleshooting - - [Troubleshooting - Eventing](README.md) - - [Kyma Eventing - basic diagnostics](evnt-01-eventing-troubleshooting.md) - - [NATS JetStream backend troubleshooting](evnt-02-jetstream-troubleshooting.md) - - [Subscriber receives irrelevant events](evnt-03-type-collision.md) - - [Eventing backend stopped receiving events due to full storage](evnt-04-free-jetstream-storage.md) - - [Published events are pending in the stream](evnt-05-fix-pending-messages.md) - \ No newline at end of file diff --git a/docs/user/troubleshooting/evnt-01-eventing-troubleshooting.md b/docs/user/troubleshooting/evnt-01-eventing-troubleshooting.md index 4298dcaf..50e06814 100644 --- a/docs/user/troubleshooting/evnt-01-eventing-troubleshooting.md +++ b/docs/user/troubleshooting/evnt-01-eventing-troubleshooting.md @@ -1,4 +1,4 @@ -# Kyma Eventing - basic diagnostics +# Kyma Eventing - Basic Diagnostics ## Symptom @@ -16,7 +16,7 @@ Trouble with Kyma Eventing may be caused by various issues, so this document gui Follow these steps to detect the source of the problem: -### Step 1: Check the status of the Eventing custom resource (CR) +### Step 1: Check the Status of the Eventing Custom Resource (CR) 1. Check the Eventing CR. Is the **State** field `Ready`? @@ -32,7 +32,7 @@ Follow these steps to detect the source of the problem: 3. If the **State** is `Ready`, the Eventing CR is not an issue. Follow the next steps to find the source of the problem. -### Step 2: Check the status of the Subscription +### Step 2: Check the Status of the Subscription 1. Check whether the Subscription is `Ready`. Run the command: @@ -50,7 +50,7 @@ Follow these steps to detect the source of the problem: 3. Check if the event type defined in the Subscription is correctly formatted as specified in the [Event names](../evnt-event-names.md) guidelines. -### Step 3: Check if the event was published correctly +### Step 3: Check if the Event Was Published Correctly 1. Check the HTTP status code returned after sending an event. @@ -67,7 +67,7 @@ Follow these steps to detect the source of the problem: kubectl -n {NAMESPACE} get subscriptions.eventing.kyma-project.io {NAME} -o jsonpath='{.spec.filter.filters}' ``` -### Step 4: Check the Eventing Manager logs +### Step 4: Check the Eventing Manager Logs 1. Check the logs from the Eventing Manager Pod for any errors and to verify that the event is dispatched. To fetch these logs, run this command: @@ -84,7 +84,7 @@ Follow these steps to detect the source of the problem: - Eventing Manager cannot connect to NATS Server. -### Step 5: Check if the Subscription sink is healthy +### Step 5: Check if the Subscription Sink Is Healthy 1. Check whether the workload URL defined in the Subscription sink is correct and healthy to receive events. To get the sink from the Subscription, run this command: @@ -102,7 +102,7 @@ Follow these steps to detect the source of the problem: If the returned HTTP status code is not 2xx, check the logs of the subscriber instance. -### Step 6: Check NATS JetStream status +### Step 6: Check NATS JetStream Status 1. Check the health of NATS Pods. Run the command: diff --git a/docs/user/troubleshooting/evnt-04-free-jetstream-storage.md b/docs/user/troubleshooting/evnt-04-free-jetstream-storage.md index 7b7b20ed..caa4bdc0 100644 --- a/docs/user/troubleshooting/evnt-04-free-jetstream-storage.md +++ b/docs/user/troubleshooting/evnt-04-free-jetstream-storage.md @@ -1,4 +1,4 @@ -# Eventing backend stopped receiving events due to full storage +# Eventing Backend Stopped Receiving Events Due To Full Storage ## Symptom @@ -26,12 +26,9 @@ There are several ways to free the space on NATS JetStream backend: - If the published events are too large, the consumer cannot deliver them fast enough before the storage is full. In that case, either slow down the events' publish rate until the events are delivered, or scale the NATS backend with additional replicas. - - Check the [NATS JetStream backend status](evnt-01-eventing-troubleshooting.md#step-6-check-nats-jetstream-status) and if [the sink is reachable and can accept the events](evnt-01-eventing-troubleshooting.md#step-5-check-if-the-subscription-sink-is-healthy). - - The `Interest` retention policy specifies that events published to the subject are not kept in the stream if they don't match any consumer filter. You can delete a Kyma Subscription, which automatically removes all the pending messages in the stream that were published to that Subscription's subject. - -- In case the events' publish rate is very high (more than 1.5k events per second), speed up the event dispatching by increasing the `maxInFlightMessages` configuration of the Subscription (default is set to 10) accordingly. Due to low `maxInFlightMessages`, the dispatcher will not be able to keep up with the publisher, and as a result, the stream size will keep growing. +- If the events' publish rate is very high (more than 1.5k events per second), speed up the event dispatching by increasing the `maxInFlightMessages` configuration of the Subscription (default is set to 10) accordingly. Due to low `maxInFlightMessages`, the dispatcher will not be able to keep up with the publisher, and as a result, the stream size will keep growing. diff --git a/docs/user/tutorials/_sidebar.md b/docs/user/tutorials/_sidebar.md deleted file mode 100644 index c7fcfcd9..00000000 --- a/docs/user/tutorials/_sidebar.md +++ /dev/null @@ -1,7 +0,0 @@ -- [Eventing module](../README.md) -- Tutorials - - [Prerequisites](evnt-01-prerequisites.md) - - [Create Subscription subscribing to multiple event types](evnt-02-subs-with-multiple-filters.md) - - [Event name cleanup in Subscriptions](evnt-03-type-cleanup.md) - - [Changing events max-in-flight in Subscriptions](evnt-04-change-max-in-flight-in-sub.md) - - [Publish legacy events using Kyma Eventing](evnt-05-send-legacy-events.md) diff --git a/docs/user/tutorials/evnt-01-prerequisites.md b/docs/user/tutorials/evnt-01-prerequisites.md index af0bd5ec..a6951e6a 100644 --- a/docs/user/tutorials/evnt-01-prerequisites.md +++ b/docs/user/tutorials/evnt-01-prerequisites.md @@ -1,21 +1,25 @@ -# Eventing - tutorials +# Eventing Tutorials Browse the tutorials for Eventing to learn how to use it step-by-step in different scenarios. -### Prerequisites +## Prerequisites -To perform the steps described in the Eventing tutorials, you need the following: +To perform the Eventing tutorials, you need the following setup: 1. [Kyma cluster provisioned](https://kyma-project.io/#/02-get-started/01-quick-install). -2. (Optional) [Kyma Dashboard](https://kyma-project.io/#/01-overview/ui/README?id=kyma-dashboard) deployed on the Kyma cluster. To access the Dashboard, run: +2. (Optional) [Kyma dashboard](https://kyma-project.io/#/01-overview/ui/README?id=kyma-dashboard) deployed on the Kyma cluster. To access the Dashboard, run: + ```bash kyma dashboard ``` + Alternatively, you can just use the `kubectl` CLI instead. -3. (Optional) [CloudEvents Conformance Tool](https://github.com/cloudevents/conformance) for publishing events. +3. (Optional) [CloudEvents Conformance Tool](https://github.com/cloudevents/conformance) for publishing events. + ```bash go install github.com/cloudevents/conformance/cmd/cloudevents@latest ``` + Alternatively, you can just use `curl` to publish events. diff --git a/docs/user/tutorials/evnt-02-subs-with-multiple-filters.md b/docs/user/tutorials/evnt-02-subs-with-multiple-filters.md index e6a03edc..688fc127 100644 --- a/docs/user/tutorials/evnt-02-subs-with-multiple-filters.md +++ b/docs/user/tutorials/evnt-02-subs-with-multiple-filters.md @@ -1,4 +1,4 @@ -# Create Subscription subscribing to multiple event types +# Create Subscription Subscribing to Multiple Event Types The [Subscription](../resources/evnt-cr-subscription.md) CustomResourceDefinition (CRD) is used to subscribe to events. In this tutorial, you learn how to subscribe to one or more event types using the Kyma Subscription. @@ -9,7 +9,7 @@ The [Subscription](../resources/evnt-cr-subscription.md) CustomResourceDefinitio 1. Follow the [Prerequisites steps](evnt-01-prerequisites.md) for the Eventing tutorials. 2. [Create a Function](https://kyma-project.io/#/02-get-started/04-trigger-workload-with-event#create-a-function). -## Create a Subscription with multiple event types +## Create a Subscription With Multiple Event Types To subscribe to multiple events, you need a [Subscription](../resources/evnt-cr-subscription.md) custom resource (CR). In the following example, you learn how to subscribe to events of two types: `order.received.v1` and `order.changed.v1`. @@ -19,7 +19,7 @@ To subscribe to multiple events, you need a [Subscription](../resources/evnt-cr- Kyma Dashboard -1. Go to **Namespaces** and select the default Namespace. +1. Go to **Namespaces** and select the default namespace. 2. Go to **Configuration** > **Subscriptions** and click **Create Subscription+**. 3. Provide the following parameters: - **Subscription name**: `lastorder-sub` @@ -40,6 +40,7 @@ To subscribe to multiple events, you need a [Subscription](../resources/evnt-cr- Run: + ```bash cat < @@ -92,13 +96,13 @@ In the following example, you port-forward the [Event Publisher Proxy](../evnt-a --data "{\"orderCode\":\"3211213\", \"orderStatus\":\"received\"}" \ --yaml ``` - +
curl - + ```bash curl -v -X POST \ -H "ce-specversion: 1.0" \ @@ -120,7 +124,7 @@ In the following example, you port-forward the [Event Publisher Proxy](../evnt-a CloudEvents Conformance Tool - + ```bash cloudevents send http://localhost:3000/publish \ --type order.changed.v1 \ @@ -130,13 +134,13 @@ In the following example, you port-forward the [Event Publisher Proxy](../evnt-a --data "{\"orderCode\":\"3211213\", \"orderStatus\":\"changed\"}" \ --yaml ``` - +
curl - + ```bash curl -v -X POST \ -H "ce-specversion: 1.0" \ @@ -151,12 +155,13 @@ In the following example, you port-forward the [Event Publisher Proxy](../evnt-a
-## Verify the event delivery +## Verify the Event Delivery To verify that the events were properly delivered, check the logs of the Function (see [Verify the event delivery](https://kyma-project.io/#/02-get-started/04-trigger-workload-with-event?id=verify-the-event-delivery)). -You will see the received event in the logs: -``` +You see the received event in the logs: + +```sh Received event: { orderCode: '3211213', orderStatus: 'received' } Received event: { orderCode: '3211213', orderStatus: 'changed' } ``` diff --git a/docs/user/tutorials/evnt-03-type-cleanup.md b/docs/user/tutorials/evnt-03-type-cleanup.md index 8ed1dd96..29fda5f7 100644 --- a/docs/user/tutorials/evnt-03-type-cleanup.md +++ b/docs/user/tutorials/evnt-03-type-cleanup.md @@ -1,4 +1,4 @@ -# Event name cleanup in Subscriptions +# Event Name Cleanup in Subscriptions To conform to Cloud Event specifications, sometimes Eventing must modify the event names to filter out prohibited characters. This tutorial presents one example of event name cleanup. You learn how Eventing behaves when you create a [Subscription](../resources/evnt-cr-subscription.md) having prohibited characters in the event names. Read more about [Event name format and cleanup](../evnt-event-names.md). @@ -25,13 +25,13 @@ You learn how Eventing behaves when you create a [Subscription](../resources/evn } } ``` - +
kubectl - + ```bash cat < -## Create a Subscription with Event type consisting of alphanumeric characters +## Create a Subscription With Event Type Consisting of Alphanumeric Characters Create a [Subscription](../resources/evnt-cr-subscription.md) custom resource (CR) and subscribe for events of the type: `order.payment*success.v1`. Note that `order.payment*success.v1` contains a prohibited character, the asterisk `*`. @@ -72,7 +72,7 @@ Create a [Subscription](../resources/evnt-cr-subscription.md) custom resource (C Kyma Dashboard -1. Go to **Namespaces** and select the default Namespace. +1. Go to **Namespaces** and select the default namespace. 2. Go to **Configuration** > **Subscriptions** and click **Create Subscription+**. 3. Provide the following parameters: - **Subscription name**: `lastorder-payment-sub` @@ -91,6 +91,7 @@ Create a [Subscription](../resources/evnt-cr-subscription.md) custom resource (C Run: + ```bash cat < -## Check the Subscription cleaned Event type +## Check the Subscription Cleaned Event Type To check the Subscription cleaned Event type, run: + ```bash kubectl get subscriptions lastorder-payment-sub -o=jsonpath="{.status.types}" ``` Note that the returned event type `["order.paymentsuccess.v1"]` does not contain the asterisk `*` in the `payment*success` part. That's because Kyma Eventing cleans out the prohibited characters from the event name and uses the cleaned event name in the underlying Eventing backend. -## Trigger the workload with an event +## Trigger the Workload With an Event You created the `lastorder` Function, and subscribed to the `order.payment*success.v1` events by creating a Subscription CR. Next, you see that you can still publish events with the original Event name (i.e. `order.payment*success.v1`) even though it contains the prohibited character, and it triggers the Function. 1. Port-forward the [Event Publisher Proxy](../evnt-architecture.md) Service to localhost, using port `3000`. Run: + ```bash kubectl -n kyma-system port-forward service/eventing-publisher-proxy 3000:80 ``` + 2. Publish an event to trigger your Function. In another terminal window, run:
@@ -140,7 +145,7 @@ Next, you see that you can still publish events with the original Event name (i. CloudEvents Conformance Tool - + ```bash cloudevents send http://localhost:3000/publish \ --type "order.payment*success.v1" \ @@ -150,13 +155,13 @@ Next, you see that you can still publish events with the original Event name (i. --data "{\"orderCode\":\"3211213\", \"orderAmount\":\"1250\"}" \ --yaml ``` - +
curl - + ```bash curl -v -X POST \ -H "ce-specversion: 1.0" \ @@ -171,14 +176,16 @@ Next, you see that you can still publish events with the original Event name (i.
-## Verify the event delivery +## Verify the Event Delivery To verify that the event was properly delivered, check the logs of the Function (see [Verify the event delivery](https://kyma-project.io/#/02-get-started/04-trigger-workload-with-event?id=verify-the-event-delivery)). You see the received event in the logs: -``` + +```sh Received event: { orderCode: '3211213', orderAmount: '1250' } , Event Type: order.paymentsuccess.v1 ``` + Note that the `Event Type` of the received event is not the same as defined in the Subscription. ## Conclusion diff --git a/docs/user/tutorials/evnt-04-change-max-in-flight-in-sub.md b/docs/user/tutorials/evnt-04-change-max-in-flight-in-sub.md index 9a0da5a4..c5a058fa 100644 --- a/docs/user/tutorials/evnt-04-change-max-in-flight-in-sub.md +++ b/docs/user/tutorials/evnt-04-change-max-in-flight-in-sub.md @@ -1,4 +1,4 @@ -# Changing events max-in-flight in Subscriptions +# Changing Events Max-In-Flight in Subscriptions In this tutorial, you learn how to set idle "in-flight messages" limit in Kyma Subscriptions. The "in-flight messages" config defines the number of events that Kyma Eventing forwards in parallel to the sink, without waiting for a response. @@ -16,7 +16,7 @@ The "in-flight messages" config defines the number of events that Kyma Eventing Kyma Dashboard - + ```js module.exports = { main: async function (event, context) { @@ -28,13 +28,13 @@ The "in-flight messages" config defines the number of events that Kyma Eventing } } ``` - +
kubectl - + ```bash cat < -## Create a Subscription with Max-In-Flight config +## Create a Subscription With Max-In-Flight Config Create a [Subscription](../resources/evnt-cr-subscription.md) custom resource (CR). Subscribe for events of the type: `order.received.v1` and set the `maxInFlightMessages` to `5`, so that Kyma Eventing forwards maximum 5 events in parallel to the sink without waiting for a response. @@ -78,7 +78,7 @@ Create a [Subscription](../resources/evnt-cr-subscription.md) custom resource (C Kyma Dashboard -1. Go to **Namespaces** and select the default Namespace. +1. Go to **Namespaces** and select the default namespace. 2. Go to **Configuration** > **Subscriptions** and click **Create Subscription+**. 3. Switch to the **Advanced** tab, and provide the following parameters: - **Subscription name**: `lastorder-sub` @@ -87,7 +87,7 @@ Create a [Subscription](../resources/evnt-cr-subscription.md) custom resource (C - **Service**: `lastorder` (The sink field will be populated automatically.) - **Type matching:**: `standard` - **Source**: `myapp` - + 4. Click **Create**. 5. Wait a few seconds for the Subscription to have status `READY`. @@ -98,6 +98,7 @@ Create a [Subscription](../resources/evnt-cr-subscription.md) custom resource (C Run: + ```bash cat < -## Trigger the workload with multiple events +## Trigger the Workload With Multiple Events You created the `lastorder` Function, and subscribed to the `order.received.v1` events by creating a Subscription CR. Next, publish 15 events at once and see how Kyma Eventing triggers the workload. 1. Port-forward the [Event Publisher Proxy](../evnt-architecture.md) Service to localhost, using port `3000`. Run: + ```bash kubectl -n kyma-system port-forward service/eventing-publisher-proxy 3000:80 ``` + 2. Now publish 15 events to the Event Publisher Proxy Service. In another terminal window, run:
@@ -140,7 +144,7 @@ Next, publish 15 events at once and see how Kyma Eventing triggers the workload. CloudEvents Conformance Tool - + ```bash for i in {1..15} do @@ -153,13 +157,13 @@ Next, publish 15 events at once and see how Kyma Eventing triggers the workload. --yaml done ``` - +
curl - + ```bash for i in {1..15} do @@ -177,12 +181,13 @@ Next, publish 15 events at once and see how Kyma Eventing triggers the workload.
-## Verify the event delivery +## Verify the Event Delivery To verify that the events ware properly delivered, check the logs of the Function (see [Verify the event delivery](https://kyma-project.io/#/02-get-started/04-trigger-workload-with-event?id=verify-the-event-delivery)). You will see the received events in the logs as: -``` + +```sh Processing event: { orderCode: '1' } Processing event: { orderCode: '2' } Processing event: { orderCode: '3' } @@ -215,4 +220,4 @@ Completely processed event: { orderCode: '14' } Completely processed event: { orderCode: '15' } ``` -You can see that only 5 events at maximum were delivered to the Function in parallel and as soon as the Function completes the processing of the event and returns the response, Kyma Eventing delivers the next in-line event to the Function. +You can see that only 5 events at maximum were delivered to the Function in parallel and as soon as the Function completes the processing of the event and returns the response, Kyma Eventing delivers the next in-line event to the Function. diff --git a/docs/user/tutorials/evnt-05-send-legacy-events.md b/docs/user/tutorials/evnt-05-send-legacy-events.md index d2220917..2067050a 100644 --- a/docs/user/tutorials/evnt-05-send-legacy-events.md +++ b/docs/user/tutorials/evnt-05-send-legacy-events.md @@ -1,4 +1,4 @@ -# Publish legacy events using Kyma Eventing +# Publish Legacy Events Using Kyma Eventing Kyma Eventing also supports sending and receiving of legacy events. In this tutorial we will show how to send legacy events. @@ -21,7 +21,7 @@ To subscribe to events, we need a [Subscription](../resources/evnt-cr-subscripti Kyma Dashboard -1. Go to **Namespaces** and select the default Namespace. +1. Go to **Namespaces** and select the default namespace. 2. Go to **Configuration** > **Subscriptions** and click **Create Subscription+**. 3. Provide the following parameters: - **Subscription name**: `lastorder-sub` @@ -40,6 +40,7 @@ To subscribe to events, we need a [Subscription](../resources/evnt-cr-subscripti Run: + ```bash cat < -## Publish a legacy event to trigger the workload +## Publish a Legacy Event To Trigger the Workload You created the `lastorder` Function, and subscribed to the `order.received.v1` events by creating a Subscription CR. Now it's time to send an event and trigger the Function. 1. Port-forward the [Event Publisher Proxy](../evnt-architecture.md) Service to localhost, using port `3000`. Run: + ```bash kubectl -n kyma-system port-forward service/eventing-publisher-proxy 3000:80 ``` + 2. Publish an event to trigger your Function. In another terminal window, run: ```bash @@ -92,11 +96,12 @@ You created the `lastorder` Function, and subscribed to the `order.received.v1` > **NOTE:** If you want to use a Function to publish a CloudEvent, see the [Event object SDK specification](https://kyma-project.io/#/serverless-manager/user/technical-reference/07-70-function-specification?id=event-object-sdk). -## Verify the legacy event delivery +## Publish Legacy Events Using Kyma Eventing To verify that the event was properly delivered, check the logs of the Function (see [Verify the event delivery](https://kyma-project.io/#/02-get-started/04-trigger-workload-with-event?id=verify-the-event-delivery)). You see the received event in the logs: -``` + +```sh Received event: { orderCode: '3211213' } ```