fix: add sync waves to argocd apps (fix deletion)#32
Merged
Conversation
Signed-off-by: Mathew Wicks <[email protected]>
thesuperzapper
force-pushed
the
add-app-sync-waves
branch
from
September 21, 2023 20:33
fd03848 to
1746b28
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
resolves #24
This PR adds ArgoCD sync waves to the Applications. While this only affects the order that the apps are synced to the cluster (not the syncing of the manifests they contain), it does affect the order ArgoCD will delete them in, if the user deletes the
deploykf-app-of-apps. Upon deletion, ArgoCD will delete resources in reverse sync-wave order.We have ordered the waves in this PR so that things should be deleted BEFORE the things which they depend on.
The most important one is
dkf-core--deploykf-profiles-generatormust be deleted BEFOREdkf-core--deploykf-dashboard(the profiles have a finalizer that the profile controller must remove).Also, adding these sync waves has allowed the creation of a script to automatically sync (at deployment time), because a script can look at the relative waves and sync them in the correct order.