improve uninstall documentation, remove None output in uninstall command

This commit is contained in:
Maarten de Waard 2022-09-29 12:54:37 +02:00
parent 903f11cf47
commit 95eb8db5a3
No known key found for this signature in database
GPG key ID: 1D3E893A657CC8DA
3 changed files with 13 additions and 8 deletions

View file

@ -37,8 +37,11 @@ class App(db.Model):
""" """
Delete the app kustomization. Delete the app kustomization.
This triggers a deletion of the app's PVCs (so deletes all data), as In our case, this triggers a deletion of the app's PVCs (so deletes all
well as any other Kustomizations and HelmReleases related to the app 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() self.__delete_kustomization()

View file

@ -100,8 +100,8 @@ def delete_app(slug):
app_status = app_obj.get_status() app_status = app_obj.get_status()
if not app_status.installed: if not app_status.installed:
deleted = app_obj.delete() app_obj.delete()
current_app.logger.info(f"Success.") current_app.logger.info("Success.")
else: else:
current_app.logger.info("Can not delete installed application, run" current_app.logger.info("Can not delete installed application, run"
" 'uninstall' first") " 'uninstall' first")
@ -122,8 +122,8 @@ def uninstall_app(slug):
current_app.logger.info("Not found") current_app.logger.info("Not found")
return return
uninstalled = app_obj.uninstall() app_obj.uninstall()
current_app.logger.info(f"Success: {uninstalled}") current_app.logger.info("Success.")
return return
@app_cli.command("status") @app_cli.command("status")

View file

@ -180,8 +180,10 @@ def delete_kustomization(kustomization_name):
""" """
Deletes a kustomization. Deletes a kustomization.
Note that this can also result in the deletion of an app's HelmReleases, Note that if the kustomization has `prune: true` in its spec, this will
PVCs (user data!), OAuth2Client, etc. Nothing will remain 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 :param kustomization_name: name of the kustomization to delete
:type kustomization_name: string :type kustomization_name: string