diff --git a/areas/apps/models.py b/areas/apps/models.py index fd12c6e..3cad938 100644 --- a/areas/apps/models.py +++ b/areas/apps/models.py @@ -37,8 +37,11 @@ class App(db.Model): """ Delete the app kustomization. - This triggers a deletion of the app's PVCs (so deletes all data), as - well as any other Kustomizations and HelmReleases related to the app + In our case, this triggers a deletion of the app's PVCs (so deletes all + data), as well as any other Kustomizations and HelmReleases related to + the app. It also triggers a deletion of the OAuth2Client object, but + does not delete the secrets generated by the `install` command. It also + does not remove the TLS secret generated by cert-manager. """ self.__delete_kustomization() diff --git a/cliapp/cliapp/cli.py b/cliapp/cliapp/cli.py index 25ba861..578b9e3 100644 --- a/cliapp/cliapp/cli.py +++ b/cliapp/cliapp/cli.py @@ -100,8 +100,8 @@ def delete_app(slug): app_status = app_obj.get_status() if not app_status.installed: - deleted = app_obj.delete() - current_app.logger.info(f"Success.") + app_obj.delete() + current_app.logger.info("Success.") else: current_app.logger.info("Can not delete installed application, run" " 'uninstall' first") @@ -122,8 +122,8 @@ def uninstall_app(slug): current_app.logger.info("Not found") return - uninstalled = app_obj.uninstall() - current_app.logger.info(f"Success: {uninstalled}") + app_obj.uninstall() + current_app.logger.info("Success.") return @app_cli.command("status") diff --git a/helpers/kubernetes.py b/helpers/kubernetes.py index 09fcc68..280ccea 100644 --- a/helpers/kubernetes.py +++ b/helpers/kubernetes.py @@ -180,8 +180,10 @@ def delete_kustomization(kustomization_name): """ Deletes a kustomization. - Note that this can also result in the deletion of an app's HelmReleases, - PVCs (user data!), OAuth2Client, etc. Nothing will remain + Note that if the kustomization has `prune: true` in its spec, this will + trigger deletion of other elements generated by the Kustomizartion. See + App.uninstall() to learn what implications this has for what will and will + not be deleted by the kustomize-controller. :param kustomization_name: name of the kustomization to delete :type kustomization_name: string