Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Commit

Permalink
[incubator/kafka] Allow configurationOverride of zookeeper.connect (#…
Browse files Browse the repository at this point in the history
…4027)

* [incubator/kafka] Allow configurationOverride of zookeeper.connect

* [incubator/kafka] DRY the zookeeper.connect override

* Add benjigoldberg to OWNERS
  • Loading branch information
josdotso authored and k8s-ci-robot committed Mar 7, 2018
1 parent 1230e8a commit 4e05126
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion incubator/kafka/Chart.yaml
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
description: Apache Kafka is publish-subscribe messaging rethought as a distributed
commit log.
name: kafka
version: 0.4.0
version: 0.4.1
keywords:
- kafka
- zookeeper
Expand Down
4 changes: 4 additions & 0 deletions incubator/kafka/OWNERS
@@ -0,0 +1,4 @@
approvers:
- benjigoldberg
reviewers:
- benjigoldberg
4 changes: 3 additions & 1 deletion incubator/kafka/templates/_helpers.tpl
Expand Up @@ -40,6 +40,8 @@ else use user-provided URL
{{- if .Values.zookeeper.enabled -}}
{{- printf "%s:%s" (include "kafka.zookeeper.fullname" .) $port }}
{{- else -}}
{{- printf "%s:%s" .Values.zookeeper.url $port }}
{{- $zookeeperConnect := printf "%s:%s" .Values.zookeeper.url $port }}
{{- $zookeeperConnectOverride := index .Values "configurationOverrides" "zookeeper.connect" }}
{{- default $zookeeperConnect $zookeeperConnectOverride }}
{{- end -}}
{{- end -}}
2 changes: 2 additions & 0 deletions incubator/kafka/templates/configmap.yaml
Expand Up @@ -11,5 +11,7 @@ data:
zookeeper.connect: "{{ template "zookeeper.url" . }}"
log.dirs: "{{ printf "%s/%s" .Values.persistence.mountPath .Values.logSubPath }}"
{{- range $configName, $configValue := .Values.configurationOverrides }}
{{- if not ( eq $configName "zookeeper.connect" ) }}
{{ $configName }}: "{{ $configValue -}}"
{{- end -}}
{{- end -}}

0 comments on commit 4e05126

Please sign in to comment.