csi: remove redundant namespace field from volume status output (#24432)

The `volume status :id` command outputs the namespace for a CSI volume
twice. Drop the second output.

Ref: https://github.com/hashicorp/nomad/pull/24382#discussion_r1837097250
This commit is contained in:
Tim Gross
2024-11-11 16:05:59 -05:00
committed by GitHub
parent 1d123fdc7b
commit 189d648f95
2 changed files with 3 additions and 2 deletions

3
.changelog/24432.txt Normal file
View File

@@ -0,0 +1,3 @@
```release-note:bug
csi: Removed redundant namespace output from volume status command
```

View File

@@ -205,11 +205,9 @@ func (c *VolumeStatusCommand) formatBasic(vol *api.CSIVolume) (string, error) {
fmt.Sprintf("Controllers Expected|%d", vol.ControllersExpected),
fmt.Sprintf("Nodes Healthy|%d", vol.NodesHealthy),
fmt.Sprintf("Nodes Expected|%d", vol.NodesExpected),
fmt.Sprintf("Access Mode|%s", vol.AccessMode),
fmt.Sprintf("Attachment Mode|%s", vol.AttachmentMode),
fmt.Sprintf("Mount Options|%s", csiVolMountOption(vol.MountOptions, nil)),
fmt.Sprintf("Namespace|%s", vol.Namespace),
}
// Exit early