Conversation
There was a problem hiding this comment.
Pull request overview
Updates the local Kustomize overlay to delay starting the backend and worker pods until their datastore dependencies are reachable, aiming to reduce crash loops during local boot.
Changes:
- Adds a new backend patch to inject an initContainer that waits for Postgres and ClickHouse.
- Adds a similar initContainer to the dealbot-worker Deployment.
- Wires the new backend patch into the local overlay’s
kustomization.yaml.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| kustomize/overlays/local/kustomization.yaml | Adds the new backend startup-dependencies patch to the local overlay. |
| kustomize/overlays/local/dealbot-worker-deployment.yaml | Adds an initContainer to wait for Postgres and ClickHouse before starting the worker. |
| kustomize/overlays/local/backend-startup-dependencies.yaml | New strategic-merge patch to add an initContainer to the backend Deployment. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| until wget -qO- http://dealbot-clickhouse:8123/ping | grep -qx "Ok."; do | ||
| echo "waiting for ClickHouse" | ||
| sleep 2 | ||
| done |
There was a problem hiding this comment.
The initContainer waits on http://dealbot-clickhouse:8123/ping, but this repo doesn’t define any ClickHouse Deployment/Service (a repo-wide search for clickhouse only finds these new wait loops). As written, the initContainer will block startup forever in the local overlay. Either add the missing ClickHouse manifests/service to kustomize/overlays/local (and ensure the service name/port match), or remove/feature-flag the ClickHouse wait so local pods can start without it.
| until wget -qO- http://dealbot-clickhouse:8123/ping | grep -qx "Ok."; do | |
| echo "waiting for ClickHouse" | |
| sleep 2 | |
| done |
| until wget -qO- http://dealbot-clickhouse:8123/ping | grep -qx "Ok."; do | ||
| echo "waiting for ClickHouse" | ||
| sleep 2 | ||
| done |
There was a problem hiding this comment.
This initContainer blocks on dealbot-clickhouse:8123, but there is no ClickHouse Service/Deployment defined anywhere in the repository (a repo-wide search for clickhouse only finds these new lines). In the local overlay this will hang the worker pods indefinitely. Add ClickHouse manifests/service (matching the hostname/port) or remove/guard the ClickHouse wait.
| until wget -qO- http://dealbot-clickhouse:8123/ping | grep -qx "Ok."; do | |
| echo "waiting for ClickHouse" | |
| sleep 2 | |
| done |
fix on top of #438 to ensure local cluster waits on postgres and clickhouse pods