mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
cli: search all namespaces for node volumes (#17925)
When looking for CSI volumes to display in the `node status` command the CLI needs to search all namespaces.
This commit is contained in:
3
.changelog/17925.txt
Normal file
3
.changelog/17925.txt
Normal file
@@ -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
|
||||
```
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user