-
Notifications
You must be signed in to change notification settings - Fork 74
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
Backups created by policy can be deleted by ArgoCD #1260
Comments
We have
|
Yes, but not immediately upon creation when it's created by a policy. There's a timing-related issue here where it doesn't at first and the operator comes along at some point and adds that field. Not all backups are deleted by ArgoCD, only ones where a sync happens in that time between when the backup object is created and the ownerReferences field is added. |
Hello! We will modify creation of backups for policy. Best, |
Hey @ajanikow , it looks like this is still an issue in the latest version of the operator. We've worked around it last year by disabling prune on the ArgoCD app, but that has its own problems in certain scenarios. Can we get this in an upcoming release? |
We are using ArgoCD to manage both the kube-arangodb operator install as well as a number of ArangoDB deployment objects. I noticed today that some backups that are being scheduled by our BackupPolicy are simply missing. Looking through the event logs, it looks like those backups were indeed created, and then subsequently deleted by ArgoCD.
I believe that what has been happening is that the backup is created on the schedule without an ownerReference object by the policy handler without an ownerReference but it does do a copy of the annotations from the deployment such as
argocd.argoproj.io/instance
. Then some job is coming along and adding that ownerReference to the backup object. However, if ArgoCD tries to sync withprune
set totrue
on the application in the meantime, it deletes the backup object. This happens because at that moment the object says it's managed by an ArgoCD project (argocd.argoproj.io/instance
is set), but the application doesn't have that resource and there's no ownerReference to follow so ArgoCD can know that it's owned by the cluster.I think that ArgoCD is behaving correctly in this case, and that the ownerReference should be added to the object by the policy handler at creation time.
The text was updated successfully, but these errors were encountered: