{{- $fullname := include "kafka.fullname" . -}}
{{- $replicaCount := int .Values.replicaCount -}}
{{- $servicePort := int .Values.service.port -}}
{{- $releaseNamespace := .Release.Namespace -}}

** Please be patient while the chart is being deployed **

Kafka can be accessed by consumers via port {{ $servicePort }} on the following DNS name from within your cluster:
    {{ include "kafka.fqdn" . }}

Each Kafka broker can be accessed by producers via port {{ $servicePort }} on the following DNS name(s) from within your cluster:

{{- $brokerList := list }}
{{- range $e, $i := until $replicaCount }}
{{- $brokerList = append $brokerList (printf "%s-%d.%s.%s.svc.cluster.local:%d" $fullname $i $fullname $releaseNamespace $servicePort) }}
{{- end }}
{{ join "\n" $brokerList | nindent 4 }}
