Skip to content

Commit

Permalink
Use 127.0.0.1 instead of localhost in zookeeper healthchecks
Browse files Browse the repository at this point in the history
- Alpine nc fails if "localhost" is used.
  - perhaps it defaults to use IPv6?
  • Loading branch information
lhotari committed Jun 7, 2024
1 parent 0867eca commit f6530ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions charts/pulsar/templates/zookeeper-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ spec:
name: "{{ template "pulsar.fullname" . }}-{{ .Values.zookeeper.component }}"
{{- $zkConnectCommand := "" -}}
{{- if and .Values.tls.enabled .Values.tls.zookeeper.enabled }}
{{- $zkConnectCommand = print "openssl s_client -quiet -crlf -connect localhost:" .Values.zookeeper.ports.clientTls " -cert /pulsar/certs/zookeeper/tls.crt -key /pulsar/certs/zookeeper/tls.key" -}}
{{- $zkConnectCommand = print "openssl s_client -quiet -crlf -connect 127.0.0.1:" .Values.zookeeper.ports.clientTls " -cert /pulsar/certs/zookeeper/tls.crt -key /pulsar/certs/zookeeper/tls.key" -}}
{{- else -}}
{{- $zkConnectCommand = print "nc localhost " .Values.zookeeper.ports.client -}}
{{- $zkConnectCommand = print "nc 127.0.0.1 " .Values.zookeeper.ports.client -}}
{{- end }}
{{- if .Values.zookeeper.probe.readiness.enabled }}
{{- if and (semverCompare "<1.25-0" .Capabilities.KubeVersion.Version) .Values.rbac.enabled .Values.rbac.psp }}
Expand Down

0 comments on commit f6530ab

Please sign in to comment.