You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Stephen A (Jira)" <ji...@apache.org> on 2025/01/23 17:03:00 UTC

[jira] [Comment Edited] (KAFKA-6416) Create an official Kafka Helm chart for running a Kafka cluster

    [ https://issues.apache.org/jira/browse/KAFKA-6416?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17912505#comment-17912505 ] 

Stephen A edited comment on KAFKA-6416 at 1/23/25 5:02 PM:
-----------------------------------------------------------

I have a Helm chart for Kafka that I can submit to the Kafka repo to become an official chart. It uses the official Docker image and creates a cluster using KRaft.

I have build the chart to construct the properties files as ConfigMaps which are mounted into the containers. This means that any property can be set as a Helm value.

Kafka properties use a dot notation like `this.is.a.property.name`. To set values like this in Helm means to map these to nested Yaml values like
{code:java}
this:
  is:
    a:
      property:
        name: 'value' {code}
My Helm chart flattens and merges properties so you can set values in a yaml files like:
{noformat}
properties:
  num.partitions: 32
  offsets.topic.replication.factor: 1{noformat}
or, on the command line as
{noformat}
helm install kafka chart --set properties.num.partitions=32 --set properties.offsets.topic.replication.factor=1{noformat}
but doesn't really make sense in yaml as the properties are not really nested.


was (Author: JIRAUSER308163):
I have a Helm chart for Kafka that I can submit to the Kafka repo to become an official chart. It uses the official Docker image and creates a cluster using KRaft.

There are options to how properties are handled, and I'd like some feedback on these. I have build the chart to construct the properties files as ConfigMaps which are mounted into the containers. This means that any property can be set as a Helm value.

Kafka properties use a dot notation like `this.is.a.property.name`. To set values like this in Helm means to map these to nested Yaml values like
{code:java}
this:
  is:
    a:
      property:
        name: 'value' {code}
This works nicely for setting values on the command like:
{noformat}
helm install kafka chart --set properties.num.partitions=32{noformat}
but doesn't really make sense in yaml as the properties are not really nested.

Another option would be to replace the dot (`.`) with an underscore. (and probably a double underscore to represent a an escaped underscore).

A third option would be to use camel case to replace the dots. This is more in-keeping with Helm values, but could be difficult (impossible) to distinguish where a property name uses camel case already, for example log4j.appender.controllerAppender

> Create an official Kafka Helm chart for running a Kafka cluster
> ---------------------------------------------------------------
>
>                 Key: KAFKA-6416
>                 URL: https://issues.apache.org/jira/browse/KAFKA-6416
>             Project: Kafka
>          Issue Type: Wish
>    Affects Versions: 1.0.0
>            Reporter: Matthew T. Adams
>            Priority: Major
>              Labels: chart, cluster, docker, helm
>
> This issue requests that the Apache Kafka team release a [Helm|https://helm.sh] chart for running Kafka as a cluster.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)