Skip to content

Commit 078b6a8

Browse files
authored
fix: init container on ingestor sts for distributed deployments (#1050)
1 parent 503eaa0 commit 078b6a8

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Diff for: helm/templates/ingestor-statefulset.yaml

+18
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,24 @@ spec:
3232
{{- .Values.parseable.highAvailability.ingestor.labels | toYaml | nindent 8 }}
3333
{{- include "parseable.ingestorLabelsSelector" . | nindent 8 }}
3434
spec:
35+
initContainers:
36+
- name: wait-for-query-service
37+
image: curlimages/curl:latest # Lightweight image with curl
38+
command:
39+
- /bin/sh
40+
- -c
41+
- |
42+
echo "Waiting for query service readiness at /api/v1/readiness..."
43+
for i in $(seq 1 60); do
44+
if curl -sf http://{{ include "parseable.fullname" . }}-querier-service.{{ .Release.Namespace }}/api/v1/readiness; then
45+
echo "Query service is ready!"
46+
exit 0
47+
fi
48+
echo "Query service is not ready yet. Retrying in 2 seconds..."
49+
sleep 2
50+
done
51+
echo "Query service did not become ready in time. Exiting."
52+
exit 1
3553
terminationGracePeriodSeconds: 10
3654
serviceAccountName: {{ include "parseable.serviceAccountName" . }}
3755
containers:

0 commit comments

Comments
 (0)