From 0f4bd34010a73bdbf21a212acef92a3db5878163 Mon Sep 17 00:00:00 2001 From: Alex Ellis Date: Fri, 31 May 2024 10:59:02 +0100 Subject: [PATCH] Update README.md Signed-off-by: Alex Ellis --- chart/kafka-connector/README.md | 56 ++++++++++++++++++++------------- 1 file changed, 35 insertions(+), 21 deletions(-) diff --git a/chart/kafka-connector/README.md b/chart/kafka-connector/README.md index 04434773c..87ff9c879 100644 --- a/chart/kafka-connector/README.md +++ b/chart/kafka-connector/README.md @@ -1,34 +1,32 @@ # OpenFaaS Pro Kafka Connector -The [Kafka connector](https://docs.openfaas.com/openfaas-pro/introduction) brings Kafka to OpenFaaS by invoking functions based on Kafka topic annotations. +The Kafka connector brings Kafka to OpenFaaS by invoking functions based on Kafka topic annotations. -* See also: [Staying on topic: trigger your OpenFaaS functions with Apache Kafka](https://www.openfaas.com/blog/kafka-connector/) +See also: [Docs & tutorials for the Kafka connector](https://docs.openfaas.com/openfaas-pro/introduction) ## Prerequisites -- Purchase a license +- Obtain an license for OpenFaaS - You will need an OpenFaaS License - - Contact us to find out more [openfaas.com/pricing](https://www.openfaas.com/pricing) + You will need an OpenFaaS license, [find out more](https://www.openfaas.com/pricing) - Install OpenFaaS - You must have a working OpenFaaS installed. + You must have a working OpenFaaS installation. -- Self-hosted Kafka with Helm +- Option 1 - hosted Kafka - For development and testing, you can install [Apache Kafka](https://kafka.apache.org/) using Confluent's [chart](https://github.com/confluentinc/cp-helm-charts). Find out additional options here: [available here](https://github.com/helm/charts/tree/master/incubator/kafka#installing-the-chart) + [Aiven](https://aiven.io/) and [Confluent Cloud](https://confluent.cloud/) have both been tested with the Kafka Connector. -- Hosted Kafka + Other hosted Kafka offerings such as Kafka like Redpanda should also work. - [Aiven](https://aiven.io/) and [Confluent Cloud](https://confluent.cloud/) have both been tested with the Kafka Connector. +- Option 2 - Self-hosted Kafka -Other versions of Kafka like Redpanda should work out of the box. + For development and testing, you can install [Apache Kafka](https://kafka.apache.org/) using Confluent's [chart](https://github.com/confluentinc/cp-helm-charts). Find out additional options here: [available here](https://github.com/helm/charts/tree/master/incubator/kafka#installing-the-chart) -## Complete walk-through guide +- Option 3 - Use an existing Kafka deployment - You can continue with this guide, or start the [walk-through](quickstart.md) for testing purposes. + If you already have Kafka deployed, you'll all the usual details such as whether TLS is enabled along with any required certs, what kind of authentication is being used, what the topic names are, and the partition size for each. ## Install the Chart @@ -45,21 +43,26 @@ $ kubectl create secret generic \ ```sh $ helm repo add openfaas https://openfaas.github.io/faas-netes/ -$ helm upgrade kafka-connector openfaas/kafka-connector \ - --install \ - --namespace openfaas ``` -> The above command will also update your helm repo to pull in any new releases. +Prepare a custom [values.yaml](values.yaml) with: -## Install a development version +* brokerHosts - comma separted list of host:port +* topics - the topics to subscribe to +* replicas - this should match the partition size, so if the size is 3, set this to 3 + +Then you will need to read up on the encryption and authentication options and update the settings accordingly. ```sh -$ helm upgrade kafka-connector ./chart/kafka-connector \ +$ helm repo update && \ + helm upgrade kafka-connector openfaas/kafka-connector \ --install \ - --namespace openfaas + --namespace openfaas \ + -f ./custom-values.yaml ``` +> The above command will also update your helm repo to pull in any new releases. + ## Encryption options 1) TLS off (default) @@ -105,6 +108,17 @@ Additional kafka-connector options in `values.yaml`. Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. See `values.yaml` for the default configuration. +## Install a development version of the chart + +When developing on the chart locally, just specify the path to the chart where you've cloned it: + +```sh +$ helm upgrade kafka-connector ./chart/kafka-connector \ + --install \ + --namespace openfaas \ + -f values.yaml +``` + ## Removing the kafka-connector All control plane components can be cleaned up with helm: