Skip to content

Commit

Permalink
Revert "fix(clickhouse-keeper): update start script (#168)" (#169)
Browse files Browse the repository at this point in the history
This reverts commit 3190722.
  • Loading branch information
duyet authored May 21, 2024
1 parent 39168b8 commit 1e2e8fa
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 18 deletions.
19 changes: 7 additions & 12 deletions clickhouse-keeper/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: { { include "clickhouse-keeper.configMapName" . } }
name: {{ include "clickhouse-keeper.configMapName" . }}
data:
keeper_config.xml: |
{{ .Values.keeperConfig | nindent 4 }}
Expand Down Expand Up @@ -34,7 +34,7 @@ data:
set -ex
source /conf/env.sh
source /conf/keeperFunctions.sh
HOST=`hostname -s`
if [[ $HOST =~ (.*)-([0-9]+)$ ]]; then
NAME=${BASH_REMATCH[1]}
Expand Down Expand Up @@ -89,17 +89,11 @@ data:
echo "</keeper_server></yandex>"
} > /tmp/clickhouse-keeper/config.d/generated-keeper-settings.xml
fi
# run clickhouse-keeper
# run clickhouse-keeper
cat /tmp/clickhouse-keeper/config.d/generated-keeper-settings.xml
rm -rfv /var/lib/clickhouse-keeper/terminated
# clickhouse-keeper --config-file=/etc/clickhouse-keeper/keeper_config.xml
if [[ "1" == "$MY_ID" ]]; then
clickhouse-keeper --config-file=/etc/clickhouse-keeper/keeper_config.xml --force-recovery
else
clickhouse-keeper --config-file=/etc/clickhouse-keeper/keeper_config.xml
fi
clickhouse-keeper --config-file=/etc/clickhouse-keeper/keeper_config.xml
keeperTeardown.sh: |
#!/usr/bin/env bash
Expand Down Expand Up @@ -157,6 +151,7 @@ data:
touch /var/lib/clickhouse-keeper/terminated
# Kill the primary process ourselves to circumvent the terminationGracePeriodSeconds
ps -ef | grep clickhouse-keeper | grep -v grep | awk '{print $1}' | xargs kill
keeperLive.sh: |
#!/usr/bin/env bash
Expand Down Expand Up @@ -209,7 +204,7 @@ data:
exit 0
else
echo "clickhouse-keeper instance is ready to add as participant with 1 weight."
ROLE=participant
WEIGHT=1
KEEPER_URL=$(keeperConnectionString)
Expand Down
2 changes: 1 addition & 1 deletion clickhouse-keeper/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
replicas: {{ .Values.replicaCount }}
updateStrategy:
type: RollingUpdate
podManagementPolicy: Parallel
podManagementPolicy: OrderedReady
selector:
matchLabels:
{{- include "clickhouse-keeper.selectorLabels" . | nindent 6 }}
Expand Down
10 changes: 5 additions & 5 deletions clickhouse-keeper/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ livenessProbe:
exec:
command:
- /conf/keeperLive.sh
failureThreshold: 3
initialDelaySeconds: 60
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 10
failureThreshold: 3
initialDelaySeconds: 60
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 10

readinessProbe:
exec:
Expand Down

0 comments on commit 1e2e8fa

Please sign in to comment.