-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Replies: 2 comments · 1 reply
-
|
Hey! This is an interesting edge case with RollingSync. In Argo CD, hooks are lifecycle-managed at the individual Application level. When you use RollingSync in an ApplicationSet, the controller is essentially performing a sequence of syncs across different Application resources. If your ConfigMap is marked as a hook (e.g., pre-install), Argo CD will create it, run the dependent hooks (like your PreSync Job), and then potentially delete it based on the hook-delete-policy. Even if you use the default policy, the transition between waves in a RollingSync strategy can sometimes trigger a cleanup if the controller perceives the resource as no longer needed for the current state of the rolling update. A few things to try:
Usually, for ApplicationSet patterns where resources need to persist across multiple member applications, the 'Regular Resource + Sync Waves' approach is more reliable than using transient hooks. Hope this helps! |
Beta Was this translation helpful? Give feedback.
All reactions
-
|
Hi! Thank you for your help! I tried your options:
syncPolicy:
automated:
selfHeal: false
prune: falseBut Interesting observationWhen I manually re-sync the application after the hook has been deleted (with This suggests the issue only occurs during the automatic rolling sync between waves, not during manual syncs. LogsHookSucceeed HookFailed Manual ReSync with BeforeHookCreation |
Beta Was this translation helpful? Give feedback.
All reactions
-
|
As a result, I decided to use an |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Hi everybody, I'm new in ArgoCD. Can somebody help me please?
When using ApplicationSet with
RollingSyncstrategy, resources marked as hooks (e.g., ConfigMap used by a PreSync Job) are being deleted between sync waves, even though they should persist in the cluster according to their delete policy. docsExpected behavior:
Actual behavior:
Environment
Configuration
ApplicationSet
Helm chart (ConfigMap as hook)
Full Logs
Additional Context
BeforeHookCreation(default) delete policy to ensure fresh configuration on each run, but the ConfigMap needs to survive between RollingSync steps.Questions
What I've tried
✅ Removing RollingSync → works correctly
✅ Migrating to apps-of-apps pattern → works, but I'd prefer to keep using ApplicationSet if possible
Beta Was this translation helpful? Give feedback.
All reactions