Merge pull request #4128 from xyz-li/cleanup_app

clean up app when workspace is deleted
This commit is contained in:
KubeSphere CI Bot
2021-09-07 16:58:15 +08:00
committed by GitHub
6 changed files with 357 additions and 6 deletions

View File

@@ -338,7 +338,10 @@ func convertApp(app *v1alpha1.HelmApplication, versions []*v1alpha1.HelmApplicat
}
out.AppVersionTypes = "helm"
out.Isv = app.GetWorkspace()
// If this keys exists, the workspace of this app has been deleted, set the isv to empty.
if _, exists := app.Annotations[constants.DanglingAppCleanupKey]; !exists {
out.Isv = app.GetWorkspace()
}
out.ClusterTotal = &rlsCount
out.Owner = app.GetCreator()