-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Problem
Currently, installer render
renders all YAML files for all components. If they are applied in one step (as it's currently the case for A Self-Hosted installations as well as B current ArgoCD applications), migrations and code changes are applied in parallel. Depending on timings, this might cause code to hit an unprepared DB, which might end up in all kind of user-errors.
Situation
So far, this was not an issue because:
- A Self-Hosted installation history is not that long so migrations were near-instant
- B SaaS is using separate deploy jobs which handle migrations.
Motivation
The SaaS handling is suboptimal in terms of complexity introduced, and we would love to move to a pure ArgoCD-setup without multiple layers of external wrappers.
Also, there might be a chance to solve this problem for Self-Hosted (which will become more apparent as SH installations grow and age) with the same/similar approach.
Suggested solution(s)
1. Use "hook" concepts
Helm - which we already use internally in the installer
- as well as ArgoCD have the concept of using "hooks", which are designed to handle exactly that case.
We could:
- make installer render the migration job with these annotations:
annotations:
argocd.argoproj.io/hook: PreSync
"helm.sh/hook": pre-install,pre-upgrade
"helm.sh/hook-weight": "-1"
"helm.sh/hook-delete-policy": hook-succeeded
- B ArgoCD: Make sure ArgoCD is configured to stop on a failed
PreSync
hook - A Self-Hosted: Could use helm to apply the new yaml (are we already doing this? 🤔 )
2. ???
Next steps
- Clarify if Team Self-Hosted sees benefit here, and if it's worth tackling now
- also depends on: Are we already using helm to apply the new yaml? If yes, this might be a no-brainer
- Check with Team Platform if they agree on the use of the
PreSync
hook
Metadata
Metadata
Assignees
Labels
Type
Projects
Status