Skip to content

Commit

Permalink
cli: search all namespaces for node volumes (#17925)
Browse files Browse the repository at this point in the history
When looking for CSI volumes to display in the `node status` command the
CLI needs to search all namespaces.
  • Loading branch information
lgfa29 committed Aug 1, 2023
1 parent 4841791 commit 7689788
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .changelog/17925.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
cli: Fixed a bug that prevented CSI volumes in namespaces other than `default` from being displayed in the `nomad node status -verbose` output
```
4 changes: 3 additions & 1 deletion command/node_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,9 @@ func (c *NodeStatusCommand) outputNodeCSIVolumeInfo(client *api.Client, node *ap
// Fetch the volume objects with current status
// Ignore an error, all we're going to do is omit the volumes
volumes := map[string]*api.CSIVolumeListStub{}
vs, _ := client.Nodes().CSIVolumes(node.ID, nil)
vs, _ := client.Nodes().CSIVolumes(node.ID, &api.QueryOptions{
Namespace: "*",
})
for _, v := range vs {
n, ok := requests[v.ID]
if ok {
Expand Down

0 comments on commit 7689788

Please sign in to comment.