kastenhq / kubestr

Apache License 2.0
349 stars 47 forks source link

Adding "./kubestr browse snapshot" command #277

Closed shlokc9 closed 2 months ago

shlokc9 commented 2 months ago

This PR adds a new command ./kubestr browse snapshot which would enable the users to browse through the contents of a VolumeSnapshot using Filebrowser UI.

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;

> ./kubestr browse snapshot test-snapshot -n file-level-restore -s standard-rwo
Fetching the snapshot.
Creating the file browser application.
Forwarding the port.
Port forwarding is ready to get traffic. visit http://localhost:8080/
^CStopping port forward
Cleaning up resources.

During cleanup, we clean the placeholder PVC created from the VolumeSnapshot along with the Filebrowser pod.