[bitnami/kafka] Do not use zookeeperUser if zookeeper auth is not enabled (#6103)

This commit is contained in:
Miguel Ángel Cabrera Miñagorri
2021-04-14 15:14:08 +02:00
committed by GitHub
parent 5a0931621b
commit 7937b208f0
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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 }}
+1 -1
View File
@@ -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 }}
+1 -1
View File
@@ -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