-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add flag to wait for migrations to complete (or not) #99
Conversation
In particular, setting I don't have full background on the init container's story, but I'd expect that it's redundant with the default values for helm.sh/hook: "post-install, post-upgrade, post-rollback, post-delete"
helm.sh/hook-weight: "-5"
helm.sh/hook-delete-policy: "before-hook-creation" Though I'm not sure why we're running the migration |
92f5de1
to
1ac66ec
Compare
Thanks for the PR @JAORMX - the team should be reviewing this soon, we're just busy getting a few other things out of the door and we'll take a look! 👀 |
@JAORMX @evankanderson we have a Could you help me understand where we'd want |
We are applying the migrations via the helm chart. We are not doing it out of band. And waiting for them is done as part of the ArgoCD hook system. In our case we want to apply the migrations via the chart but don't want the init container to wait since it's redundant. Does that make sense @jon-whit ? this was initially confusing because I accidentally also added the new flat to the migration job, which was not the intention. |
@JAORMX bump the |
81b3f94
to
2793d92
Compare
@jon-whit done! thanks |
This makes the init container that waits for migrations optional via a `waitForMigrations` flag. If disabled, it does not render the `initContainer` alongside the role and role binding it uses. In tools such as ArgoCD, the waves (which can be set throught he helm annotations we already have) ensure that a resource is applied before another one. So this waiting init container may not be needed. Let's make it configurable for deployments that don't require this. Note that the option defaults to `true` as to keep the current logic and functionality as it is.
2793d92
to
1d424e0
Compare
This makes the init container that waits for migrations optional via a
waitForMigrations
flag. If disabled, it does not render theinitContainer
alongside the role and role binding it uses.In tools such as ArgoCD, the waves (which can be set throught he helm
annotations we already have) ensure that a resource is applied before
another one. So this waiting init container may not be needed. Let's
make it configurable for deployments that don't require this.
Note that the option defaults to
true
as to keep the current logic andfunctionality as it is.