-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
ApplicationSet scmProvider generator randomly deletes all resources #14318
Comments
update: it seems like the scmProvider can´t handle network issues/timeouts regarding the github enterprise instance |
We rely on the go-github client to tell us whether there was an error getting repos. If that client doesn't return an error when we list repos, we'll honor the response. It's possible that we should inspect further into the response, e.g. validate a 200 return code. |
I've recently faced a similar problem while our Github Enterprise was under maintenance. We saw different errors with different status codes such as 500, 502, 503, but they did not trigger the
However, we saw this specific error
before applicationsetcontroller decided to I'm trying to reproduce but has not succeeded yet. |
possibly additional clues from my homelab:
the gitea server is running on rather slow machines, and will occasionally tieout and not produce a response. On those situations, it is not desirable to have argocd delete all applications that are defined there. |
Checklist:
argocd version
.Describe the bug
I use an ApplicationSet with the scmProvider generator. This ApplicationSet templates an Application Resource which templates multiple AppProject and Application Resources which are located on a specific path in my github repository.
For some reason the ApplicationSet Controller logs "generated 0 applications" which will cause a deletion of all generated AppProjects and Applications. In the next reconcile loop the logs shows "generated 1 applications" although no changes were made.
This behaviour is very inconsistent, it can work for weeks without any problem and sometimes it happens every few days.
I have an second cluster which has the almost the same configuration as the first one. The only difference is the path of the AppProject and Application resources in the github repository. I experienced the same issue on this cluster, but never at the same time as the first one.
To Reproduce
I think it´s difficult to reproduce because the behaviour is inconsistent.
But the steps would be:
Expected behavior
I would expect that the log of the ApplicationSet controller always shows "generated 1 applications".
Version
Logs
Applied Applicationset
Generated Application from ApplicationSet
The text was updated successfully, but these errors were encountered: