longhorn recurring job CRDs

This commit is contained in:
2025-06-10 10:07:18 -04:00
parent 05a3648e1c
commit 75f07226aa
4 changed files with 51 additions and 5 deletions

View File

@@ -0,0 +1,12 @@
apiVersion: longhorn.io/v1beta2
kind: RecurringJob
metadata:
name: backup
namespace: longhorn-system
spec:
cron: "0 1 * * *"
task: "backup"
groups:
- backup
retain: 10
concurrency: 1

View File

@@ -0,0 +1,12 @@
apiVersion: longhorn.io/v1beta2
kind: RecurringJob
metadata:
name: snapshot
namespace: longhorn-system
spec:
cron: "0 * * * *"
task: "snapshot"
groups:
- snapshot
retain: 24
concurrency: 2

View File

@@ -0,0 +1,12 @@
apiVersion: longhorn.io/v1beta2
kind: RecurringJob
metadata:
name: trim
namespace: longhorn-system
spec:
cron: "30 0 * * *"
task: "filesystem-trim"
groups:
- trim
retain: 0
concurrency: 1

View File

@@ -18,11 +18,21 @@ spec:
defaultClassReplicaCount: 3 defaultClassReplicaCount: 3
recurringJobSelector: recurringJobSelector:
enable: true enable: true
jobList: [ jobList: |
{"name":"backup", "isGroup":true}, [
{"name":"snapshot", "isGroup":true}, {
{"name":"trim", "isGroup":true}, "name":"backup",
] "isGroup":true
},
{
"name":"snapshot",
"isGroup":true
}
{
"name":"trim",
"isGroup":true
}
]
defaultSettings: defaultSettings:
backupTarget: s3://mthomson-longhorn-backups@us-west-004/ backupTarget: s3://mthomson-longhorn-backups@us-west-004/