You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The proposal introduces a new sync option to control resource deletion before creation
Motivation
Working with K8 jobs can be a nightmare especially when updating the job command due to its immutable nature. When using jobs as resource hooks ArgoCD already supports the great feature of different hook deletion policies. In some cases, it might not be possible to run jobs as hooks and must be managed during the normal sync lifecycle. To ease this as it is already possible with hooks, we propose to introduce a new sync option DeleteResourceBeforeCreation that can be applied to all resources during the normal sync process.
We also considered using ttlSecondsAfterFinished to delete the job after a certain amount of time after job completion. But with active self-healing, ArgoCD will automatically recreate the deleted job, which does not work for us.
Furthermore, we also investigated the usage of sync option argocd.argoproj.io/sync-options: Replace=true, but doesn’t work since updating a job with replace only works when run with --force, which is currently only supported via the UI.
Proposal
Introduce a new sync option argocd.argoproj.io/sync-options: DeleteResourceBeforeCreation to control resource deletion.
Summary
The proposal introduces a new sync option to control resource deletion before creation
Motivation
Working with K8 jobs can be a nightmare especially when updating the job command due to its immutable nature. When using jobs as resource hooks ArgoCD already supports the great feature of different hook deletion policies. In some cases, it might not be possible to run jobs as hooks and must be managed during the normal sync lifecycle. To ease this as it is already possible with hooks, we propose to introduce a new sync option
DeleteResourceBeforeCreation
that can be applied to all resources during the normal sync process.We also considered using
ttlSecondsAfterFinished
to delete the job after a certain amount of time after job completion. But with active self-healing, ArgoCD will automatically recreate the deleted job, which does not work for us.Furthermore, we also investigated the usage of sync option
argocd.argoproj.io/sync-options: Replace=true
, but doesn’t work since updating a job with replace only works when run with--force
, which is currently only supported via the UI.Proposal
Introduce a new sync option
argocd.argoproj.io/sync-options: DeleteResourceBeforeCreation
to control resource deletion.Releated Issues
This enhancement is related to #5882
The text was updated successfully, but these errors were encountered: