-
Notifications
You must be signed in to change notification settings - Fork 0
/
data-migrator.yml
94 lines (93 loc) · 1.9 KB
/
data-migrator.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
apiVersion: v1
kind: PersistentVolume
metadata:
name: emby-target-pv
namespace: default
spec:
accessModes:
- ReadWriteOnce
storageClassName: longhorn
capacity:
storage: 100Gi
csi:
driver: driver.longhorn.io
fsType: ext4
volumeHandle: emby-config
persistentVolumeReclaimPolicy: Retain
volumeMode: Filesystem
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: emby-target-pvc
namespace: downloads
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Gi
storageClassName: longhorn
volumeName: emby-target-pv
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: data-source-pv
namespace: downloads
spec:
capacity:
storage: 6Ti
accessModes:
- ReadWriteMany
nfs:
server: fs.cynexia.net
path: "/tank/appdata/emby"
persistentVolumeReclaimPolicy: Retain
storageClassName: retain-local-path
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: data-source-pvc
namespace: downloads
spec:
volumeName: data-source-pv
accessModes:
- ReadWriteMany
storageClassName: retain-local-path
resources:
requests:
storage: 6Ti
---
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: downloads
name: volume-migration
spec:
strategy:
type: Recreate
selector:
matchLabels:
app: volume-migration
template:
metadata:
labels:
app: volume-migration
spec:
containers:
- name: volume-migration
image: mnbf9rca/data-migrator:v4
volumeMounts:
- name: old-vol
mountPath: /source
- name: new-vol
mountPath: /target
volumes:
- name: old-vol
persistentVolumeClaim:
claimName: data-source-pvc # change to data source pvc
- name: new-vol
persistentVolumeClaim:
claimName: emby-target-pvc # change to data target pvc