Skip to content
This repository has been archived by the owner on May 5, 2024. It is now read-only.

Commit

Permalink
feat: add volsync
Browse files Browse the repository at this point in the history
  • Loading branch information
truxnell committed Mar 4, 2024
1 parent 3fdd6ae commit 3449e02
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
1 change: 1 addition & 0 deletions kubernetes/apps/services/webtrees/app/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ resources:
- ./pvc.yaml
- ./externalsecret.yaml
- ./secret.yaml
- ./volsync.yaml
65 changes: 65 additions & 0 deletions kubernetes/apps/services/webtrees/app/volsync.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
apiVersion: external-secrets.io/v1beta1
kind: ClusterSecretStore
metadata:
name: &name webtrees-restic
namespace: services
spec:
provider:
doppler:
project: restic-template
config: prd
auth:
secretRef:
dopplerToken:
name: doppler-token-auth-api
key: dopplerToken
namespace: flux-system
---
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: &name webtrees-restic
namespace: services
spec:
secretStoreRef:
kind: ClusterSecretStore
name: *name
target:
name: *name
template:
engineVersion: v2
data:
RESTIC_REPOSITORY: "{{ .REPOSITORY_TEMPLATE }}/webtrees"
RESTIC_PASSWORD: "{{ .RESTIC_PASSWORD }}"
AWS_ACCESS_KEY_ID: "{{ .AWS_ACCESS_KEY_ID }}"
AWS_SECRET_ACCESS_KEY: "{{ .AWS_SECRET_ACCESS_KEY }}"
dataFrom:
- find:
name:
regexp: .*
---
apiVersion: volsync.backube/v1alpha1
kind: ReplicationSource
metadata:
name: webtrees
namespace: services
spec:
sourcePVC: webtrees-config-v1
trigger:
schedule: "0 4 * * *"
restic:
copyMethod: Snapshot
pruneIntervalDays: 10
repository: webtrees-restic
cacheCapacity: 2Gi
volumeSnapshotClassName: csi-ceph-blockpool
storageClassName: ceph-block
cacheStorageClassName: local-hostpath
moverSecurityContext:
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
retain:
daily: 10
within: 3d

0 comments on commit 3449e02

Please sign in to comment.