Skip to content

Commit

Permalink
Merge pull request #89 from vshn/add/bucket-deletionprotection
Browse files Browse the repository at this point in the history
Add end-user docs for DeletionPolicy
  • Loading branch information
Kidswiss authored Sep 28, 2023
2 parents 82437a0 + 982fa75 commit 70ac00b
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions docs/modules/ROOT/pages/object-storage/delete.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,23 @@ If you do not need an Object Storage bucket anymore, you can delete it in the sa
$ oc delete objectbucket my-bucket
----

[IMPORTANT]
.Non-reversible operation
====
If you delete the `ObjectBucket` object from the cluster, it will delete the actual bucket including all stored objects in it as well (recursive delete)!
There will be a `DeletionPolicy` soon, that will provide accidental deletion protection.
====
== DeletionPolicy

By default, deleting the `ObjectBucket` will also recursively delete all objects within it and the bucket itself.

To prevent that, there's a `deletionPolicy` called `DeletIfEmpty`. As the name suggests, it will then only delete the bucket if it's empty. However, you will still lose access to the data. If you've deleted a bucket by mistake and had the `DeletIfEmpty` policy set, please contact support@vshn.ch and we will help you get your data back.

.Example
[source,yaml]
----
apiVersion: appcat.vshn.io/v1
kind: ObjectBucket
metadata:
name: my-cool-bucket
namespace: my-cool-ns
spec:
parameters:
bucketName: my-bucket-change-name
region: ch-gva-2
bucketDeletionPolicy: DeleteIfEmpty
----

0 comments on commit 70ac00b

Please sign in to comment.