mirror of
https://github.com/bitnami/charts.git
synced 2026-08-10 14:15:55 +08:00
[bitnami/kafka] Do not use zookeeperUser if zookeeper auth is not enabled (#6103)
This commit is contained in:
@@ -29,4 +29,4 @@ name: kafka
|
||||
sources:
|
||||
- https://github.com/bitnami/bitnami-docker-kafka
|
||||
- https://kafka.apache.org/
|
||||
version: 12.17.1
|
||||
version: 12.17.2
|
||||
|
||||
@@ -206,7 +206,7 @@ Return true if a JAAS credentials secret object should be created
|
||||
*/}}
|
||||
{{- define "kafka.createJaasSecret" -}}
|
||||
{{- $secretName := coalesce .Values.auth.sasl.jaas.existingSecret .Values.auth.jaas.existingSecret -}}
|
||||
{{- if and (or (include "kafka.client.saslAuthentication" .) (include "kafka.interBroker.saslAuthentication" .) .Values.auth.jaas.zookeeperUser) (empty $secretName) -}}
|
||||
{{- if and (or (include "kafka.client.saslAuthentication" .) (include "kafka.interBroker.saslAuthentication" .) (and .Values.zookeeper.auth.enabled .Values.auth.jaas.zookeeperUser)) (empty $secretName) -}}
|
||||
{{- true -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -354,7 +354,7 @@ kafka: rbac.create
|
||||
|
||||
{{/* Validate values of Kafka - SASL mechanisms must be provided when using SASL */}}
|
||||
{{- define "kafka.validateValues.saslMechanisms" -}}
|
||||
{{- if and (or (.Values.auth.clientProtocol | regexFind "sasl") (.Values.auth.interBrokerProtocol | regexFind "sasl") .Values.auth.jaas.zookeeperUser) (not .Values.auth.saslMechanisms) }}
|
||||
{{- if and (or (.Values.auth.clientProtocol | regexFind "sasl") (.Values.auth.interBrokerProtocol | regexFind "sasl") (and .Values.zookeeper.auth.enabled .Values.auth.jaas.zookeeperUser)) (not .Values.auth.saslMechanisms) }}
|
||||
kafka: auth.saslMechanisms
|
||||
The SASL mechanisms are required when either auth.clientProtocol or auth.interBrokerProtocol use SASL or Zookeeper user is provided.
|
||||
{{- end }}
|
||||
|
||||
@@ -26,7 +26,7 @@ data:
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- $zookeeperUser := coalesce .Values.auth.sasl.jaas.zookeeperUser .Values.auth.jaas.zookeeperUser }}
|
||||
{{- if $zookeeperUser }}
|
||||
{{- if and .Values.zookeeper.auth.enabled $zookeeperUser }}
|
||||
{{- $zookeeperPassword := coalesce .Values.auth.sasl.jaas.zookeeperPassword .Values.auth.jaas.zookeeperPassword }}
|
||||
zookeeper-password: {{ default (randAlphaNum 10) $zookeeperPassword | b64enc | quote }}
|
||||
{{- end }}
|
||||
|
||||
@@ -239,7 +239,7 @@ spec:
|
||||
key: inter-broker-password
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if (coalesce .Values.auth.sasl.jaas.zookeeperUser .Values.auth.jaas.zookeeperUser) }}
|
||||
{{- if and .Values.zookeeper.auth.enabled (coalesce .Values.auth.sasl.jaas.zookeeperUser .Values.auth.jaas.zookeeperUser) }}
|
||||
- name: KAFKA_ZOOKEEPER_PROTOCOL
|
||||
value: "SASL"
|
||||
- name: KAFKA_ZOOKEEPER_USER
|
||||
|
||||
Reference in New Issue
Block a user