argoproj / argo-cd

Declarative Continuous Deployment for Kubernetes
https://argo-cd.readthedocs.io
Apache License 2.0
17.93k stars 5.46k forks source link

Sync Wave Annotation to Ignore Resource Health #19918

Open TheBritz opened 2 months ago

TheBritz commented 2 months ago

Summary

An argocd annotation should be added to enable specific resources' health to be ignored when assessing when to move to the next wave. This wouldn't be a full ignore of the resources' health; the resource would still have to progress to healthy for an overall successful sync and healthy application

Motivation

For optimization of deployments that feature long running jobs or workloads with long startup times, it would be ideal to be able to start them in an early wave and let them progress in the background while the sync continues on and moves through the other waves.

Proposal

An annotation such as argocd.argoproj.io/sync-wave-ignore-health could be added which would be taken into account by the controller when determining if it should move onto the next wave. Alternatively something like argocd.argoproj.io/sync-wave-options: 'IgnoreHealth=true' in case there may be other wave sync options that could be added via comma-delimited list in the future.

andrii-korotkov-verkada commented 3 days ago

Can you share more details about the intended use case for these workloads, please? If other workloads don't depend on their results, I think it may be okay to have them in a late sync wave or configured as a CronJob.