-
Notifications
You must be signed in to change notification settings - Fork 278
Resources are created during dry-run when using Force=true,Replace=true
sync options
#623
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I believe I am seeing this too. I have this annotation set on a K8s job. When that job gets replaced, it happens twice therefore the job runs twice even though it succeeds the first time. |
I am observing exactly the same issue. Contrary to @mmclane I did not find that setting same
This is how it looks in I would also expect that setting @rafal-jan any chance for having your PR merged? @rafal-jan or @mmclane did you find any workaround to this issue? I am running ArgoCD version v2.14.11+8283115 |
If resources have the
argocd.argoproj.io/sync-options: Force=true,Replace=true
annotation, they are recreated twice:This behavior can be observed when using multiple Jobs with the
argocd.argoproj.io/sync-options: Force=true,Replace=true
annotation and different sync waves. All Jobs are created immediately on the cluster during the dry-run phase and then recreated one-by-one as their respective sync wave is processed by Argo CD.More information about using replace with dry-run and force options can be found in kubernetes/kubectl#1222.
kubectl
is used as library ingitops-engine
but onlyRun()
method is called. However, the fix in kubernetes/kubernetes#110326 updated theValidate()
method.I believe that the force option should not be set to true when performing a dry-run replace operation. This would avoid unnecessary resource recreation and make it usable with sync waves.
The text was updated successfully, but these errors were encountered: