Skip to content

Commit

Permalink
Allow cp-kafka and cp-kafka-rest to use differently configured Zookee…
Browse files Browse the repository at this point in the history
…per client port
  • Loading branch information
nixsticks committed Jan 19, 2019
1 parent 1b4d4bb commit 61255d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion charts/cp-kafka-rest/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ else use user-provided URL
{{- if (index .Values "cp-zookeeper" "url") -}}
{{- printf "%s" (index .Values "cp-zookeeper" "url") }}
{{- else -}}
{{- printf "%s:2181" (include "cp-kafka-rest.cp-zookeeper.fullname" .) }}
{{- $clientPort := default 2181 (index .Values "cp-zookeeper" "clientPort") | int -}}
{{- printf "%s:%d" (include "cp-kafka-rest.cp-zookeeper.fullname" .) $clientPort }}
{{- end -}}
{{- end -}}

Expand Down
3 changes: 2 additions & 1 deletion charts/cp-kafka/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ else use user-provided URL
*/}}
{{- define "cp-kafka.cp-zookeeper.service-name" }}
{{- if (index .Values "cp-zookeeper" "enabled") -}}
{{- printf "%s-headless:2181" (include "cp-kafka.cp-zookeeper.fullname" .) }}
{{- $clientPort := default 2181 (index .Values "cp-zookeeper" "clientPort") | int -}}
{{- printf "%s:%d" (include "cp-kafka.cp-zookeeper.fullname" .) $clientPort }}
{{- else -}}
{{- $zookeeperConnect := printf "%s" (index .Values "cp-zookeeper" "url") }}
{{- $zookeeperConnectOverride := (index .Values "configurationOverrides" "zookeeper.connect") }}
Expand Down

0 comments on commit 61255d7

Please sign in to comment.