feat: add volume snapshot class for longhorn
This commit is contained in:
parent
b4bfb3e11b
commit
e02c4d8066
|
@ -11,7 +11,7 @@ spec:
|
||||||
copyMethod: "${VOLSYNC_COPYMETHOD:-Snapshot}"
|
copyMethod: "${VOLSYNC_COPYMETHOD:-Snapshot}"
|
||||||
pruneIntervalDays: 7
|
pruneIntervalDays: 7
|
||||||
repository: "${APP}-volsync-b2-secret"
|
repository: "${APP}-volsync-b2-secret"
|
||||||
volumeSnapshotClassName: "${VOLSYNC_SNAPSHOTCLASS:-longhorn}"
|
volumeSnapshotClassName: "${VOLSYNC_SNAPSHOTCLASS:-longhorn-backup}"
|
||||||
cacheCapacity: "${VOLSYNC_CACHE_CAPACITY:-4Gi}"
|
cacheCapacity: "${VOLSYNC_CACHE_CAPACITY:-4Gi}"
|
||||||
cacheStorageClassName: "${VOLSYNC_CACHE_SNAPSHOTCLASS:-mainpool-hostpath}"
|
cacheStorageClassName: "${VOLSYNC_CACHE_SNAPSHOTCLASS:-mainpool-hostpath}"
|
||||||
cacheAccessModes: ["${VOLSYNC_CACHE_ACCESSMODES:-ReadWriteOnce}"]
|
cacheAccessModes: ["${VOLSYNC_CACHE_ACCESSMODES:-ReadWriteOnce}"]
|
||||||
|
|
|
@ -12,7 +12,7 @@ spec:
|
||||||
copyMethod: "${VOLSYNC_COPYMETHOD:-Snapshot}"
|
copyMethod: "${VOLSYNC_COPYMETHOD:-Snapshot}"
|
||||||
pruneIntervalDays: 7
|
pruneIntervalDays: 7
|
||||||
repository: "${APP}-volsync-secret"
|
repository: "${APP}-volsync-secret"
|
||||||
volumeSnapshotClassName: "${VOLSYNC_SNAPSHOTCLASS:-longhorn}"
|
volumeSnapshotClassName: "${VOLSYNC_SNAPSHOTCLASS:-longhorn-backup}"
|
||||||
cacheCapacity: "${VOLSYNC_CACHE_CAPACITY:-4Gi}"
|
cacheCapacity: "${VOLSYNC_CACHE_CAPACITY:-4Gi}"
|
||||||
cacheStorageClassName: "${VOLSYNC_CACHE_SNAPSHOTCLASS:-mainpool-hostpath}"
|
cacheStorageClassName: "${VOLSYNC_CACHE_SNAPSHOTCLASS:-mainpool-hostpath}"
|
||||||
cacheAccessModes: ["${VOLSYNC_CACHE_ACCESSMODES:-ReadWriteOnce}"]
|
cacheAccessModes: ["${VOLSYNC_CACHE_ACCESSMODES:-ReadWriteOnce}"]
|
||||||
|
@ -38,7 +38,7 @@ spec:
|
||||||
restic:
|
restic:
|
||||||
repository: "${APP}-volsync-secret"
|
repository: "${APP}-volsync-secret"
|
||||||
copyMethod: Snapshot # must be Snapshot
|
copyMethod: Snapshot # must be Snapshot
|
||||||
volumeSnapshotClassName: "${VOLSYNC_SNAPSHOTCLASS:-longhorn}"
|
volumeSnapshotClassName: "${VOLSYNC_SNAPSHOTCLASS:-longhorn-backup}"
|
||||||
cacheStorageClassName: "${VOLSYNC_CACHE_SNAPSHOTCLASS:-mainpool-hostpath}"
|
cacheStorageClassName: "${VOLSYNC_CACHE_SNAPSHOTCLASS:-mainpool-hostpath}"
|
||||||
cacheAccessModes: ["${VOLSYNC_CACHE_ACCESSMODES:-ReadWriteOnce}"]
|
cacheAccessModes: ["${VOLSYNC_CACHE_ACCESSMODES:-ReadWriteOnce}"]
|
||||||
cacheCapacity: "${VOLSYNC_CACHE_CAPACITY:-8Gi}"
|
cacheCapacity: "${VOLSYNC_CACHE_CAPACITY:-8Gi}"
|
||||||
|
|
|
@ -5,4 +5,5 @@ resources:
|
||||||
- ./helm-repository.yaml
|
- ./helm-repository.yaml
|
||||||
- ./helm-release.yaml
|
- ./helm-release.yaml
|
||||||
- ./alerts.yaml
|
- ./alerts.yaml
|
||||||
- ./service-monitor.yaml
|
- ./service-monitor.yaml
|
||||||
|
- ./snapshot-class-bak.yaml
|
|
@ -0,0 +1,9 @@
|
||||||
|
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/snapshot.storage.k8s.io/volumesnapshotclass_v1.json
|
||||||
|
kind: VolumeSnapshotClass
|
||||||
|
apiVersion: snapshot.storage.k8s.io/v1
|
||||||
|
metadata:
|
||||||
|
name: longhorn-backup
|
||||||
|
driver: driver.longhorn.io
|
||||||
|
deletionPolicy: Delete
|
||||||
|
parameters:
|
||||||
|
type: bak
|
Loading…
Reference in New Issue