Skip to content

Commit 7fab0e2

Browse files
committed
update doc
Signed-off-by: Shovan Maity <[email protected]>
1 parent 48c7676 commit 7fab0e2

12 files changed

+42
-39
lines changed

docs/demo/01_pv_populator.md

+7-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
PV Populator is a `Volume Populator` that helps to rename a PVC. It does a patch on `PersistentVolume` of older `Claim` with new `Claim`.
1+
PV Populator is a volume populator that does a patch on PV of older PVC with new PVC. Here source of the volume is the PV of any older PVC. Both the PVC(new and source) should be from same storageclass. It is like mentioning PVC as a data source for a PVC. There one clone volume will be created and here PV of the mentioned PVC will be patched with new PVC. In this way we will be able to rename a PVC and it will refer to the PV of older PVC.
22

33
NOTE -
44
1. `AnyVolumeDataSource` feature gate should be enabled in the kubernetes cluster.
5-
2. Default storageclass should be configured for this demo.
6-
3. Namespace `volume-copy` is reserved for volume populator. Don't create any application or pvc in that namespace.
7-
4. Before rename volume should not be used by any application.
5+
2. Namespace `volume-copy` is reserved for volume populator. Don't create any application or pvc in that namespace.
6+
3. Before rename volume should not be used by any application.
87

9-
Here are the steps to rename a pvc using PV Populator.
8+
Here are the steps of how to use persistent volume populator -
109
1. Install volume populator.
1110
```bash
1211
kubectl create ns volume-copy
@@ -32,7 +31,7 @@ Here are the steps to rename a pvc using PV Populator.
3231
/data # cat file
3332
hello!
3433
```
35-
3. After writing some data delete the pod.
34+
3. After writing some data delete the Pod.
3635
```bash
3736
kubectl delete -f yaml/populator/pv/app/pod.yaml
3837
```
@@ -48,7 +47,7 @@ Here are the steps to rename a pvc using PV Populator.
4847
spec:
4948
pvcName: my-pvc
5049
```
51-
5. Create a new pvc pointing to the claim-cpopulator.
50+
5. Create a new pvc pointing to pv-cpopulator.
5251
```bash
5352
# Please edit the storageclass accordingly
5453
kubectl apply -f yaml/populator/pv/app/pvc-d.yaml
@@ -71,7 +70,7 @@ Here are the steps to rename a pvc using PV Populator.
7170
requests:
7271
storage: 2Gi
7372
```
74-
6. Create a new pod and check the older data is present or not.
73+
6. Create a new Pod and check the older data is present or not in the new PVC.
7574
```bash
7675
kubectl apply -f yaml/populator/pv/app/pod-d.yaml
7776
```

docs/demo/02_rsync_populator.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
Rsync Populator is a `Volume Populator` that helps to create volume using rsync source. In this project we are creating rsync daemon on source volume and then populator will use that source to create a volume.
1+
Rsync Populator is a volume populator that helps to create volume from any rsync source. Rsync client is used as volume populator plugin. `RsyncPopulator` CR contains the information of source location and how to access the source.
22

33
NOTE -
44
1. `AnyVolumeDataSource` feature gate should be enabled in the kubernetes cluster.
55
2. Namespace `volume-copy` is reserved for volume populator. Don't create any application or pvc in that namespace.
6+
3. Before rename volume should not be used by any application.
67

7-
Here are the steps to create a volume using rsync source.
8+
Here are the steps of how to use rsync populator -
89
1. Install volume populator
910
```bash
1011
kubectl create ns volume-copy
@@ -34,11 +35,11 @@ Here are the steps to create a volume using rsync source.
3435
```bash
3536
kubectl delete -f yaml/populator/rsync/app/pod.yaml
3637
```
37-
4. Install rsync daemon as a source, it will mount source volume.
38+
4. Setup rsync source, install rsync daemon pod, configmap and service it will mount source volume.
3839
```bash
3940
kubectl apply -f yaml/server/rsync/deploy.yaml
4041
```
41-
5. Create a rsyncpopulator cr. It has all the details of source rsyncd.
42+
5. Create a rsyncpopulator cr. It has all the details of rsync source.
4243
```bash
4344
kubectl apply -f yaml/populator/rsync/cr.yaml
4445
```
@@ -53,7 +54,7 @@ Here are the steps to create a volume using rsync source.
5354
url: rsync-daemon.default:873
5455
path: /data
5556
```
56-
6. Create a new pvc pointing to the rsync-populator.
57+
6. Create a new pvc pointing to rsync-populator.
5758
```bash
5859
# Please edit the storageclass accordingly
5960
kubectl apply -f yaml/populator/rsync/app/pvc-d.yaml
@@ -76,7 +77,7 @@ Here are the steps to create a volume using rsync source.
7677
requests:
7778
storage: 2Gi
7879
```
79-
7. Create a new pod and check the older data is present or not.
80+
7. Create a new pod and check the older data is present or not in the new PVC.
8081
```bash
8182
kubectl apply -f yaml/populator/rsync/app/pod-d.yaml
8283
```

docs/demo/03_rename_volume.md

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
[PV Populator](https://github.com/shovanmaity/k8s-volume-copy/blob/main/docs/demo/01_pv_populator.md) is a `Volume Populator` that helps to rename a PVC. It does a patch on `PersistentVolume` of older `Claim` with new `Claim`. Volume Rename control loop use this to rename a volume. We can rename a pvc using PV Populator there we need to create populator and pvc. Volume Rename takes care of these 2 steps. We just need to create `VolumeRename` CR.
1+
PersistentVolume Populator is a volume populator that does a patch on the PV of given PVC with new PVC. Volume Rename control loop, it makes use of PersistentVolume Populator to rename a volume. When a `VolumeRename` CR is created it creates a PersistentVolumePopulator CR and a new PVC pointing to that volume populator CR as a data source.
22

33
NOTE -
44
1. `AnyVolumeDataSource` feature gate should be enabled in the kubernetes cluster.
5-
2. Default storageclass should be configured for this demo.
6-
3. Namespace `volume-copy` is reserved for volume populator. Don't create any application or pvc in that namespace.
7-
4. Before rename volume should not be used by any application.
5+
2. Namespace `volume-copy` is reserved for volume populator. Don't create any application or pvc in that namespace.
6+
3. Before rename volume should not be used by any application.
87

9-
Here are the steps to rename a pvc.
8+
Here are the steps to rename a pvc -
109
1. Install volume populator and volume rename controller.
1110
```bash
1211
kubectl create ns volume-copy
@@ -38,7 +37,7 @@ Here are the steps to rename a pvc.
3837
```bash
3938
kubectl delete -f yaml/volume-rename/app/pod.yaml
4039
```
41-
4. Create a volume rename cr. It has old and new pvc details.
40+
4. Create a `VolumeRename` cr. It contains old and new pvc details.
4241
```bash
4342
kubectl apply -f yaml/volume-rename/cr.yaml
4443
```
@@ -55,7 +54,7 @@ Here are the steps to rename a pvc.
5554
```bash
5655
kubectl get volumerename.demo.io/volume-rename -o=jsonpath="{.status.state}{'\n'}"
5756
```
58-
6. Create a new pod and check the older data is present or not.
57+
6. Create a new pod and check the older data is present or not in the new PVC.
5958
```bash
6059
kubectl apply -f yaml/volume-rename/app/pod-d.yaml
6160
```

docs/demo/04_copy_volume.md

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
[Rsync Populator](https://github.com/shovanmaity/k8s-volume-copy/blob/main/docs/demo/02_rsync_populator.md) is a `Volume Populator` that helps to create a volume from any rsync source. This module use it to copy any filesystem PVC. It creates rsync server on source PVC and rsync client is used as populator to create a new volume copy.
1+
Rsync Populator is a volume populator that helps to create a volume from any rsync source. Volume Copy control loop, it makes use of Rsync Populator to rename a volume. When a `VolumeCopy` CR is created it sets up rsync source on the source PVC and creates a RsyncPopulator and a new PVC pointing to that volume populator as a data source.
22

33
NOTE -
44
1. `AnyVolumeDataSource` feature gate should be enabled in the kubernetes cluster.
5-
2. Default storageclass should be configured for this demo.
6-
3. Namespace `volume-copy` is reserved for volume populator. Don't create any application or pvc in that namespace.
7-
4. Before copying volume should not be used by any application.
5+
2. Namespace `volume-copy` is reserved for volume populator. Don't create any application or pvc in that namespace.
6+
3. Before copying volume should not be used by any application.
87

9-
Here are the steps to copy a pvc.
8+
Here are the steps to copy a pvc -
109
1. Install volume populator and volume copy controller.
1110
```bash
1211
kubectl create ns volume-copy
@@ -38,7 +37,7 @@ Here are the steps to copy a pvc.
3837
```bash
3938
kubectl delete -f yaml/volume-copy/app/pod.yaml
4039
```
41-
4. Create a VolumeCopy cr. It has old and new pvc details in the spec.
40+
4. Create a `VolumeCopy` cr. It has old and new pvc details in the spec.
4241
```bash
4342
kubectl apply -f yaml/volume-copy/cr.yaml
4443
```
@@ -57,7 +56,7 @@ Here are the steps to copy a pvc.
5756
```bash
5857
kubectl get volumecopy.demo.io/volume-copy -o=jsonpath="{.status.state}{'\n'}"
5958
```
60-
6. Create a new pod and check the older data is present or not.
59+
6. Create a new pod and check the older data is present or not in the new PVC.
6160
```bash
6261
kubectl apply -f yaml/volume-rename/app/pod-d.yaml
6362
```

docs/demo/05_move_volume.md

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
In this demo we will move PVC from one storageclass to another storageclass. In these yaml storage class `hp-node-1` and `hp-node-2` are hard coded, if you want you can change it. In this demo we will use `VolumeRename` and `VolumeCopy`. Flow is `scale down` -> `rename volume(s)` -> `copy volume(s)` -> `scale up`.
1+
In this demo we will move PVC from one storageclass to another storageclass. In these yaml storage class `hp-node-1` and `hp-node-2` are hard coded, if you want you can change it. In this demo we will use `VolumeRename` and `VolumeCopy`.
22

33
NOTE -
44
1. `AnyVolumeDataSource` feature gate should be enabled in the kubernetes cluster.
5-
2. Storageclass should be configured for this demo.
6-
3. Namespace `volume-copy` is reserved for volume populator. Don't create any application or pvc in that namespace.
7-
4. Before moving volume should not be used by any application.
5+
2. Namespace `volume-copy` is reserved for volume populator. Don't create any application or pvc in that namespace.
6+
3. Before moving volume should not be used by any application.
87

9-
Here are steps -
8+
Here are steps to move a volume from one storageclass to another storageclass -
109
1. Install PV and Rsync volume populator and volume rename and copy controller.
1110
```bash
1211
kubectl create ns volume-copy
@@ -25,7 +24,7 @@ Here are steps -
2524
```bash
2625
kubectl apply -f yaml/volume-move/app.yaml
2726
```
28-
3. After adding some file in minio scale it down.
27+
3. After adding some data in minio scale it down.
2928
```bash
3029
kubectl scale sts minio --replicas=0
3130
```

docs/demo/readme.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ We have 2 volume Populators
22
1. Rsync populator
33
2. Persistentvolume populator
44

5-
In the demo section we have main 3 functionalities. In this 3 functionalities 2 populator are used.
5+
In the demo we have main 3 functionalities.
66
1. Rename a PVC
77
2. Make a copy of PVC
8-
3. Move data from one SC to another SC
8+
3. Move a PVC from one SC to another SC
99

1010
Here are demo or how to links -
11-
- [How to use Persistentvolume populator](https://github.com/shovanmaity/k8s-volume-copy/blob/main/docs/demo/01_pv_populator.md)
12-
- [How to use Rsync populator](https://github.com/shovanmaity/k8s-volume-copy/blob/main/docs/demo/02_rsync_populator.md)
11+
- [How to use PersistentVolume Populator](https://github.com/shovanmaity/k8s-volume-copy/blob/main/docs/demo/01_pv_populator.md)
12+
- [How to use Rsync Populator](https://github.com/shovanmaity/k8s-volume-copy/blob/main/docs/demo/02_rsync_populator.md)
1313
- [How to rename a PVC](https://github.com/shovanmaity/k8s-volume-copy/blob/main/docs/demo/03_rename_volume.md)
1414
- [How to make a copy of a PVC](https://github.com/shovanmaity/k8s-volume-copy/blob/main/docs/demo/04_copy_volume.md)
15-
- [How to move data from one SC to another SC](https://github.com/shovanmaity/k8s-volume-copy/blob/main/docs/demo/05_move_volume.md)
15+
- [How to move a PVC from one SC to another SC](https://github.com/shovanmaity/k8s-volume-copy/blob/main/docs/demo/05_move_volume.md)

docs/design/00_volume_populator.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
TODO

docs/design/01_pv_populator.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
TODO

docs/design/02_rsync_populator.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
TODO

docs/design/03_rename_volume.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
TODO

docs/design/04_copy_volume.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
TODO

docs/design/readme.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
TODO

0 commit comments

Comments
 (0)