From 8ffc6bf94f70f1bc18b22cc9a6de19bb5c47c5a4 Mon Sep 17 00:00:00 2001
From: gismo2004 <2325636+gismo2004@users.noreply.github.com>
Date: Fri, 14 Feb 2025 09:15:57 +0100
Subject: [PATCH] feat(website) add longhorn snapshot-delete/cleanup task info
(#32031)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
**Description**
add longhorn snapshot-delete/cleanup task info
⚒️ Fixes #
**⚙️ Type of change**
- [x] ⚙️ Feature/App addition
- [ ] 🪛 Bugfix
- [ ] ⚠️ Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] 🔃 Refactor of current code
**🧪 How Has This Been Tested?**
**📃 Notes:**
**✔️ Checklist:**
- [x] ⚖️ My code follows the style guidelines of this project
- [x] 👀 I have performed a self-review of my own code
- [ ] #️⃣ I have commented my code, particularly in hard-to-understand
areas
- [ ] 📄 I have made corresponding changes to the documentation
- [ ] ⚠️ My changes generate no new warnings
- [ ] 🧪 I have added tests to this description that prove my fix is
effective or that my feature works
- [ ] ⬆️ I increased versions for any altered app according to semantic
versioning
- [ ] I made sure the title starts with `feat(chart-name):`,
`fix(chart-name):` or `chore(chart-name):`
**➕ App addition**
If this PR is an app addition please make sure you have done the
following.
- [ ] 🖼️ I have added an icon in the Chart's root directory called
`icon.png`
---
_Please don't blindly check all the boxes. Read them and only check
those that apply.
Those checkboxes are there for the reviewer to see what is this all
about and
the status of this PR with a quick glance._
---
.../content/docs/clustertool/csi/longhorn.md | 52 +++++++++++++++++--
1 file changed, 47 insertions(+), 5 deletions(-)
diff --git a/website/src/content/docs/clustertool/csi/longhorn.md b/website/src/content/docs/clustertool/csi/longhorn.md
index 72e5b5c64e2..81cda18fd0d 100644
--- a/website/src/content/docs/clustertool/csi/longhorn.md
+++ b/website/src/content/docs/clustertool/csi/longhorn.md
@@ -27,7 +27,6 @@ Longhorn wont free/trim the space gained by the deletion of the snapshots and wi
This can be prevented by adding the following `ReccuringTask` to Longhorn:
```yaml
-
apiVersion: longhorn.io/v1beta2
kind: RecurringJob
metadata:
@@ -41,11 +40,54 @@ spec:
name: trim
retain: 0
task: filesystem-trim
-
```
-This runs a filesystem trim on midnight cet. To free the "used" space.
+This runs a filesystem trim at midnight UTC. To free the "used" space.
+
+In addition to trim, it is possible to delete and cleanup all snapshots by adding tasks for snapshot-delete and snapshot-cleanup.
+
+:::caution
+
+This tasks should only be used with caution, as they will delete manually created snapshots too.
+
+:::
+
+
+```yaml
+apiVersion: longhorn.io/v1beta2
+kind: RecurringJob
+metadata:
+ name: delete
+ namespace: longhorn-system
+spec:
+ concurrency: 1
+ cron: 00 22 * * *
+ groups:
+ - default
+ name: delete
+ retain: 0
+ task: snapshot-delete
+```
+This runs a snapshot delete task at 22:00 UTC.
+
+```yaml
+apiVersion: longhorn.io/v1beta2
+kind: RecurringJob
+metadata:
+ name: cleanup
+ namespace: longhorn-system
+spec:
+ concurrency: 1
+ cron: 30 22 * * *
+ groups:
+ - default
+ name: cleanup
+ retain: 0
+ task: snapshot-cleanup
+```
+This runs a snapshot cleanup task at 22:30 UTC.
## Other references
-
-
+ \
+ \
+