This PR adds a --fromPVC argument to the ./kubestr file-restore command. It would help users to mount a backup PVC along with their application PVC to a browser pod instead of only relying on a VolumeSnapshot as a backup.
Unit-tested these code changes with new fake tests and mock objects.
Tested these code changes by executing the command on a GKE cluster. Please find the output below;
> ./bin/kubestr file-restore --fromPVC restore-pvc --toPVC app-pvc -n application
Fetching the snapshot or PVC.
Fetching the restore PVC.
Fetching the source PVC.
Creating the browser pod & mounting the PVCs.
Forwarding the port.
Port forwarding is ready to get traffic. visit http://localhost:8080/
^C
Stopping port forward.
Cleaning up browser pod.
During cleanup, we do not clean the PVC. We just delete the Filebrowser pod.
This PR adds a --fromPVC argument to the
./kubestr file-restore
command. It would help users to mount a backup PVC along with their application PVC to a browser pod instead of only relying on a VolumeSnapshot as a backup.Unit-tested these code changes with new fake tests and mock objects. Tested these code changes by executing the command on a GKE cluster. Please find the output below;
During cleanup, we do not clean the PVC. We just delete the Filebrowser pod.