From 3bb68384fc82f7c7bef795ca797c048d13c4a92a Mon Sep 17 00:00:00 2001 From: B'Tunde Aromire Date: Thu, 7 Sep 2023 11:02:27 +0200 Subject: [PATCH] [bitnami/kafka] change zookeeper keystore pem location (#46901) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: change zookeeper ksystore pem location Signed-off-by: Babatunde Aromire * ci: signoff Signed-off-by: Babatunde Aromire * Update bitnami/kafka/3.2/debian-11/rootfs/opt/bitnami/scripts/libkafka.sh Co-authored-by: Andrés Bono Signed-off-by: B'Tunde Aromire * refactor: review suggestions Signed-off-by: Babatunde Aromire * refactor: adherence to common styles Signed-off-by: Babatunde Aromire * docs: correction of environment name in doc Signed-off-by: Babatunde Aromire --------- Signed-off-by: Babatunde Aromire Signed-off-by: B'Tunde Aromire Co-authored-by: Andrés Bono --- .../3.2/debian-11/rootfs/opt/bitnami/scripts/libkafka.sh | 4 ++-- .../3.3/debian-11/rootfs/opt/bitnami/scripts/libkafka.sh | 4 ++-- .../3.4/debian-11/rootfs/opt/bitnami/scripts/libkafka.sh | 4 ++-- .../3.5/debian-11/rootfs/opt/bitnami/scripts/libkafka.sh | 4 ++-- bitnami/kafka/README.md | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/bitnami/kafka/3.2/debian-11/rootfs/opt/bitnami/scripts/libkafka.sh b/bitnami/kafka/3.2/debian-11/rootfs/opt/bitnami/scripts/libkafka.sh index 20c923f3e60e..e6dcbc5e66bd 100644 --- a/bitnami/kafka/3.2/debian-11/rootfs/opt/bitnami/scripts/libkafka.sh +++ b/bitnami/kafka/3.2/debian-11/rootfs/opt/bitnami/scripts/libkafka.sh @@ -772,8 +772,8 @@ kafka_zookeeper_configure_tls() { elif [[ "$KAFKA_ZOOKEEPER_TLS_TYPE" = "PEM" ]] && [[ -f "$KAFKA_CERTS_DIR"/zookeeper.keystore.pem ]] && [[ -f "$KAFKA_CERTS_DIR"/zookeeper.keystore.key ]]; then # Concatenating private key into public certificate file # This is needed to load keystore from location using PEM - cat "$KAFKA_CERTS_DIR"/zookeeper.keystore.key >>"$KAFKA_CERTS_DIR"/zookeeper.keystore.pem - keystore_location="${KAFKA_CERTS_DIR}/zookeeper.keystore.pem" + keystore_location="${KAFKA_CERTS_DIR}/zookeeper.keypair.pem" + cat "${KAFKA_CERTS_DIR}/zookeeper.keystore.pem" "${KAFKA_CERTS_DIR}/zookeeper.keystore.key" > "$keystore_location" fi kafka_server_conf_set "zookeeper.clientCnxnSocket" "org.apache.zookeeper.ClientCnxnSocketNetty" diff --git a/bitnami/kafka/3.3/debian-11/rootfs/opt/bitnami/scripts/libkafka.sh b/bitnami/kafka/3.3/debian-11/rootfs/opt/bitnami/scripts/libkafka.sh index 20c923f3e60e..e6dcbc5e66bd 100644 --- a/bitnami/kafka/3.3/debian-11/rootfs/opt/bitnami/scripts/libkafka.sh +++ b/bitnami/kafka/3.3/debian-11/rootfs/opt/bitnami/scripts/libkafka.sh @@ -772,8 +772,8 @@ kafka_zookeeper_configure_tls() { elif [[ "$KAFKA_ZOOKEEPER_TLS_TYPE" = "PEM" ]] && [[ -f "$KAFKA_CERTS_DIR"/zookeeper.keystore.pem ]] && [[ -f "$KAFKA_CERTS_DIR"/zookeeper.keystore.key ]]; then # Concatenating private key into public certificate file # This is needed to load keystore from location using PEM - cat "$KAFKA_CERTS_DIR"/zookeeper.keystore.key >>"$KAFKA_CERTS_DIR"/zookeeper.keystore.pem - keystore_location="${KAFKA_CERTS_DIR}/zookeeper.keystore.pem" + keystore_location="${KAFKA_CERTS_DIR}/zookeeper.keypair.pem" + cat "${KAFKA_CERTS_DIR}/zookeeper.keystore.pem" "${KAFKA_CERTS_DIR}/zookeeper.keystore.key" > "$keystore_location" fi kafka_server_conf_set "zookeeper.clientCnxnSocket" "org.apache.zookeeper.ClientCnxnSocketNetty" diff --git a/bitnami/kafka/3.4/debian-11/rootfs/opt/bitnami/scripts/libkafka.sh b/bitnami/kafka/3.4/debian-11/rootfs/opt/bitnami/scripts/libkafka.sh index 20c923f3e60e..e6dcbc5e66bd 100644 --- a/bitnami/kafka/3.4/debian-11/rootfs/opt/bitnami/scripts/libkafka.sh +++ b/bitnami/kafka/3.4/debian-11/rootfs/opt/bitnami/scripts/libkafka.sh @@ -772,8 +772,8 @@ kafka_zookeeper_configure_tls() { elif [[ "$KAFKA_ZOOKEEPER_TLS_TYPE" = "PEM" ]] && [[ -f "$KAFKA_CERTS_DIR"/zookeeper.keystore.pem ]] && [[ -f "$KAFKA_CERTS_DIR"/zookeeper.keystore.key ]]; then # Concatenating private key into public certificate file # This is needed to load keystore from location using PEM - cat "$KAFKA_CERTS_DIR"/zookeeper.keystore.key >>"$KAFKA_CERTS_DIR"/zookeeper.keystore.pem - keystore_location="${KAFKA_CERTS_DIR}/zookeeper.keystore.pem" + keystore_location="${KAFKA_CERTS_DIR}/zookeeper.keypair.pem" + cat "${KAFKA_CERTS_DIR}/zookeeper.keystore.pem" "${KAFKA_CERTS_DIR}/zookeeper.keystore.key" > "$keystore_location" fi kafka_server_conf_set "zookeeper.clientCnxnSocket" "org.apache.zookeeper.ClientCnxnSocketNetty" diff --git a/bitnami/kafka/3.5/debian-11/rootfs/opt/bitnami/scripts/libkafka.sh b/bitnami/kafka/3.5/debian-11/rootfs/opt/bitnami/scripts/libkafka.sh index 20c923f3e60e..e6dcbc5e66bd 100644 --- a/bitnami/kafka/3.5/debian-11/rootfs/opt/bitnami/scripts/libkafka.sh +++ b/bitnami/kafka/3.5/debian-11/rootfs/opt/bitnami/scripts/libkafka.sh @@ -772,8 +772,8 @@ kafka_zookeeper_configure_tls() { elif [[ "$KAFKA_ZOOKEEPER_TLS_TYPE" = "PEM" ]] && [[ -f "$KAFKA_CERTS_DIR"/zookeeper.keystore.pem ]] && [[ -f "$KAFKA_CERTS_DIR"/zookeeper.keystore.key ]]; then # Concatenating private key into public certificate file # This is needed to load keystore from location using PEM - cat "$KAFKA_CERTS_DIR"/zookeeper.keystore.key >>"$KAFKA_CERTS_DIR"/zookeeper.keystore.pem - keystore_location="${KAFKA_CERTS_DIR}/zookeeper.keystore.pem" + keystore_location="${KAFKA_CERTS_DIR}/zookeeper.keypair.pem" + cat "${KAFKA_CERTS_DIR}/zookeeper.keystore.pem" "${KAFKA_CERTS_DIR}/zookeeper.keystore.key" > "$keystore_location" fi kafka_server_conf_set "zookeeper.clientCnxnSocket" "org.apache.zookeeper.ClientCnxnSocketNetty" diff --git a/bitnami/kafka/README.md b/bitnami/kafka/README.md index bcc70a4c8f88..508896b28f7d 100644 --- a/bitnami/kafka/README.md +++ b/bitnami/kafka/README.md @@ -207,7 +207,7 @@ The configuration can easily be setup with the Bitnami Apache Kafka Docker image * `KAFKA_CFG_PROCESS_ROLES`: Node roles when running in KRaft mode. No defaults. * `KAFKA_CFG_NODE_ID`: Unique node id, required when running in KRaft mode. No defaults. * `KAFKA_CFG_CONTROLLER_QUORUM_VOTERS`: Map of id/endpoint information for the set of controller quorum voters in a comma-separated list of {id}@{host}:{port} entries. No defaults. -* `KAFKA_RAFT_CLUSTER_ID`: Kafka cluster ID when using Kafka Raft (KRaft). No defaults. +* `KAFKA_KRAFT_CLUSTER_ID`: Kafka cluster ID when using Kafka Raft (KRaft). No defaults. Additionally, any environment variable beginning with `KAFKA_CFG_` will be mapped to its corresponding Apache Kafka key. For example, use `KAFKA_CFG_BACKGROUND_THREADS` in order to set `background.threads` or `KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE` in order to configure `auto.create.topics.enable`.