Closed MohammedNoureldin closed 4 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.
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.
I fixed a few minor issues and did some enhancements.
Wait for the database in the init container to become reachable before trying to create a new site. Without waiting there is a race condition that pops up occasionally which makes the creation of the site fail.
Exit the main container of the job if any error happens by adding
set -e
. At the moment the container exists with the return code 0, even if the site was not successfully created. This is because the last command in the entrypoint is anrm -f
which always exits with 0.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.