You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by lh...@apache.org on 2022/02/17 05:48:24 UTC
[pulsar-helm-chart] branch master updated: Improve Zookeeper "ruok" probes: use TLS port when TLS is enabled, specify "-q 1" for nc (#223)
This is an automated email from the ASF dual-hosted git repository.
lhotari pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-helm-chart.git
The following commit(s) were added to refs/heads/master by this push:
new 1c4f745 Improve Zookeeper "ruok" probes: use TLS port when TLS is enabled, specify "-q 1" for nc (#223)
1c4f745 is described below
commit 1c4f745941fda76e8ec532bc734b8499fe442b25
Author: Lari Hotari <lh...@users.noreply.github.com>
AuthorDate: Thu Feb 17 07:48:20 2022 +0200
Improve Zookeeper "ruok" probes: use TLS port when TLS is enabled, specify "-q 1" for nc (#223)
- NOTICE: we are no more using "bin/pulsar-zookeeper-ruok.sh" from the apachepulsar/pulsar docker image. The probe script is part of the chart.
* Pass "-q 1" to netcat (nc) to fix issue with Zookeeper ruok probe
- see https://github.com/apache/pulsar/pull/14088
* Send ruok to TLS port when TLS is enabled
* Bump chart version
---
charts/pulsar/Chart.yaml | 2 +-
charts/pulsar/templates/zookeeper-statefulset.yaml | 18 +++++++++++++++---
2 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/charts/pulsar/Chart.yaml b/charts/pulsar/Chart.yaml
index 6fdd15f..c34fa4f 100644
--- a/charts/pulsar/Chart.yaml
+++ b/charts/pulsar/Chart.yaml
@@ -21,7 +21,7 @@ apiVersion: v2
appVersion: "2.7.4"
description: Apache Pulsar Helm chart for Kubernetes
name: pulsar
-version: 2.7.11
+version: 2.7.12
home: https://pulsar.apache.org
sources:
- https://github.com/apache/pulsar
diff --git a/charts/pulsar/templates/zookeeper-statefulset.yaml b/charts/pulsar/templates/zookeeper-statefulset.yaml
index 054b1aa..4313f7f 100644
--- a/charts/pulsar/templates/zookeeper-statefulset.yaml
+++ b/charts/pulsar/templates/zookeeper-statefulset.yaml
@@ -141,6 +141,12 @@ spec:
envFrom:
- configMapRef:
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" -}}
+ {{- else -}}
+ {{- $zkConnectCommand = print "nc -q 1 localhost " .Values.zookeeper.ports.client -}}
+ {{- end }}
{{- if .Values.zookeeper.probe.readiness.enabled }}
{{- if and .Values.rbac.enabled .Values.rbac.psp }}
securityContext:
@@ -151,7 +157,9 @@ spec:
command:
- timeout
- "{{ .Values.zookeeper.probe.readiness.timeoutSeconds }}"
- - bin/pulsar-zookeeper-ruok.sh
+ - bash
+ - -c
+ - 'echo ruok | {{ $zkConnectCommand }} | grep imok'
initialDelaySeconds: {{ .Values.zookeeper.probe.readiness.initialDelaySeconds }}
periodSeconds: {{ .Values.zookeeper.probe.readiness.periodSeconds }}
timeoutSeconds: {{ .Values.zookeeper.probe.readiness.timeoutSeconds }}
@@ -163,7 +171,9 @@ spec:
command:
- timeout
- "{{ .Values.zookeeper.probe.liveness.timeoutSeconds }}"
- - bin/pulsar-zookeeper-ruok.sh
+ - bash
+ - -c
+ - 'echo ruok | {{ $zkConnectCommand }} | grep imok'
initialDelaySeconds: {{ .Values.zookeeper.probe.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.zookeeper.probe.liveness.periodSeconds }}
timeoutSeconds: {{ .Values.zookeeper.probe.liveness.timeoutSeconds }}
@@ -175,7 +185,9 @@ spec:
command:
- timeout
- "{{ .Values.zookeeper.probe.startup.timeoutSeconds }}"
- - bin/pulsar-zookeeper-ruok.sh
+ - bash
+ - -c
+ - 'echo ruok | {{ $zkConnectCommand }} | grep imok'
initialDelaySeconds: {{ .Values.zookeeper.probe.startup.initialDelaySeconds }}
periodSeconds: {{ .Values.zookeeper.probe.startup.periodSeconds }}
timeoutSeconds: {{ .Values.zookeeper.probe.startup.timeoutSeconds }}