Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding new capabilities to the "./kubestr browse" command #276

Closed
shlokc9 opened this issue Jul 24, 2024 · 0 comments · Fixed by #275, #277 or #278
Closed

Adding new capabilities to the "./kubestr browse" command #276

shlokc9 opened this issue Jul 24, 2024 · 0 comments · Fixed by #275, #277 or #278
Assignees
Labels
CS Browse feature enhancement New feature or request go Pull requests that update Go code

Comments

@shlokc9
Copy link
Contributor

shlokc9 commented Jul 24, 2024

Description

Right now, we allow ./kubestr browse command to mount a single PersistentVolumeClaim on a Filebrowser pod and expose the browser UI to look into the contents of a PVC. It would be great if we could extend the browse utility to look through the contents of a VolumeSnapshot, too.

Proposed changes

Browse through a PVC using Filebrowser

> ./kubestr browse <pvc-name> -n <namespace> -v <volume-snapshot-class>

For backward compatibility purposes, we continue to support this command which helps in browsing through a PVC. Just the way it functions at the moment.

> ./kubestr browse pvc <pvc-name> -n <namespace> -v <volume-snapshot-class>

We create a new ./kubestr browse pvc sub-command that works the same way as ./kubestr browse. Adding a pvc sub-command would come in handy to differentiate between PVC browsing and Snapshot browsing functionalities. Making both the commands concise and easy to understand.

Browse through a VolumeSnapshot using Filebrowser

$ ./kubestr browse snapshot <snapshot-name> -n <namespace> -s <storage-class>

This new command would create an in-flight PVC from the given VolumeSnapshot and mount the same PVC to a Filebrowser pod. Which would allow users to navigate through the contents of the Snapshot using Filebrowser UI.

Print directory tree structure for a PVC

$ ./kubestr browse pvc <pvc-name> -n <namespace> -v <volume-snapshot-class> —show-tree

The --show-tree flag would allow users to print out the directory structure of a PVC without using the Filebrowser service. Expected behavior here is to launch a container in an ephemeral pod that uses any basic linux image and run a POSIX command that would output the entire tree structure of the PVC content. And pass along that stdout in the container to kubestr.

Print directory tree structure for a VolumeSnapshot

$ ./kubestr browse snapshot <snapshot-name> -n <namespace> -s <storage-class> —show-tree

Lastly, the --show-tree flag for ./kubestr browse snapshot is expected to work the same as it does for ./kubestr browse pvc. The only difference here would be that we output the tree structure of the contents of a Snapshot instead of a PVC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment