Skip to content
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

argocd-autopilot repo uninstall removes autopilot repo #630

Open
darnone opened this issue Jan 23, 2025 · 4 comments · May be fixed by #634
Open

argocd-autopilot repo uninstall removes autopilot repo #630

darnone opened this issue Jan 23, 2025 · 4 comments · May be fixed by #634
Assignees

Comments

@darnone
Copy link

darnone commented Jan 23, 2025

When argocd-autopilot repo uninstall is executed, it delete the apps, bootstrap, projects directories. There should be an option to not delete the repo on uninstall which destroyed my repo. That was quite unexpected.

Latest version for argocd-autipilot

@darnone darnone changed the title argocd-autopilot uninstall removes autopilot repo argocd-autopilot repo uninstall removes autopilot repo Jan 23, 2025
@todaywasawesome
Copy link
Collaborator

@darnone We should probably make it require a flag to remove manifests so it doesn't happen accidentally. It is documented but I could see that being a surprise and it is destructive so better safe than sorry.

@todaywasawesome
Copy link
Collaborator

@darnone I think this is a feature we can get done. Another note is that it doesn't destroy the repo, as you can just revert the commit to get everything back. But I also agree that's inconvenient and it makes more sense on uninstall to keep files unless specifically requested.

@ATGardner
Copy link
Collaborator

ATGardner commented Jan 25, 2025

i made some tests in the code, and i can easily support that. how do you suggest we go about it?
the current default for uninstall is to do it in "gitops" way -

  1. delete files from git
  2. wait for autopilot-bootstrap app to sync (effectively delete most of the workloads/appprojects/resources from the clsuter)
  3. remove all leftovers from the cluster (by different label-selectors)

but just doing the 3rd step would also work and leave the cluster clean.

should i change the default behavior and have an optional flag to do it "gitops"? or should i leave the default, and have the optional flag to run uninstall on cluster only?

@ATGardner
Copy link
Collaborator

i have added a flag of --cluster-only for uninstall, which will basically not do any git operations during uninstall.
it will delete the bootstrap application, which will cascade to delete most resources from the cluster.
afterwards, the code will clean leftovers just like before.

what do you think @todaywasawesome @darnone - would that handle the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants