From af08818f1d1e26c14fbe07bfc265b69106787c46 Mon Sep 17 00:00:00 2001 From: Stanislav Jakuschevskij Date: Mon, 6 Oct 2025 12:11:33 +0200 Subject: [PATCH 1/2] Fix section "7-Connect Slack via Camel-K" in e2e Overhauled the Camel K operator installation and configuration. Fixed issues with the overall setup, a few typos and wrong directory paths. The Pipe CR had a typo in the Broker name "bad-word-broker". Now it is correctly "badword-broker" Issue #6423. Signed-off-by: Stanislav Jakuschevskij --- ...eventing-and-apache-camel-K-integration.md | 139 ++++++++++++------ 1 file changed, 90 insertions(+), 49 deletions(-) diff --git a/docs/versioned/bookstore/page-7/slack-sink-learning-knative-eventing-and-apache-camel-K-integration.md b/docs/versioned/bookstore/page-7/slack-sink-learning-knative-eventing-and-apache-camel-K-integration.md index 3052eed3c9c..6ae76d547e9 100644 --- a/docs/versioned/bookstore/page-7/slack-sink-learning-knative-eventing-and-apache-camel-K-integration.md +++ b/docs/versioned/bookstore/page-7/slack-sink-learning-knative-eventing-and-apache-camel-K-integration.md @@ -21,44 +21,81 @@ When a CloudEvent with the type `moderated-comment` and with `ce-bad-word-filter ## **Install prerequisites** -### **Prerequisite 1: Install Apache Camel CLI** +### **Prerequisite 1: Install Apache Camel-Kamelets** -![image](images/image16.png) - -Install the Apache Camel K CLI (`kamel`) on your local machine. You can find the installation instructions [here](https://camel.apache.org/camel-k/2.2.x/cli/cli.html){:target="_blank"}. +![image](images/image13.png) -???+ bug "Troubleshooting" - - If after installation you run `kamel version` and you get an error message, you may need to add the `kamel` binary to your system's PATH. You can do this by moving the `kamel` binary to a directory that is already in your PATH, or by adding the directory where `kamel` is located to your PATH. +Install Apache Camel K `v2.8.x` operator on your cluster using any of the methods listed in [the official installation docs](https://camel.apache.org/camel-k/2.8.x/installation/installation.html). We will use the installation via Kustomize: - ```sh - $ export PATH=$PATH: - ``` +```sh +kubectl create ns camel-k && \ +kubectl apply -k github.com/apache/camel-k/install/overlays/kubernetes/descoped?ref=v2.8.0 --server-side +``` -### **Prerequisite 2: Install Apache Camel-Kamelets** +Now you need to setup an `IntegrationPlatform` with a container registry. You can read more about it in [the official installation docs](https://camel.apache.org/camel-k/2.8.x/installation/installation.html#integration-platform). For all our needs we only need to create the `IntegrationPlatform` CR with a container registry entry. For example let's say we're using a Kind cluster with a local registry named `kind-registry` on port `5000`. Then your `IntegrationPlatform` CR will look like the following: -![image](images/image13.png) +```yaml +apiVersion: camel.apache.org/v1 +kind: IntegrationPlatform +metadata: + name: camel-k + namespace: camel-k # Make sure this is the namespace where your operator is running +spec: + build: + registry: + address: kind-registry:5000 + insecure: true +``` -Next, install Apache Camel K on your cluster using the Apache Camel K CLI: +Install it with one command: ```sh -$ kamel install --registry docker.io --organization --registry-auth-username --registry-auth-password +cat < Date: Wed, 8 Oct 2025 11:04:46 +0200 Subject: [PATCH 2/2] Fix paths for slack sink manifests. Signed-off-by: Stanislav Jakuschevskij --- ...eventing-and-apache-camel-K-integration.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/versioned/bookstore/page-7/slack-sink-learning-knative-eventing-and-apache-camel-K-integration.md b/docs/versioned/bookstore/page-7/slack-sink-learning-knative-eventing-and-apache-camel-K-integration.md index 6ae76d547e9..b404b4585da 100644 --- a/docs/versioned/bookstore/page-7/slack-sink-learning-knative-eventing-and-apache-camel-K-integration.md +++ b/docs/versioned/bookstore/page-7/slack-sink-learning-knative-eventing-and-apache-camel-K-integration.md @@ -25,7 +25,7 @@ When a CloudEvent with the type `moderated-comment` and with `ce-bad-word-filter ![image](images/image13.png) -Install Apache Camel K `v2.8.x` operator on your cluster using any of the methods listed in [the official installation docs](https://camel.apache.org/camel-k/2.8.x/installation/installation.html). We will use the installation via Kustomize: +Install Apache Camel K operator on your cluster using any of the methods listed in [the official installation docs](https://camel.apache.org/camel-k/2.8.x/installation/installation.html). We will use the installation via Kustomize: ```sh kubectl create ns camel-k && \ @@ -179,9 +179,9 @@ In the current implementation using Apache Camel K, we **can only filter based o Here, we will be connecting `bookstore-broker` with a new Broker called `badword-broker`. And we will be creating a Trigger that helps us perform the filtering with the extension `badwordfilter: good`. -- 1: Create a new file named `slack-sink/config/200-broker.yaml` and add the following content: +- 1: Create a new file named `slack-sink/config/100-broker.yaml` and add the following content: -???+ abstract "_slack-sink/config/200-broker.yaml_" +???+ abstract "_slack-sink/config/100-broker.yaml_" ```yaml --- @@ -194,7 +194,7 @@ Here, we will be connecting `bookstore-broker` with a new Broker called `badword - 2: Apply the YAML file: ```sh - kubectl apply -f slack-sink/config/200-broker.yaml + kubectl apply -f slack-sink/config/100-broker.yaml ``` You should see this message if the Broker is created successfully: @@ -248,9 +248,9 @@ We are creating the Trigger to process the events that have type `moderated-comm ![image](images/image17.png) -- 1: Append the following content to your `slack-sink/config/200-broker.yaml`: +- 1: Append the following content to your `slack-sink/config/100-broker.yaml`: -???+ abstract "_slack-sink/config/200-broker.yaml_" +???+ abstract "_slack-sink/config/100-broker.yaml_" ```yaml --- @@ -274,7 +274,7 @@ We are creating the Trigger to process the events that have type `moderated-comm - 2: Apply the YAML file: ```sh - kubectl apply -f slack-sink/config/200-broker.yaml + kubectl apply -f slack-sink/config/100-broker.yaml ``` You should see this message if the Trigger is created successfully: @@ -311,9 +311,9 @@ This setup automatically sends notifications to Slack whenever a new comment tha ![image](images/image15.png) -Create a new file named `slack-sink/config/300-slack-sink.yaml` and add the following content: +Create a new file named `slack-sink/config/100-slack-sink.yaml` and add the following content: -???+ abstract "_slack-sink/config/300-slack-sink.yaml_" +???+ abstract "_slack-sink/config/100-slack-sink.yaml_" ```yaml apiVersion: camel.apache.org/v1 @@ -343,7 +343,7 @@ Create a new file named `slack-sink/config/300-slack-sink.yaml` and add the foll 3. Apply the configuration to your Kubernetes cluster: ```sh -kubectl apply -f slack-sink/config/300-slack-sink.yaml +kubectl apply -f slack-sink/config/100-slack-sink.yaml ``` ???+ success "Verify"