fix: Replace migrate hooks with longer timeouts and retries #136
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This makes it possible to use this chart with fluxcd
Description
Helm charts and Jobs don't work well together. This is evident from many prs trying to address some aspects of this issue. I try to document the issues as best I can think of here: https://x.com/tsaha/status/1805382111844778275
This pr tries to address this issue as best as possible I think.
If the hooks are used, we can't use fluxcd to install this chart with --wait flag. See here: fluxcd/flux2#1085 (comment)
What seems to work well in our experience is just run the migrate job at the same time as the potential db sub-chart, increase the timeout of the migrate job and increase number of retries. #130 pr ensures that at least one successful run of the migrate job will be considered successful. So, extending the timeout and increasing retries works well even if the db subchart takes unusally long time to be ready.
References
Review Checklist
main