Skip to content

Commit

Permalink
char: fix notes content
Browse files Browse the repository at this point in the history
  • Loading branch information
itboon committed Oct 20, 2024
1 parent da04870 commit db67377
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 24 deletions.
25 changes: 13 additions & 12 deletions charts/kafka-ha/templates/_notes.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,23 @@ notes.external.bootstrapServers
{{- $externalType := .Values.broker.external.type -}}
{{- $port := .Values.broker.external.containerPort | toString -}}
{{- if eq (include "broker.externalDns.enabled" .) "true" -}}
{{- $hostnamePrefix := include "kafka.broker.fullname" . -}}
{{- $hostnamePrefix := include "broker.externalDns.hostnamePrefix" . -}}
{{- $domain := (include "broker.externalDns.domain" .) -}}
{{- $servers := list -}}
{{- $brokerCount := int .Values.broker.replicaCount -}}
{{- if eq $externalType "NodePort" -}}
{{- $port = "<NODE_PORT_NUMBER>" -}}
{{- else if eq $externalType "LoadBalancer" -}}
{{ if .Values.broker.external.externalDns.hostnamePrefixOverride }}
{{- $hostnamePrefix = .Values.broker.external.externalDns.hostnamePrefixOverride -}}
{{- end -}}
{{- end -}}
{{- if ge $brokerCount 3 -}}
{{- $brokerCount = 3 -}}
{{- end -}}
{{- if ge $brokerCount 3 -}}
{{- $brokerCount = 3 -}}
{{- end -}}
{{- if eq $externalType "NodePort" -}}
{{- $port = "<NODE_PORT_NUMBER>" -}}
{{- end -}}
{{- range $i := until $brokerCount -}}
{{- $servers = printf "%s-%d.%s:%s" $hostnamePrefix (int $i) $domain $port | append $servers -}}
{{- $podname := printf "%s-%d" (include "kafka.broker.fullname" $) (int $i) -}}
{{- $server := printf "%s.%s.%s:%s" $podname $hostnamePrefix $domain $port -}}
{{- if eq $externalType "LoadBalancer" -}}
{{- $server = printf "%s-%d.%s:%s" $hostnamePrefix (int $i) $domain $port -}}
{{- end -}}
{{- $servers = append $servers $server -}}
{{- end -}}
{{ join "," $servers }}
{{- else -}}
Expand Down
25 changes: 13 additions & 12 deletions charts/kafka/templates/_notes.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,23 @@ notes.external.bootstrapServers
{{- $externalType := .Values.broker.external.type -}}
{{- $port := .Values.broker.external.containerPort | toString -}}
{{- if eq (include "broker.externalDns.enabled" .) "true" -}}
{{- $hostnamePrefix := include "kafka.broker.fullname" . -}}
{{- $hostnamePrefix := include "broker.externalDns.hostnamePrefix" . -}}
{{- $domain := (include "broker.externalDns.domain" .) -}}
{{- $servers := list -}}
{{- $brokerCount := int .Values.broker.replicaCount -}}
{{- if eq $externalType "NodePort" -}}
{{- $port = "<NODE_PORT_NUMBER>" -}}
{{- else if eq $externalType "LoadBalancer" -}}
{{ if .Values.broker.external.externalDns.hostnamePrefixOverride }}
{{- $hostnamePrefix = .Values.broker.external.externalDns.hostnamePrefixOverride -}}
{{- end -}}
{{- end -}}
{{- if ge $brokerCount 3 -}}
{{- $brokerCount = 3 -}}
{{- end -}}
{{- if ge $brokerCount 3 -}}
{{- $brokerCount = 3 -}}
{{- end -}}
{{- if eq $externalType "NodePort" -}}
{{- $port = "<NODE_PORT_NUMBER>" -}}
{{- end -}}
{{- range $i := until $brokerCount -}}
{{- $servers = printf "%s-%d.%s:%s" $hostnamePrefix (int $i) $domain $port | append $servers -}}
{{- $podname := printf "%s-%d" (include "kafka.broker.fullname" $) (int $i) -}}
{{- $server := printf "%s.%s.%s:%s" $podname $hostnamePrefix $domain $port -}}
{{- if eq $externalType "LoadBalancer" -}}
{{- $server = printf "%s-%d.%s:%s" $hostnamePrefix (int $i) $domain $port -}}
{{- end -}}
{{- $servers = append $servers $server -}}
{{- end -}}
{{ join "," $servers }}
{{- else -}}
Expand Down

0 comments on commit db67377

Please sign in to comment.