mirror of
https://github.com/bitnami/charts.git
synced 2026-03-04 14:57:36 +08:00
[bitnami/kafka] fix: Setup of sasl authentication to external zookeeper (#23550)
Signed-off-by: Christian Kuhn <phello@gmx.de> Signed-off-by: Carlos Rodríguez Hernández <carlosrh@vmware.com> Signed-off-by: Rafael Ríos Saavedra <rrios@vmware.com> Co-authored-by: Carlos Rodríguez Hernández <carlosrh@vmware.com> Co-authored-by: Rafael Ríos Saavedra <rrios@vmware.com>
This commit is contained in:
@@ -42,4 +42,4 @@ maintainers:
|
||||
name: kafka
|
||||
sources:
|
||||
- https://github.com/bitnami/charts/tree/main/bitnami/kafka
|
||||
version: 27.1.0
|
||||
version: 27.1.1
|
||||
|
||||
@@ -676,11 +676,6 @@ Zookeeper connection section of the server.properties
|
||||
{{- define "kafka.zookeeperConfig" -}}
|
||||
zookeeper.connect={{ include "kafka.zookeeperConnect" . }}
|
||||
#broker.id=
|
||||
{{- if .Values.sasl.zookeeper.user }}
|
||||
sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required \
|
||||
username="{{ .Values.sasl.zookeeper.user }}" \
|
||||
password="zookeeper-password-placeholder";
|
||||
{{- end }}
|
||||
{{- if and .Values.tls.zookeeper.enabled .Values.tls.zookeeper.existingSecret }}
|
||||
zookeeper.clientCnxnSocket=org.apache.zookeeper.ClientCnxnSocketNetty
|
||||
zookeeper.ssl.client.enable=true
|
||||
|
||||
@@ -306,6 +306,11 @@ spec:
|
||||
- name: kafka-config
|
||||
mountPath: /opt/bitnami/kafka/config/server.properties
|
||||
subPath: server.properties
|
||||
{{- if .Values.sasl.zookeeper.user }}
|
||||
- name: kafka-config
|
||||
mountPath: /opt/bitnami/kafka/config/kafka_jaas.conf
|
||||
subPath: kafka_jaas.conf
|
||||
{{- end }}
|
||||
- name: tmp
|
||||
mountPath: /tmp
|
||||
{{- if or .Values.log4j .Values.existingLog4jConfigMap }}
|
||||
|
||||
@@ -322,6 +322,18 @@ data:
|
||||
fi
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.sasl.zookeeper.user }}
|
||||
export KAFKA_CONFIG_FILE=/config/kafka_jaas.conf
|
||||
cat << EOF > /config/kafka_jaas.conf
|
||||
Client {
|
||||
org.apache.kafka.common.security.plain.PlainLoginModule required
|
||||
username="{{ .Values.sasl.zookeeper.user }}"
|
||||
password="zookeeper-password-placeholder";
|
||||
};
|
||||
EOF
|
||||
replace_placeholder "zookeeper-password-placeholder" "$KAFKA_ZOOKEEPER_PASSWORD"
|
||||
{{- end }}
|
||||
|
||||
export KAFKA_CONFIG_FILE=/config/server.properties
|
||||
cp /configmaps/server.properties $KAFKA_CONFIG_FILE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user