[bitnami/kafka] Release 3.3.1-debian-11-r7 (#11478)

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
This commit is contained in:
Bitnami Bot 2022-10-26 15:16:20 +02:00 committed by GitHub
parent 9dc4460784
commit 8c3e736315
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 3 deletions

View File

@ -5,7 +5,7 @@ ARG TARGETARCH
LABEL org.opencontainers.image.authors="https://bitnami.com/contact" \
org.opencontainers.image.description="Application packaged by Bitnami" \
org.opencontainers.image.ref.name="3.3.1-debian-11-r6" \
org.opencontainers.image.ref.name="3.3.1-debian-11-r7" \
org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/kafka" \
org.opencontainers.image.title="kafka" \
org.opencontainers.image.vendor="VMware, Inc." \
@ -22,7 +22,7 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN install_packages ca-certificates curl procps zlib1g
RUN mkdir -p /tmp/bitnami/pkg/cache/ && cd /tmp/bitnami/pkg/cache/ && \
COMPONENTS=( \
"java-11.0.17-7-0-linux-${OS_ARCH}-debian-11" \
"java-11.0.17-7-1-linux-${OS_ARCH}-debian-11" \
"gosu-1.14.0-155-linux-${OS_ARCH}-debian-11" \
"wait-for-port-1.0.3-155-linux-${OS_ARCH}-debian-11" \
"render-template-1.0.3-154-linux-${OS_ARCH}-debian-11" \

View File

@ -11,7 +11,7 @@
"digest": "972009952c7ab083836ce1943c7768daac74ec3cbea63eb5994b38e7c9794b75",
"distro": "debian-11",
"type": "NAMI",
"version": "11.0.17-7-0"
"version": "11.0.17-7-1"
},
"kafka": {
"arch": "amd64",

View File

@ -559,6 +559,25 @@ kafka_configure_ssl() {
file_to_multiline_property() {
awk 'NR > 1{print line" \\"}{line=$0;}END{print $0" "}' <"${1:?missing file}"
}
remove_previous_cert_value() {
local key="${1:?missing key}"
files=(
"${KAFKA_CONF_FILE}"
"${KAFKA_CONF_DIR}/producer.properties"
"${KAFKA_CONF_DIR}/consumer.properties"
)
for file in "${files[@]}"; do
if grep -q "^[#\\s]*$key\s*=.*" "$file"; then
# Delete all lines from the certificate beginning to its end
sed -i "/^[#\\s]*$key\s*=.*-----BEGIN/,/-----END/d" "$file"
fi
done
}
# We need to remove the previous cert value
# kafka_common_conf_set uses replace_in_file, which can't match multiple lines
remove_previous_cert_value ssl.keystore.key
remove_previous_cert_value ssl.keystore.certificate.chain
remove_previous_cert_value ssl.truststore.certificates
configure_both ssl.keystore.key "$(file_to_multiline_property "${KAFKA_CERTS_DIR}/kafka.keystore.key")"
configure_both ssl.keystore.certificate.chain "$(file_to_multiline_property "${KAFKA_CERTS_DIR}/kafka.keystore.pem")"
configure_both ssl.truststore.certificates "$(file_to_multiline_property "${kafka_truststore_location}")"