Uploaded image for project: 'Helm'
  1. Helm
  2. HELM-479

Uninstall the Helm Charts Asynchronously

    XMLWordPrintable

Details

    • Story
    • Resolution: Done
    • Undefined
    • None
    • None
    • Helm
    • AppSvc Sprint 231

    Description

      Owner: Architect:

      Kartikey Mamgain

      Story (Required)

      As an OpenShift user i should be able to uninstall Helm Releases asynchronously and return the secret name along with 201 status code. The action of uninstall should continue to work in background. In developer sandbox we do see the api's are taking a longer time and hence we are getting timeout errors too.

      Background (Required)

      Helm ODC frontend makes call to the helm backend and waits for the uninstall call to finish. In most cases this is OK, however as chart are becoming more complex and contain more dependencies, it is becoming possible that the uninstall call will not be done before browser times out of DELETE request. To solve this problem we can treat helm uninstall as asynchronous operation. Instead of returning the release information to frontend we would be returning the secret name which can then be tracked to obtain the status.

      Glossary

      <List of new terms and definition used in this story>

      Out of scope

      Frontend Changes

      E2E Changes 

      In Scope

      Backend code changes

      • Unit Test on actions package and handlers
      • api change on uninstall release endpoint.
      • oc helm cli changes

      Approach(Required)

      We would need to modify the uninstall endpoint to return the secret which is getting created to track the Helm release. This secret has labels as owner equal to helm, release name and the release revision. We need to return this secret name to ui.

      IW would be adding an endpoint /api/helm/release/async DELETE to console backend.

      The command to uninstall would run in a goroutine while we return the secret to the ui. We do have one dependency from ui where in the revision of the release should be sent to fetch the secret. This step can be covered at time of integration.

      We would need to add an option to oc helm cli as uninstall-async.

      Demo requirements(Required)

      Demo with oc-helm plugin .

      Dependencies

      None

      Edge Case

      None

      Acceptance Criteria

      • We should be able to uninstall complex Helm Charts which take longer time to uninstall. Try to uninstall https://artifacthub.io/packages/helm/gitlab/gitlab/6.5.4 Helm chart which takes over a  minute to uninstall.
      • The release should be shown in uninstalling state in list API call using oc-helm.
      • We should be able to demo the above mentioned scenario of a release changing getting listed as uninstalling and getting deleted eventually from the list releases page. We can use gitlab Helm Chart for reference.
      • Verify the changes with oc helm plugin and make changes to oc helm plugin to incorporate the changes to response body.

      Development:Yes

      QE:
      Documentation: No

      Upstream: Not
      Applicable

      Downstream: Not
      Applicable

      Release Notes Type: <New Feature/Enhancement/Known Issue/Bug
      fix/Breaking change/Deprecated Functionality/Technology Preview>

      INVEST Checklist

      Dependencies identified

      Blockers noted and expected delivery timelines set

      Design is implementable

      Acceptance criteria agreed upon

      Story estimated

      v

      Legend

      Unknown

      Verified

      Unsatisfied

      Attachments

        Activity

          People

            kmamgain@redhat.com Kartikey Mamgain
            kmamgain@redhat.com Kartikey Mamgain
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: