Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance deletion protection docs #96

Merged
merged 1 commit into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions docs/modules/ROOT/pages/vshn-managed/postgresql/delete.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
= Delete a PostgreSQL service

== Delete non protected PostgreSQL instance

If you do not need your PostgreSQL service anymore, you can delete it in the same way as you would with any other object in your cluster:

[source,bash]
Expand All @@ -12,3 +14,44 @@ $ oc delete vshnpostgresqls.vshn.appcat.vshn.io my-postgres-example
====
If you delete the `VSHNPostgreSQL` object from the cluster, it will be deleted together with all of its data!
====

== Delete protected PostgreSQL instance

A PostgreSQL instance that is protected from deletion cannot be deleted right away.
First disable deletion protection then delete the instance.

. Disable deletion protection:
+
[source,bash]
----
$ oc edit vshnpostgresqls.vshn.appcat.vshn.io my-postgres-example
----
+
[source,yaml]
----
apiVersion: vshn.appcat.vshn.io/v1
kind: VSHNPostgreSQL
metadata:
name: pgsql-app1-prod
namespace: prod-app
spec:
parameters:
backup:
deletionProtection: false # <1>
writeConnectionSecretToRef:
name: postgres-creds
----
<1> Make sure the parameter is set to false

. Delete the instance
+
[source,bash]
----
$ oc delete vshnpostgresqls.vshn.appcat.vshn.io my-postgres-example
----
+
[IMPORTANT]
.Non-reversible operation
====
If you delete the `VSHNPostgreSQL` object from the cluster, it will be deleted together with all of its data!
====
11 changes: 10 additions & 1 deletion docs/modules/ROOT/pages/vshn-managed/postgresql/restore.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,13 @@ spec:
<2> The backup name you want to restore
<3> You need to specify that this is not a normal instance but a restored one
+
NOTE: The restore process is the same as ordering a new instance. The only difference is the backup information in `spec.parameters.restore` and `spec.compositionRef` objects.
[NOTE]
====
The restore process is the same as ordering a new instance.
The only difference is the backup information in `spec.parameters.restore` and `spec.compositionRef` objects.
====

== Deleting a Restored Instance

The deletion process of a restored instance is the same as for normal instance.
Check out xref:vshn-managed/postgresql/delete.adoc[this guide] how to delete a PostgreSQL instance.