-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0a9a6d6
commit a517fac
Showing
6 changed files
with
12 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
# Pvc Copy Tool | ||
# Clone PVC | ||
|
||
The pvc copy tool is designed to copy the contents of one PersistentVolume (PV) to a newly created PersistentVolumeClaim (PVC). This tool is especially useful when migrating PersistentVolumes to a new StorageClass or when you need to resize a PV that belongs to a StorageClass that doesn’t support resizing. | ||
The clone PVC is designed to copy the contents of one PersistentVolume (PV) to a newly created PersistentVolumeClaim (PVC). Clone pvc is especially useful when migrating PersistentVolumes to a new StorageClass or when you need to resize a PV that belongs to a StorageClass that doesn’t support resizing. | ||
|
||
The tool employs a workaround for reclaiming PVs, which is necessary to handle ReadWriteOnce (RWO) PVs. If you're working with a ReadWriteMany (RWX) PV, you can directly run a copy job and attach the Job-Pod to the existing PVC—there's no need to create a new PVC. | ||
The clone PVC employs a workaround for reclaiming PVs, which is necessary to handle ReadWriteOnce (RWO) PVs. If you're working with a ReadWriteMany (RWX) PV, you can directly run a copy job and attach the Job-Pod to the existing PVC—there's no need to create a new PVC. | ||
|
||
Use Cases | ||
|
||
|
@@ -14,12 +14,12 @@ Use Cases | |
|
||
### Step-by-Step Process | ||
|
||
**1. Clone the Repository:** First, clone the repository that contains the pvc-copy-tool. | ||
**1. Clone the Repository:** First, clone the repository that contains the clone PVC. | ||
|
||
```bash | ||
git clone https://github.com/stakater/charts | ||
|
||
cd pvc-copy-tool | ||
cd clone-pvc | ||
``` | ||
|
||
**2. Identify the PV to Copy:** Find the PersistentVolume (PV) you wish to copy. | ||
|
@@ -59,28 +59,28 @@ Once the data has been copied and the Job has been deleted, you can rebind the P | |
|
||
#### Example Helm Chart Deployment for One-Off Job | ||
|
||
To deploy the tool as a one-off job, you can use the following example Helm chart configuration: | ||
To deploy the clone PVC as a one-off job, you can use the following example Helm chart configuration: | ||
|
||
```yaml | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Application | ||
metadata: | ||
name: pvc-copy-tool | ||
name: clone-pvc | ||
namespace: argocd | ||
spec: | ||
destination: | ||
namespace: <target-namespace> | ||
server: https://kubernetes.default.svc | ||
source: | ||
path: pvc-copy-tool | ||
repoURL: ssh://[email protected]:stakater/pvc-copy-tool.git | ||
path: clone-pvc | ||
repoURL: ssh://[email protected]:stakater/charts | ||
targetRevision: master | ||
helm: | ||
parameters: | ||
- name: oldPvName | ||
value: "<target-pv>" | ||
- name: newPvcName | ||
value: "image-registry-storage-clone" | ||
value: "clone-pvc" | ||
- name: newPvcStorageClass | ||
value: "" | ||
- name: newPvcSize | ||
|
2 changes: 1 addition & 1 deletion
2
pvc-copy-tool/templates/copy-job.yaml → clone-pvc/templates/copy-job.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: pvc-copy-tool | ||
name: clone-pvc | ||
spec: | ||
template: | ||
spec: | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.