Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions kustomize/overlays/local/backend-startup-dependencies.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: dealbot
spec:
template:
spec:
initContainers:
- name: wait-for-dependencies
image: busybox:1.36
command:
- sh
- -c
- |
set -eu
until nc -z dealbot-postgres 5432; do
echo "waiting for Postgres"
sleep 2
done
until wget -T 5 -qO- http://dealbot-clickhouse:8123/ping | grep -qxF "Ok."; do
echo "waiting for ClickHouse"
sleep 2
done
16 changes: 16 additions & 0 deletions kustomize/overlays/local/dealbot-worker-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,22 @@ spec:
labels:
app.kubernetes.io/name: dealbot-worker
spec:
initContainers:
- name: wait-for-dependencies
image: busybox:1.36
command:
- sh
- -c
- |
set -eu
until nc -z dealbot-postgres 5432; do
echo "waiting for Postgres"
sleep 2
done
until wget -T 5 -qO- http://dealbot-clickhouse:8123/ping | grep -qxF "Ok."; do
echo "waiting for ClickHouse"
sleep 2
done
containers:
- name: dealbot-worker
image: dealbot:latest
Expand Down
1 change: 1 addition & 0 deletions kustomize/overlays/local/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ patches:
- path: web-service-nodeport.yaml
- path: backend-configmap-local.yaml
- path: backend-resources-local.yaml
- path: backend-startup-dependencies.yaml
- path: web-env-local.yaml

# Override images to use local tags
Expand Down