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

chore: replace java by nc for zookeeper probe #1399

Merged
merged 1 commit into from
Jan 10, 2025
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
2 changes: 1 addition & 1 deletion addons/zookeeper/config/zookeeper-config.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ maxClientCnxns=500
{{- end }}

# whitelist
4lw.commands.whitelist=srvr, mntr, ruok, conf
4lw.commands.whitelist=srvr, mntr, ruok, conf, stat

# cluster server list
{{- printf "\n" }}
Expand Down
20 changes: 14 additions & 6 deletions addons/zookeeper/templates/cmpd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,13 @@ spec:
- /bin/bash
- -c
- |
. "$ZOOBINDIR"/zkEnv.sh > /dev/null
java -cp "$CLASSPATH" $CLIENT_JVMFLAGS $JVMFLAGS org.apache.zookeeper.client.FourLetterWordMain \
localhost 2181 ruok | grep imok
if command -v nc &> /dev/null; then
echo "ruok" | timeout 2 nc localhost 2181 | grep imok;
else
. "$ZOOBINDIR"/zkEnv.sh > /dev/null
java -cp "$CLASSPATH" $CLIENT_JVMFLAGS $JVMFLAGS org.apache.zookeeper.client.FourLetterWordMain \
localhost 2181 ruok | grep imok
fi
readinessProbe:
failureThreshold: 6
initialDelaySeconds: 5
Expand All @@ -158,9 +162,13 @@ spec:
- bash
- -c
- |
. "$ZOOBINDIR"/zkEnv.sh > /dev/null
java -cp "$CLASSPATH" $CLIENT_JVMFLAGS $JVMFLAGS org.apache.zookeeper.client.FourLetterWordMain \
localhost 2181 ruok | grep imok
if command -v nc &> /dev/null; then
echo "ruok" | timeout 2 nc localhost 2181 | grep imok;
else
. "$ZOOBINDIR"/zkEnv.sh > /dev/null
java -cp "$CLASSPATH" $CLIENT_JVMFLAGS $JVMFLAGS org.apache.zookeeper.client.FourLetterWordMain \
localhost 2181 ruok | grep imok
fi
securityContext:
allowPrivilegeEscalation: false
capabilities:
Expand Down
Loading