File tree Expand file tree Collapse file tree 2 files changed +18
-10
lines changed
Expand file tree Collapse file tree 2 files changed +18
-10
lines changed Original file line number Diff line number Diff line change 22set -euo pipefail
33
44PORT=" ${CLICKHOUSE_HTTP_PORT:- 8123} "
5- CURL_ARGS=(
6- -sf
7- --max-time 3
8- " http://127.0.0.1:${PORT} /ping"
9- )
105
116if [[ " ${TLS_ENABLED:- false} " == " true" ]]; then
127 PORT=" ${CLICKHOUSE_HTTPS_PORT:- 8443} "
@@ -18,9 +13,20 @@ if [[ "${TLS_ENABLED:-false}" == "true" ]]; then
1813 --key /etc/pki/tls/key.pem
1914 " https://127.0.0.1:${PORT} /ping"
2015 )
21- fi
22-
23- if ! /shared-tools/curl " ${CURL_ARGS[@]} " > /dev/null; then
24- echo " Readiness probe failed" >&2
25- exit 1
16+ if ! /shared-tools/curl " ${CURL_ARGS[@]} " > /dev/null; then
17+ echo " Readiness probe failed" >&2
18+ exit 1
19+ fi
20+ else
21+ wget_args=(
22+ -O /dev/null
23+ -q
24+ -T 3
25+ --tries=1
26+ )
27+ endpoint=" http://127.0.0.1:${PORT} /ping"
28+ if ! /shared-tools/wget " ${wget_args[@]} " " ${endpoint} " ; then
29+ echo " Readiness probe failed accessing ${endpoint} " >&2
30+ exit 1
31+ fi
2632fi
Original file line number Diff line number Diff line change 2525 - -c
2626 - |
2727 cp /bin/curl /shared-tools/curl
28+ cp /bin/wget /shared-tools/wget
2829 chmod +x /shared-tools/curl
30+ chmod +x /shared-tools/wget
2931 volumeMounts :
3032 - name : shared-tools
3133 mountPath : /shared-tools
You can’t perform that action at this time.
0 commit comments