Uploaded image for project: 'OpenShift Console'
  1. OpenShift Console
  2. CONSOLE-4015

Users cannot select a cascading delete option if kind.propagationPolicy is not present

XMLWordPrintable

    • False
    • None
    • False

      The OpenShift delete-modal dialog has an option to show a checkbox to enable users to do a non-cascading delete. This is very important for cases where destroying dependent objects is potentially catastrophic. For example in OpenShift GitOps we have had support cases where customers hose clusters or production apps not realizing that deleting an Application/ApplicationSet results in all of the dependent resources being removed.

      The current code below has an explicit check to see if the kind.propagationPolicy is present and if so show the non-cascading checkbox. Unfortunately many Kind/Models do not set this and just rely on the Kubernetes default which is a background cascading delete. The user never gets an opportunity to select non-cascading deletes when propagationPolicy isn't set on the kind as per here:

      https://github.com/openshift/console/blob/73b0dd380e619a65018ad00d76776d190cce3fb3/frontend/public/components/modals/delete-modal.tsx#L107

      The fix for this should be as simple as removing this check and always showing the checkbox. Currently the default for this checkbox is true, I'm fine with setting the default to false to conform to kubernetes defaults as long as the checkbox is being shown.

      Having said that ideally the dialog show show all three options and default to what is set in propagationPolicy, if no PropagationPolicy is set then it should default to background. The three options are:

      1. Background
      2. Foreground
      3. Non-cascading

      This is the way the Argo CD deletion dialog appears, I have included a screenshot. I also like how Argo CD requires you to confirm the delete by typing in the name.

      Full Slack conversation on this topic with Robb Hamilton here:

      https://redhat-internal.slack.com/archives/C011BL0FEKZ/p1711938892772219

       

      AC: TBD

            Unassigned Unassigned
            gnunn@redhat.com Gerald Nunn
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: