radar-kafka

by RADAR-Base

Helm chartv0.4.2App 3.9.0Verified publisher

Apache Kafka for RADAR-base using the Strimzi Operator

About this chart

radar-kafka

Apache Kafka for RADAR-base using the Strimzi Operator

Homepage: https://radar-base.org

Kafka and Schema registry operators

This chart deploys a Kafka cluster through the Strimzi Kafka operator that is a dependency to this chart. Configuration for the Strimzi operator chart is passed via the strimzi-kafka-operator key in the values.yaml file. Consult the documentation of the Strimzi Kafka operator for more information on how to configure this service.

In addition, this chart deploys a Confluent Schema Registry connected to the Kafka cluster through the Strimzi Registry operator that is a dependency to this chart. Configuration for this chart is passed via the strimzi-registry-operator key in the values.yaml file. Consult the documentation of the Stimzi Registry operator for more information on how to configure this service.

Maintainers

NameEmailUrl
Pim van Nierop[email protected]https://www.thehyve.nl/experts/pim-van-nierop

Source Code

Prerequisites

  • Kubernetes 1.28+
  • Kubectl 1.28+
  • Helm 3.1.0+
  • When gatewayAPI.enabled=true: the Gateway API CRDs and a Gateway Controller (e.g. NGINX Gateway Fabric) must already be installed in the cluster, and the shared parent Gateway radar-base-k8s-gateway must exist — it can be created via the gateway-api chart

Requirements

RepositoryNameVersion
file://../../external/strimzi-kafka-operatorstrimzi-kafka-operator0.46.0
file://../../external/strimzi-registry-operatorstrimzi-registry-operator2.1.0
https://radar-base.github.io/radar-helm-chartscommon2.x.x

Values

KeyTypeDefaultDescription
server_namestring"localhost"domain name of the server
disable_tlsboolfalse
dev_deploymentboolfalseDeploy with minimal replicas, replicationFactor and without PVCs (a.k.a ephemeral mode)
nameOverridestring""String to partially override radar-kafka.fullname template with a string (will prepend the release name)
fullnameOverridestring""String to fully override radar-kafka.fullname template with a string
metricsobject{"enabled":true,"kafkaExporter":{"enableSaramaLogging":true,"groupRegex":".*","resources":{},"topicRegex":".*"},"podMonitor":{"interval":"30s","scrapeTimeout":"30s"},"prometheusRules":{"consumerGroupLagDelta":20000}}Enable metrics to be collected via Prometheus-operator
metrics.enabledbooltrueEnable monitoring of metrics
metrics.kafkaExporterobject{"enableSaramaLogging":true,"groupRegex":".*","resources":{},"topicRegex":".*"}Values for Prometheus JMX Exporter attached to Kafka pods ref: https://strimzi.io/docs/operators/latest/deploying#proc-metrics-kafka-deploy-options-str
metrics.kafkaExporter.groupRegexstring".*"Regex that selects consumer groups for KafkaExporter errors/warnings.
metrics.podMonitorobject{"interval":"30s","scrapeTimeout":"30s"}Prometheus scrap config for Kafka pods. These settings do not affect scrape of Strimzi operators.
metrics.prometheusRulesobject{"consumerGroupLagDelta":20000}Custom parameters to selected prometheus rules
metrics.prometheusRules.consumerGroupLagDeltaint20000Threshold of backpressure (number of messages not handled by consumer group) warning for consumer groups.
strimzi-kafka-operatorobjectcheck values.yamlValues for kafka operator ref: https://strimzi.io/docs/operators/latest/deploying#assembly-operators-str
strimzi-registry-operatorobject{"clusterName":"radar","operatorNamespace":"default"}Values for schema registry operator ref: https://github.com/lsst-sqre/strimzi-registry-operator
strimzi-registry-operator.clusterNamestring"radar"Keep in sync with 'fullnameOverride'
strimzi-registry-operator.operatorNamespacestring"default"Keep in sync with namespace used by deployment
kafkaobject{"cruiseControl":{"addRebalanceTemplate":true,"enabled":false,"goals":[],"javaOptions":{"-Xms":"128m","-Xmx":"256m"},"resources":{},"skipHardGoalCheck":true},"insyncReplicas":2,"javaOptions":{"-Xms":"512m","-Xmx":"1G"},"metadataVersion":"3.9-IV0","nodePool":{"jvmOptions":{"-Xms":"512m","-Xmx":"1G"},"resources":{}},"partitions":9,"podSecurityContext":{},"replicas":3,"replicationFactor":3,"resources":{"requests":{}},"securityContext":{},"storage":{"size":"10Gi"},"topicOperator":{"jvmOptions":{"-Xms":"64m","-Xmx":"128m"},"resources":{}},"userOperator":{"jvmOptions":{"-Xms":"64m","-Xmx":"128m"},"resources":{}}}Values for Kafka cluster deployed by Strimzi kafka operator
kafka.replicasint3Number of Kafka brokers
kafka.replicationFactorint3Number of replicas for Kafka topics
kafka.insyncReplicasint2Number of in-sync kafka broker replicas
kafka.partitionsint9Number of topic data partitions. Rule of thumb: 3 times the number of brokers. Headroom is used for future upscale of brokers. ref: https://learn.conduktor.io/kafka/kafka-topics-choosing-the-replication-factor-and-partitions-count/
kafka.metadataVersionstring"3.9-IV0"Metadata API version. Keep in sync with appVersion
kafka.storageobject{"size":"10Gi"}Storage size for Kafka pods
kafka.javaOptionsobject{"-Xms":"512m","-Xmx":"1G"}JVM options for Kafka pods
kafka.cruiseControlobject{"addRebalanceTemplate":true,"enabled":false,"goals":[],"javaOptions":{"-Xms":"128m","-Xmx":"256m"},"resources":{},"skipHardGoalCheck":true}Config for the Cruise Control rebalancer (https://github.com/linkedin/cruise-control)
kafka.cruiseControl.enabledboolfalseDeploy the Cruise Control rebalancer operator.
kafka.cruiseControl.addRebalanceTemplatebooltrueAdd a KafkaRebalance template CRD. Note that this does not automatically rebalance the cluster. For rebalancing, you need to create a KafkaRebalance resource using the template.
kafka.cruiseControl.goalslist[]Goals for the Cruise Control rebalancer. If left empty, the default goals are used (see: https://github.com/linkedin/cruise-control#goals).
kafka.cruiseControl.skipHardGoalCheckbooltrueSkip hard goal check by Cruise Control rebalancer.
kafka.cruiseControl.javaOptionsobject{"-Xms":"128m","-Xmx":"256m"}JVM options for Cruise Control pods
kafka.podSecurityContextobject{}Security Context for Kafka pods ref: https://strimzi.io/docs/operators/latest/deploying#assembly-security-providers-str
kafka.securityContextobject{}Security Context for Kafka containers ref: https://strimzi.io/docs/operators/latest/deploying#assembly-security-providers-str
gatewayAPIobject{"annotations":{},"backendRef":{"port":8081},"enabled":false,"filters":[{"type":"URLRewrite","urlRewrite":{"path":{"replacePrefixMatch":"/","type":"ReplacePrefixMatch"}}},{"responseHeaderModifier":{"add":[{"name":"Access-Control-Allow-Origin","value":"*"},{"name":"Access-Control-Allow-Methods","value":"GET, OPTIONS"},{"name":"Access-Control-Allow-Headers","value":"DNT,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization,Content-Encoding"},{"name":"Access-Control-Max-Age","value":"1728000"}]},"type":"ResponseHeaderModifier"}],"hostnames":["{{ .Values.server_name }}"],"https":{"port":443,"sectionName":""},"httpsRedirect":{"enabled":true,"port":80,"sectionName":"","statusCode":301},"methods":["GET","HEAD","OPTIONS"],"parentRef":{"name":"radar-base-k8s-gateway","namespace":""},"path":"/schema","pathType":"PathPrefix"}Gateway API HTTPRoute for the schema registry (alternative to ingress). Opt-in: requires the Gateway API CRDs and a Gateway controller to be installed.
gatewayAPI.enabledboolfalseEnable Gateway API HTTPRoute resource for the schema registry
gatewayAPI.annotationsobject{}Annotations to add to the HTTPRoute
gatewayAPI.parentRefobject{"name":"radar-base-k8s-gateway","namespace":""}Parent Gateway that the HTTPRoute attaches to. The Gateway itself is a shared resource and must be created separately (not by this chart).
gatewayAPI.parentRef.namestring"radar-base-k8s-gateway"Name of the Gateway
gatewayAPI.parentRef.namespacestring""Namespace of the Gateway (defaults to the release namespace when empty)
gatewayAPI.hostnameslist["{{ .Values.server_name }}"]Hostnames the HTTPRoutes accept requests for (must intersect the Gateway listener hostnames). String values support Helm templating (tpl); defaults to server_name so deployments override it the same way as ingress.hosts.
gatewayAPI.httpsobject{"port":443,"sectionName":""}HTTPS listener on the Gateway that the main route attaches to
gatewayAPI.https.portint443Listener port (empty attaches to all matching listeners)
gatewayAPI.https.sectionNamestring""Listener sectionName on the Gateway (optional)
gatewayAPI.pathTypestring"PathPrefix"Path match type (PathPrefix, Exact or RegularExpression)
gatewayAPI.pathstring"/schema"Path to match within the URL structure
gatewayAPI.methodslist["GET","HEAD","OPTIONS"]HTTP methods the route is restricted to (empty list matches all methods). Equivalent to the ingress configuration-snippet limit_except GET { deny all; }, which (per nginx) implicitly also allows HEAD, plus OPTIONS for CORS preflight.
gatewayAPI.filterslistcheck values.yamlAdditional HTTPRoute filters (e.g. URLRewrite, RequestHeaderModifier). Equivalent to the ingress annotation: strips the /schema prefix (nginx.ingress.kubernetes.io/rewrite-target: /$1).
gatewayAPI.backendRefobject{"port":8081}Backend Service reference for the schema registry Service created by strimzi-registry-operator (the named "schema-registry" port on that Service).
gatewayAPI.backendRef.portint8081Port number of the schema registry Service (Confluent Schema Registry REST API default)
gatewayAPI.httpsRedirectobject{"enabled":true,"port":80,"sectionName":"","statusCode":301}HTTP->HTTPS redirect route (equivalent to nginx force-TLS behaviour)
gatewayAPI.httpsRedirect.enabledbooltrueEnable a second HTTPRoute that 301-redirects HTTP traffic to HTTPS
gatewayAPI.httpsRedirect.portint80HTTP listener port on the Gateway to attach the redirect to
gatewayAPI.httpsRedirect.sectionNamestring""Listener sectionName on the Gateway (optional)
gatewayAPI.httpsRedirect.statusCodeint301Redirect HTTP status code
ingressobject{"annotations":{"cert-manager.io/cluster-issuer":"letsencrypt-prod","nginx.ingress.kubernetes.io/configuration-snippet":"limit_except GET {\n deny all;\n}\n","nginx.ingress.kubernetes.io/enable-cors":"true","nginx.ingress.kubernetes.io/rewrite-target":"/$1"},"enabled":false,"hosts":[{"host":"{{ $.Values.server_name }}","paths":["/schema/?(.*)"]}],"ingressClassName":"nginx","pathType":"ImplementationSpecific","tls":[{"hosts":["{{ $.Values.server_name }}"],"secretName":"radar-base-tls"}]}Ingress for the schema registry (alternative to gatewayAPI).
schema-registryobjectcheck values.yamlValues for schema registry deployed by strimzi-registry-operator ref: https://github.com/lsst-sqre/strimzi-registry-operator

Deploy radar-kafka with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has radar-kafka on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartradar-kafka is pinned at v0.4.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply