mirror of
https://github.com/bitnami/charts.git
synced 2026-03-07 16:17:21 +08:00
[bitnami/kafka] Achieve consistent broker ids during cluster restart/rebuild (#2028)
* [bitnami/kafka] Connect broker id to MY_POD_NAME Current charts leads to increasing broker ids after each restart/rebuild of cluster when Persistent Volumes (PV) are not deleted during restart/rebuild. This is often the case since PVs are usually used to persistent the log messages. This commit provides a way to have deterministic broker ids after each cluster restart/rebuild. * Remove/comment dead code after connecting broker id with MY_POD_NAME * Bump Chart version to 7.3.5 Co-authored-by: Guanghua Shu <guanghua.shu@oracle.com>
This commit is contained in:
@@ -151,8 +151,6 @@ spec:
|
||||
{{- end }}
|
||||
- name: ALLOW_PLAINTEXT_LISTENER
|
||||
value: {{ ternary "yes" "no" (or .Values.auth.enabled .Values.allowPlaintextListener) | quote }}
|
||||
- name: KAFKA_CFG_BROKER_ID
|
||||
value: {{ .Values.brokerId | quote }}
|
||||
- name: KAFKA_CFG_DELETE_TOPIC_ENABLE
|
||||
value: {{ .Values.deleteTopicEnable | quote }}
|
||||
- name: KAFKA_HEAP_OPTS
|
||||
@@ -206,6 +204,10 @@ spec:
|
||||
{{- if .Values.extraEnvVars }}
|
||||
{{ include "kafka.tplValue" ( dict "value" .Values.extraEnvVars "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
command: ["/bin/bash", "-c"]
|
||||
args:
|
||||
- export KAFKA_CFG_BROKER_ID=${MY_POD_NAME##*-};
|
||||
exec /entrypoint.sh /run.sh;
|
||||
ports:
|
||||
- name: kafka
|
||||
containerPort: {{ .Values.service.port }}
|
||||
|
||||
@@ -119,7 +119,7 @@ allowPlaintextListener: true
|
||||
# interBrokerListenerName:
|
||||
|
||||
## ID of the Kafka node.
|
||||
brokerId: -1
|
||||
# brokerId: -1
|
||||
|
||||
## Switch to enable topic deletion or not.
|
||||
deleteTopicEnable: false
|
||||
|
||||
Reference in New Issue
Block a user