Skip to content

Commit

Permalink
Adding --show-tree flag to both "./kubestr browse pvc" & "./kubestr b…
Browse files Browse the repository at this point in the history
…rowse snapshot" commands (kastenhq#278)

* Adding the kubestr browse pvc command. Handling kubestr browse support for backward compatibility.

* Adding browse snapshot command. Updating browse command to browse pvc command.

* chore(deps): bump github/codeql-action in the github-actions group (kastenhq#272)

Bumps the github-actions group with 1 update: [github/codeql-action](https://github.com/github/codeql-action).


Updates `github/codeql-action` from 3.25.12 to 3.25.13
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@4fa2a79...2d79040)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump docker/build-push-action in the docker group (kastenhq#273)

Bumps the docker group with 1 update: [docker/build-push-action](https://github.com/docker/build-push-action).


Updates `docker/build-push-action` from 6.3.0 to 6.4.1
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](docker/build-push-action@1a16264...1ca370b)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: docker
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Adding --show-tree flag for browse snapshot & browse pvc commands

* Removing unused snapshot function parameter in cleanup

* Adding KubeExecutor Exec helper function to execute tree command

* Adding --show-tree logic in pvc_inspector.go

* Adding --show-tree logic in snapshot_inspector.go

* Printing out the tree structure for --show-tree

* Updating mock tests for new code changes

* Updating mount path in container args for creating a browse pod

* Updating the CSITestSuite.TestCreateInspectorApplication for changes in the mount path

* Adding Deprecated msg to the 'browse' command

* Adding mock tests for SnapshotBrowserStepper

* Adding fake tests for snapshot_inspector.go

* Renamed testcase CSITestSuite.TestCreateInspectorApplication to TestCreateInspectorApplicationForPVC

* Adding snapshot_inspector_steps_test.go

* Updating mock tests for new code changes

* Updating the mount paths in CSITestSuite.TestCreateInspectorApplicationForSnapshot

* Updating Deprecated msg for 'browse' command

* Making namespace, runAsUser & localport flags persistent

* Removing namespace, runAsUser & localport flags for browse snapshot because we made those persistent

* Adding --show-tree flag for browse snapshot & browse pvc commands

* Updating namespace flag usage for better understanding

* Removing storage class flag

* Adding --show-tree logic in snapshot_inspector.go

* Updating mock objects for SnapshotBrowserStepper

* Adding --show-tree flag for browse snapshot & browse pvc commands

* Removing storage class flag

* Adding --show-tree flag for browse snapshot & browse pvc commands

* Adding --show-tree logic in snapshot_inspector.go

* Passing showTree var as function argument

* Making --show-tree a persistent flag

* Removing ShowTree dummy condition

* Removing duplicate browseSnapshotCmd

* Adding --show-tree flag for browse snapshot & browse pvc commands

* Making --show-tree a persistent flag

* Adding --show-tree flag for browse snapshot & browse pvc commands

* Making --show-tree a persistent flag

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
shlokc9 and dependabot[bot] committed Aug 7, 2024
1 parent f1c2578 commit d22fcc5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/csi/pvc_inspector.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ func (r *PVCBrowseRunner) RunPVCBrowse(ctx context.Context, args *types.PVCBrows
dynCli: r.DynCli,
},
}
if args.ShowTree {
fmt.Println("Show Tree works for PVC!")
return nil
}
return r.RunPVCBrowseHelper(ctx, args)
}

Expand Down
4 changes: 4 additions & 0 deletions pkg/csi/snapshot_inspector.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ func (r *SnapshotBrowseRunner) RunSnapshotBrowse(ctx context.Context, args *type
dynCli: r.DynCli,
},
}
if args.ShowTree {
fmt.Println("Show Tree works for VS!")
return nil
}
return r.RunSnapshotBrowseHelper(ctx, args)
}

Expand Down

0 comments on commit d22fcc5

Please sign in to comment.