frappe / helm

Helm Chart Repository for Frappe/ERPNext
https://helm.erpnext.com
MIT License
138 stars 120 forks source link

Wait until the database is reachable in job-create-site #207

Closed MohammedNoureldin closed 4 months ago

MohammedNoureldin commented 5 months ago

https://github.com/frappe/helm/blob/275c25f46337fe0bc4220c412e5892c26522cd7a/erpnext/templates/job-create-site.yaml#L104

Related to https://github.com/frappe/helm/issues/205

Actually exiting the container with the correct exit code is enough to fix the issue if the job is configured to restart if failed. Though, waiting for the database in the beginning is cleaner.

MohammedNoureldin commented 5 months ago

I also added the ability to attach annotations, because one possible workaround in case of using ArgoCD could have been using ArgoCD waves. However, because the chart does not include annotations for this job, this solution is not yet possible.

MohammedNoureldin commented 5 months ago

I have just finished testing the pull request by deploying it multiple/many times. The issue seems to be properly fixed now. At least it is not reproduceable in this branch anymore.

MohammedNoureldin commented 5 months ago

I fixed a few minor issues and did some enhancements.