File tree Expand file tree Collapse file tree 3 files changed +25
-16
lines changed
Expand file tree Collapse file tree 3 files changed +25
-16
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22set -euo pipefail
33
4- TLS_MOUNT_PATH=" /etc/pki/tls"
5- READINESS_PROBE_TIMEOUT=" ${READINESS_PROBE_TIMEOUT:- 3} "
64HOST=" 127.0.0.1"
75SCHEME=" http"
86PORT=" ${CLICKHOUSE_HTTP_PORT:- 8123} "
97
10- curl_args=(
11- --silent
12- --show-error
13- --fail
14- --connect-timeout " ${READINESS_PROBE_TIMEOUT} "
15- --max-time " ${READINESS_PROBE_TIMEOUT} "
8+ wget_args=(
9+ --spider
10+ -q
11+ -T 3
12+ --tries=1
1613)
1714
1815if [[ " ${TLS_ENABLED:- false} " == " true" ]]; then
1916 SCHEME=" https"
2017 PORT=" ${CLICKHOUSE_HTTPS_PORT:- 8443} "
21- if [[ -f " ${TLS_MOUNT_PATH} /ca.pem" ]]; then
22- curl_args+=(--cacert " ${TLS_MOUNT_PATH} /ca.pem" )
23- fi
24- if [[ -f " ${TLS_MOUNT_PATH} /cert.pem" && -f " ${TLS_MOUNT_PATH} /key.pem" ]]; then
25- curl_args+=(--cert " ${TLS_MOUNT_PATH} /cert.pem" --key " ${TLS_MOUNT_PATH} /key.pem" )
26- fi
18+ wget_args+=(--no-check-certificate)
2719fi
2820
2921endpoint=" ${SCHEME} ://${HOST} :${PORT} /ping"
3022
31- if ! curl " ${curl_args [@]} " " ${endpoint} " > /dev/null ; then
23+ if ! /shared-tools/wget " ${wget_args [@]} " " ${endpoint} " ; then
3224 echo " Readiness probe failed accessing ${endpoint} " >&2
3325 exit 1
3426fi
Original file line number Diff line number Diff line change 1919 fsGroup : 0
2020 seccompProfile :
2121 type : RuntimeDefault
22+ initContainers :
23+ - name : copy-tools
24+ imagePullPolicy : {{ .Values.busyboxImage.pullPolicy }}
25+ command :
26+ - sh
27+ - -c
28+ - |
29+ cp /bin/wget /shared-tools/wget
30+ chmod +x /shared-tools/wget
31+ volumeMounts :
32+ - name : shared-tools
33+ mountPath : /shared-tools
2234 containers :
2335 - name : clickhouse
2436 imagePullPolicy : {{ default "IfNotPresent" .Values.image.pullPolicy }}
@@ -70,12 +82,17 @@ spec:
7082 mountPath : /etc/clickhouse-client
7183 - name : scripts
7284 mountPath : /scripts
85+ - name : shared-tools
86+ mountPath : /shared-tools
7387 env :
7488 - name : CURRENT_POD_NAME
7589 valueFrom :
7690 fieldRef :
7791 apiVersion : v1
7892 fieldPath : metadata.name
93+ volumes :
94+ - name : shared-tools
95+ emptyDir : {}
7996 updateStrategy : BestEffortParallel
8097 logConfigs :
8198 {{- range $name, $pattern := .Values.logConfigs }}
Original file line number Diff line number Diff line change @@ -47,4 +47,4 @@ backupImage:
4747 registry : " "
4848 repository : apecloud/clickhouse-backup-full
4949 pullPolicy : IfNotPresent
50- tag : 2.6.14
50+ tag : 2.6.14
You can’t perform that action at this time.
0 commit comments