Replies: 6 comments 23 replies
-
Hi @v0l, how is the Job created? is it created by a Hook? Hook deletion policies can be found here: at https://argo-cd.readthedocs.io/en/stable/user-guide/resource_hooks/#hook-deletion-policies |
Beta Was this translation helpful? Give feedback.
-
I see the same thing. In my case the Job is defined as a resource: ---
apiVersion: batch/v1
kind: Job
metadata:
name: some-job
namespace: some-namespace
annotations:
argocd.argoproj.io/compare-options: IgnoreExtraneous
argocd.argoproj.io/sync-options: Prune=false
spec:
ttlSecondsAfterFinished: 30
template:
spec:
restartPolicy: Never
serviceAccountName: some-service-account
containers:
... My job runs on each Sync, then 30 seconds after it finishes its pod is cleaned up and Argo starts to complain that about it being Missing and Out of Sync. How do I tell Argo that this is intentional? |
Beta Was this translation helpful? Give feedback.
-
Any other ideas for how to get around this issue? For any maintainers finding this, this is a standard way of having https://kubernetes.io/docs/concepts/workloads/controllers/ttlafterfinished/ I was hoping the |
Beta Was this translation helpful? Give feedback.
-
I was able to get this working (for all intents and purposes) with the following:
When a sync is ran, it will spawn the job and remove it directly after. Unfortunately this won't respect the TTL defined in the job configuration, as Argo seems to only check the actual job status, but for me that was not a deal breaker.
I've unfortunately got nothing for you there, their hooks appear to be tied directly to the sync action itself, with no concept of resource state :-\ I agree that would be a great feature to have, though. Along with |
Beta Was this translation helpful? Give feedback.
-
Hello community members, |
Beta Was this translation helpful? Give feedback.
-
This appears to still be an issue. ArgoCD should be aware of how Kubernetes manages such resources. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have some jobs which use
ttlSecondsAfterFinished
to delete the job after completion, but now those jobs are showing as "Missing" because they are deleted.Is this something that ArgoCD can detect and mark the application as in sync?
Beta Was this translation helpful? Give feedback.
All reactions