Skip to content

Commit 1b91e81

Browse files
committed
chore(quickwit): add s3 connection check
1 parent ef5f125 commit 1b91e81

6 files changed

Lines changed: 56 additions & 14 deletions

File tree

charts/quickwit/templates/control-plane/control-plane-deployment.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@ spec:
2323
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.control_plane.podAntiAffinityPreset.type "component" "" "extraMatchLabels" .Values.control_plane.podAntiAffinityPreset.extraMatchLabels "topologyKey" "" "context" $) | nindent 10 }}
2424
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.control_plane.nodeAffinityPreset.type "key" .Values.control_plane.nodeAffinityPreset.key "values" .Values.control_plane.nodeAffinityPreset.values ) | nindent 10 }}
2525
serviceAccountName: drycc-quickwit
26+
initContainers:
27+
- name: drycc-registry-init
28+
image: {{.Values.imageRegistry}}/{{.Values.imageOrg}}/python-dev:latest
29+
imagePullPolicy: {{.Values.imagePullPolicy}}
30+
args:
31+
- netcat
32+
- -v
33+
- -u
34+
- $(DRYCC_DATABASE_URL),$(DRYCC_STORAGE_ENDPOINT)
35+
{{- include "quickwit.envs" . | indent 8 }}
2636
containers:
2737
- name: drycc-quickwit-control-plane
2838
image: {{.Values.imageRegistry}}/{{.Values.imageOrg}}/quickwit:{{.Values.imageTag}}
@@ -48,6 +58,7 @@ spec:
4858
httpGet:
4959
path: /health/livez
5060
port: rest
61+
initialDelaySeconds: 120
5162
failureThreshold: 12
5263
periodSeconds: 5
5364
livenessProbe:

charts/quickwit/templates/indexer/indexer-statefulset.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@ spec:
2323
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.indexer.podAntiAffinityPreset.type "component" "" "extraMatchLabels" .Values.indexer.podAntiAffinityPreset.extraMatchLabels "topologyKey" "" "context" $) | nindent 10 }}
2424
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.indexer.nodeAffinityPreset.type "key" .Values.indexer.nodeAffinityPreset.key "values" .Values.indexer.nodeAffinityPreset.values ) | nindent 10 }}
2525
serviceAccountName: drycc-quickwit
26+
initContainers:
27+
- name: drycc-registry-init
28+
image: {{.Values.imageRegistry}}/{{.Values.imageOrg}}/python-dev:latest
29+
imagePullPolicy: {{.Values.imagePullPolicy}}
30+
args:
31+
- netcat
32+
- -v
33+
- -u
34+
- $(DRYCC_DATABASE_URL),$(DRYCC_STORAGE_ENDPOINT)
35+
{{- include "quickwit.envs" . | indent 8 }}
2636
containers:
2737
- name: drycc-quickwit-indexer
2838
image: {{.Values.imageRegistry}}/{{.Values.imageOrg}}/quickwit:{{.Values.imageTag}}
@@ -48,6 +58,7 @@ spec:
4858
httpGet:
4959
path: /health/livez
5060
port: rest
61+
initialDelaySeconds: 120
5162
failureThreshold: 12
5263
periodSeconds: 5
5364
livenessProbe:

charts/quickwit/templates/janitor/janitor-deployment.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@ spec:
2323
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.janitor.podAntiAffinityPreset.type "component" "" "extraMatchLabels" .Values.janitor.podAntiAffinityPreset.extraMatchLabels "topologyKey" "" "context" $) | nindent 10 }}
2424
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.janitor.nodeAffinityPreset.type "key" .Values.janitor.nodeAffinityPreset.key "values" .Values.janitor.nodeAffinityPreset.values ) | nindent 10 }}
2525
serviceAccountName: drycc-quickwit
26+
initContainers:
27+
- name: drycc-registry-init
28+
image: {{.Values.imageRegistry}}/{{.Values.imageOrg}}/python-dev:latest
29+
imagePullPolicy: {{.Values.imagePullPolicy}}
30+
args:
31+
- netcat
32+
- -v
33+
- -u
34+
- $(DRYCC_DATABASE_URL),$(DRYCC_STORAGE_ENDPOINT)
35+
{{- include "quickwit.envs" . | indent 8 }}
2636
containers:
2737
- name: drycc-quickwit-janitor
2838
image: {{.Values.imageRegistry}}/{{.Values.imageOrg}}/quickwit:{{.Values.imageTag}}
@@ -48,6 +58,7 @@ spec:
4858
httpGet:
4959
path: /health/livez
5060
port: rest
61+
initialDelaySeconds: 120
5162
failureThreshold: 12
5263
periodSeconds: 5
5364
livenessProbe:

charts/quickwit/templates/metastore/metastore-deployment.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@ spec:
2323
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.metastore.podAntiAffinityPreset.type "component" "" "extraMatchLabels" .Values.metastore.podAntiAffinityPreset.extraMatchLabels "topologyKey" "" "context" $) | nindent 10 }}
2424
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.metastore.nodeAffinityPreset.type "key" .Values.metastore.nodeAffinityPreset.key "values" .Values.metastore.nodeAffinityPreset.values ) | nindent 10 }}
2525
serviceAccountName: drycc-quickwit
26+
initContainers:
27+
- name: drycc-registry-init
28+
image: {{.Values.imageRegistry}}/{{.Values.imageOrg}}/python-dev:latest
29+
imagePullPolicy: {{.Values.imagePullPolicy}}
30+
args:
31+
- netcat
32+
- -v
33+
- -u
34+
- $(DRYCC_DATABASE_URL),$(DRYCC_STORAGE_ENDPOINT)
35+
{{- include "quickwit.envs" . | indent 8 }}
2636
containers:
2737
- name: drycc-quickwit-metastore
2838
image: {{.Values.imageRegistry}}/{{.Values.imageOrg}}/quickwit:{{.Values.imageTag}}
@@ -48,6 +58,7 @@ spec:
4858
httpGet:
4959
path: /health/livez
5060
port: rest
61+
initialDelaySeconds: 120
5162
failureThreshold: 12
5263
periodSeconds: 5
5364
livenessProbe:

charts/quickwit/templates/searcher/searcher-statefulset.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@ spec:
2323
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.searcher.podAntiAffinityPreset.type "component" "" "extraMatchLabels" .Values.searcher.podAntiAffinityPreset.extraMatchLabels "topologyKey" "" "context" $) | nindent 10 }}
2424
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.searcher.nodeAffinityPreset.type "key" .Values.searcher.nodeAffinityPreset.key "values" .Values.searcher.nodeAffinityPreset.values ) | nindent 10 }}
2525
serviceAccountName: drycc-quickwit
26+
initContainers:
27+
- name: drycc-registry-init
28+
image: {{.Values.imageRegistry}}/{{.Values.imageOrg}}/python-dev:latest
29+
imagePullPolicy: {{.Values.imagePullPolicy}}
30+
args:
31+
- netcat
32+
- -v
33+
- -u
34+
- $(DRYCC_DATABASE_URL),$(DRYCC_STORAGE_ENDPOINT)
35+
{{- include "quickwit.envs" . | indent 8 }}
2636
containers:
2737
- name: drycc-quickwit-searcher
2838
image: {{.Values.imageRegistry}}/{{.Values.imageOrg}}/quickwit:{{.Values.imageTag}}
@@ -48,6 +58,7 @@ spec:
4858
httpGet:
4959
path: /health/livez
5060
port: rest
61+
initialDelaySeconds: 120
5162
failureThreshold: 12
5263
periodSeconds: 5
5364
livenessProbe:

rootfs/usr/local/bin/init-quickwit

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,8 @@ mc config host add storage \
1313
"${DRYCC_STORAGE_SECRETKEY}" \
1414
--lookup "${DRYCC_STORAGE_LOOKUP}" \
1515
--api s3v4
16-
17-
has_bucket(){
18-
mc ls storage -json|jq -r '.key'|grep -w "${DRYCC_STORAGE_BUCKET}"
19-
}
20-
2116
mc ping storage -x
22-
23-
if [ -z "$(has_bucket)" ] ;then
24-
mc mb storage/"${DRYCC_STORAGE_BUCKET}"
25-
if [ -z "$(has_bucket)" ] ;then
26-
echo "create bucket ${DRYCC_STORAGE_BUCKET} error"
27-
exit 1
28-
fi
29-
fi
30-
echo "create bucket ${DRYCC_STORAGE_BUCKET} success"
17+
mc mb --ignore-existing storage/"${DRYCC_STORAGE_BUCKET}"
3118

3219
AWS_REGION=${DRYCC_STORAGE_ENDPOINT%%.*}
3320
if [ "$DRYCC_STORAGE_LOOKUP" = "path" ]; then

0 commit comments

Comments
 (0)