Skip to content

Commit

Permalink
csi: remove redundant namespace field from volume status output (#24432)
Browse files Browse the repository at this point in the history
The `volume status :id` command outputs the namespace for a CSI volume
twice. Drop the second output.

Ref: #24382 (comment)
  • Loading branch information
tgross authored Nov 11, 2024
1 parent 1d123fd commit 189d648
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .changelog/24432.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
csi: Removed redundant namespace output from volume status command
```
2 changes: 0 additions & 2 deletions command/volume_status_csi.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 189d648

Please sign in to comment.