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

cascade delete option is ticked by default , want to have it unticked by default for us. #3205

Closed
chiragthaker opened this issue Mar 8, 2020 · 12 comments
Assignees
Labels
component:ui User interfaces bugs and enhancements enhancement New feature or request type:usability Enhancement of an existing feature
Milestone

Comments

@chiragthaker
Copy link

When you delete app in ARGOCD cascade delete option is by default ticked which can be fatal as it delete resources too from the cluster . Do anyone know how to make default untick when you delete the app from ArgoCD and then choose cascade deletion ok if we really want resources from the cluster to be deleted too.
We use apps-in-apps and want this to be disabled by default.

@chiragthaker chiragthaker added the enhancement New feature or request label Mar 8, 2020
@resamaraschi
Copy link

Also interested in this feature. I think the default behavior should rather be removing the application from ARGO CD only. I think one wants to easily remove the whole application only in a test environment cluster and but not in a PROD cluster. Thanks

@jannfis jannfis added component:ui User interfaces bugs and enhancements type:usability Enhancement of an existing feature labels May 14, 2020
@LelandSindt
Copy link

I got bit by this today (entirely my fault for not paying attention).

May I suggest that the Cascade option be checked based on the presence/absence of

metadata:
  finalizers:
    - resources-finalizer.argocd.argoproj.io

https://argoproj.github.io/argo-cd/user-guide/app_deletion/

@lelandsindttouchnet

@alexmt alexmt added this to the v1.9 milestone Nov 16, 2020
@keithchong
Copy link
Contributor

@alexmt, should the CLI's default be changed to false as well?

@jannfis
Copy link
Member

jannfis commented Nov 17, 2020

@alexmt, should the CLI's default be changed to false as well?

IMHO, I would wish for the CLI to behave as follows:

  • If cascade is set to true, ask the user whether he really wants to delete the application and all of its resources
  • For automation, either a --force or --yes option should specify to skip a dialogue like above and assume yes on the answer

However, this would be breaking change for existing automation, I guess. Maybe we could also check whether the execution environment has a pseudo terminal, and if not, skip security check dialogue and assume yes as well.

@alexmt
Copy link
Collaborator

alexmt commented Nov 17, 2020

I really like your suggestion @jannfis . And pseudo terminal check is a nice workaround to prevent breaking existing automation.

@keithchong
Copy link
Contributor

Hi @alexmt, please assign this to me.

@jannfis
Copy link
Member

jannfis commented Nov 24, 2020

Hi @alexmt, please assign this to me.

Done.

@keithchong
Copy link
Contributor

keithchong commented Dec 7, 2020

Here is a screenshot of the new prompt. The cascade checkbox will remain checked by default.

Screen Shot 2020-12-07 at 4 26 19 PM

keithchong added a commit to keithchong/argo-cd that referenced this issue Dec 10, 2020
)

Signed-off-by: Keith Chong <kykchong@redhat.com>
alexmt pushed a commit that referenced this issue Dec 10, 2020
Signed-off-by: Keith Chong <kykchong@redhat.com>
rbreeze pushed a commit that referenced this issue Jan 12, 2021
Signed-off-by: Keith Chong <kykchong@redhat.com>
Signed-off-by: Remington Breeze <remington@breeze.software>
@rbreeze
Copy link
Member

rbreeze commented Feb 4, 2021

@keithchong @chiragthaker was this fixed by #4994 ?

@alexmt
Copy link
Collaborator

alexmt commented Mar 2, 2021

This is fixed now. Popup message explains the danger of cascade deletion and ask user to type the app name.

@alexmt alexmt closed this as completed Mar 2, 2021
@benjamin-bergia
Copy link

benjamin-bergia commented Nov 24, 2022

Hi,

sorry to come back on this but it looks like on v2.5.x this is back to the original behavior (cascade by default).
Is there any way to define on applicationsets and applications that deletion shouldn't be cascading by default in the current version? Is removing the finalizer effective and the recommended way to go? I manage my applicationsets with argocd itself so I can really pass CLI options.

@paddy667
Copy link

Adding a not here as I didn't see a solution in this thread. I had the same issue with deleting applicationsets, which would delete the ArgoCD application and in turn delete the cluster resources. Since my applicationsets are managed by ArgoCD itself, a small error with existing applicationsets could set off a chain reaction of deletion. Adding the following prevents this:

apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
spec:
  syncPolicy:
    preserveResourcesOnDeletion: true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:ui User interfaces bugs and enhancements enhancement New feature or request type:usability Enhancement of an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants