Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make zookeeper healthchecks compatible with Alpine's busybox nc #504

Merged
merged 4 commits into from
Jun 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .ci/clusters/values-pulsar-latest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#

defaultPulsarImageTag: 3.3.0
7 changes: 7 additions & 0 deletions .github/workflows/pulsar-helm-chart-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,13 @@ jobs:
values_file: .ci/clusters/values-pulsar-manager.yaml
shortname: pulsar-manager
include:
# - k8sVersion:
# version: "1.21.14"
# kind_image_tag: v1.21.14@sha256:8a4e9bb3f415d2bb81629ce33ef9c76ba514c14d707f9797a01e3216376ba093
# testScenario:
# name: "Pulsar Latest"
# values_file: .ci/clusters/values-pulsar-latest.yaml
# shortname: pulsar-latest
- k8sVersion:
version: "1.21.14"
kind_image_tag: v1.21.14@sha256:8a4e9bb3f415d2bb81629ce33ef9c76ba514c14d707f9797a01e3216376ba093
Expand Down
10 changes: 5 additions & 5 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 -q 1 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 All @@ -172,7 +172,7 @@ spec:
- "{{ .Values.zookeeper.probe.readiness.timeoutSeconds }}"
- bash
- -c
- 'echo ruok | {{ $zkConnectCommand }} | grep imok'
- '{ echo ruok; sleep 1; } | {{ $zkConnectCommand }} | grep imok'
initialDelaySeconds: {{ .Values.zookeeper.probe.readiness.initialDelaySeconds }}
periodSeconds: {{ .Values.zookeeper.probe.readiness.periodSeconds }}
timeoutSeconds: {{ .Values.zookeeper.probe.readiness.timeoutSeconds }}
Expand All @@ -186,7 +186,7 @@ spec:
- "{{ .Values.zookeeper.probe.liveness.timeoutSeconds }}"
- bash
- -c
- 'echo ruok | {{ $zkConnectCommand }} | grep imok'
- '{ echo ruok; sleep 1; } | {{ $zkConnectCommand }} | grep imok'
initialDelaySeconds: {{ .Values.zookeeper.probe.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.zookeeper.probe.liveness.periodSeconds }}
timeoutSeconds: {{ .Values.zookeeper.probe.liveness.timeoutSeconds }}
Expand All @@ -200,7 +200,7 @@ spec:
- "{{ .Values.zookeeper.probe.startup.timeoutSeconds }}"
- bash
- -c
- 'echo ruok | {{ $zkConnectCommand }} | grep imok'
- '{ echo ruok; sleep 1; } | {{ $zkConnectCommand }} | grep imok'
initialDelaySeconds: {{ .Values.zookeeper.probe.startup.initialDelaySeconds }}
periodSeconds: {{ .Values.zookeeper.probe.startup.periodSeconds }}
timeoutSeconds: {{ .Values.zookeeper.probe.startup.timeoutSeconds }}
Expand Down
Loading