AppSvc Sprint 231
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.
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.
<List of new terms and definition used in this story>
Backend code changes
- Unit Test on actions package and handlers
- api change on uninstall release endpoint.
- oc helm cli changes
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 with oc-helm plugin .
- 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.
Release Notes Type: <New Feature/Enhancement/Known Issue/Bug
fix/Breaking change/Deprecated Functionality/Technology Preview>
Blockers noted and expected delivery timelines set
Design is implementable
Acceptance criteria agreed upon