4 repository: cgr.dev/scratch-images/test-tmp/clickhouse-keeper
5 pullPolicy: IfNotPresent
6 # Overrides the image tag whose default is the chart appVersion.
7 tag: 26.5.6.64-r0@sha256:65df3fef29783d2b270391979d5149fa63a4760e12226f2b9d4c987f645884ac
13 <include_from>/tmp/clickhouse-keeper/config.d/generated-keeper-settings.xml</include_from>
14 <path>/var/lib/clickhouse-keeper</path>
17 <console>true</console>
19 <listen_host>0.0.0.0</listen_host>
20 <keeper_server incl="keeper_server">
21 <tcp_port>2181</tcp_port>
22 <four_letter_word_white_list>*</four_letter_word_white_list>
23 <coordination_settings>
24 <raft_logs_level>information</raft_logs_level>
25 </coordination_settings>
28 <endpoint>/metrics</endpoint>
30 <metrics>true</metrics>
32 <asynchronous_metrics>true</asynchronous_metrics>
33 <!-- https://github.com/ClickHouse/ClickHouse/issues/46136 -->
34 <status_info>false</status_info>
39 DOMAIN=`hostname -d` &&
40 if [[ $HOST =~ (.*)-([0-9]+)$ ]]; then
41 NAME=${BASH_REMATCH[1]}
42 ORD=${BASH_REMATCH[2]}
44 echo "Failed to parse name and ordinal of Pod"
47 export MY_ID=$((ORD+1)) &&
48 mkdir -p /tmp/clickhouse-keeper/config.d/ &&
50 echo "<yandex><keeper_server>"
51 echo "<server_id>${MY_ID}</server_id>"
52 echo "<raft_configuration>"
53 for (( i=1; i<=$SERVERS; i++ )); do
54 echo "<server><id>${i}</id><hostname>$NAME-$((i-1)).${DOMAIN}</hostname><port>${RAFT_PORT}</port></server>"
56 echo "</raft_configuration>"
57 echo "</keeper_server></yandex>"
58 } > /tmp/clickhouse-keeper/config.d/generated-keeper-settings.xml &&
59 cat /tmp/clickhouse-keeper/config.d/generated-keeper-settings.xml &&
60 if [[ "1" == "$MY_ID" ]]; then
61 clickhouse-keeper --config-file=/etc/clickhouse-keeper/keeper_config.xml --force-recovery
63 clickhouse-keeper --config-file=/etc/clickhouse-keeper/keeper_config.xml
70 - 'date && OK=$(exec 3<>/dev/tcp/127.0.0.1/2181 ; printf "ruok" >&3 ; IFS=; tee <&3; exec 3<&- ;); if [[ "$OK" == "imok" ]]; then exit 0; else exit 1; fi'
71 initialDelaySeconds: 20
74 ## persistence.persistence.enabled -- enabling persistence
77 ## persistence.persistence.size -- Volume size
81 accessMode: ReadWriteOnce
82 ## persistence.persistence.storageClass -- Storage class for PV (e.g. gp2, standard, ...)
99 # kubernetes.io/ingress.class: nginx
100 # kubernetes.io/tls-acme: "true"
102 - host: chart-example.local
105 pathType: ImplementationSpecific
107 # - secretName: chart-example-tls
109 # - chart-example.local
111# We usually recommend not to specify default resources and to leave this as a conscious
112# choice for the user. This also increases chances charts run on environments with little
113# resources, such as Minikube. If you do want to specify resources, uncomment the following
114# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
122# Additional volumes on the output Deployment definition.
126# secretName: mysecret
129# Additional volumeMounts on the output Deployment definition.
132# mountPath: "/etc/foo"