feat: optionally run migrations as an init contianer #157
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.
As covered in a few other issues and PRs, there's a deadlock situation with the chart when deploying with
helm --wait
and/or ArgoCD:helm --wait
(or ArgoCD) hooks aren't run until all Pods are healthyDescription
This PR introduces an alternative mechanism for running the migrations: an init container on the OpenFGA pod. Instead of waiting for a Job to run, the migrations are ran when the Pod first starts as an init container.
A new
migrationType
value is added, which can be set tojob
orinitContainer
and defaults tojob
(so is a backwards-compatible change). If set tojob
the chart behaves as it currently does, but if set toinitContainer
then the following happens:wait-for-container
init container is not included on the Deploymentmigrate-database
init container is included insteadReferences
--wait
and FluxCD by default #100helm install --wait
does not work for openfga chart #131Review Checklist
main