mirror of
https://github.com/helm/charts.git
synced 2026-08-23 06:17:18 +00:00
[incubator/kafka] Fix offsets.topic.replication.factor to be derived from .Values.replicas (#14996)
* Fix offsets.topic.replication.factor to be derived from .Values.replicas Signed-off-by: Nguyen Le Vu Long <vulongvn98@gmail.com> * Use template to derive offsets.topic.replication.factor Signed-off-by: Nguyen Le Vu Long <vulongvn98@gmail.com>
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
c462e20176
commit
ca6a38ff9b
@@ -2,7 +2,7 @@ apiVersion: v1
|
||||
description: Apache Kafka is publish-subscribe messaging rethought as a distributed
|
||||
commit log.
|
||||
name: kafka
|
||||
version: 0.16.2
|
||||
version: 0.16.3
|
||||
appVersion: 5.0.1
|
||||
keywords:
|
||||
- kafka
|
||||
|
||||
@@ -85,7 +85,7 @@ following configurable parameters:
|
||||
| `podAnnotations` | Annotation to be added to Kafka pods | `{}` |
|
||||
| `podLabels` | Labels to be added to Kafka pods | `{}` |
|
||||
| `envOverrides` | Add additional Environment Variables in the dictionary format | `{ zookeeper.sasl.enabled: "False" }` |
|
||||
| `configurationOverrides` | `Kafka ` [configuration setting][brokerconfigs] overrides in the dictionary format | `{ offsets.topic.replication.factor: 3 }` |
|
||||
| `configurationOverrides` | `Kafka ` [configuration setting][brokerconfigs] overrides in the dictionary format | `{ "confluent.support.metrics.enable": false }` |
|
||||
| `secrets` | Pass any secrets to the kafka pods. Each secret will be passed as an environment variable by default. The secret can also be mounted to a specific path if required. Environment variable names are generated as: `<secretName>_<secretKey>` (All upper case) | `{}` |
|
||||
| `additionalPorts` | Additional ports to expose on brokers. Useful when the image exposes metrics (like prometheus, etc.) through a javaagent instead of a sidecar | `{}` |
|
||||
| `readinessProbe.initialDelaySeconds` | Number of seconds before probe is initiated. | `30` |
|
||||
|
||||
@@ -52,6 +52,14 @@ else use user-provided URL
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Derive offsets.topic.replication.factor in following priority order: configurationOverrides, replicas
|
||||
*/}}
|
||||
{{- define "kafka.replication.factor" }}
|
||||
{{- $replicationFactorOverride := index .Values "configurationOverrides" "offsets.topic.replication.factor" }}
|
||||
{{- default .Values.replicas $replicationFactorOverride }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
|
||||
@@ -158,6 +158,8 @@ spec:
|
||||
fieldPath: metadata.namespace
|
||||
- name: KAFKA_HEAP_OPTS
|
||||
value: {{ .Values.kafkaHeapOptions }}
|
||||
- name: KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR
|
||||
value: {{ include "kafka.replication.factor" . | quote }}
|
||||
{{- if not (hasKey .Values.configurationOverrides "zookeeper.connect") }}
|
||||
- name: KAFKA_ZOOKEEPER_CONNECT
|
||||
value: {{ include "zookeeper.url" . | quote }}
|
||||
|
||||
@@ -169,7 +169,6 @@ podLabels: {}
|
||||
## ref: https://kafka.apache.org/documentation/#brokerconfigs
|
||||
##
|
||||
configurationOverrides:
|
||||
"offsets.topic.replication.factor": 3
|
||||
"confluent.support.metrics.enable": false # Disables confluent metric submission
|
||||
# "auto.leader.rebalance.enable": true
|
||||
# "auto.create.topics.enable": true
|
||||
|
||||
Reference in New Issue
Block a user