mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-10 12:32:03 +00:00
Add kubectl describe cmd support for vSphere volume
This commit is contained in:
parent
c69e3d32a2
commit
1b54fa3d4f
@ -610,6 +610,8 @@ func describeVolumes(volumes []api.Volume, out io.Writer, space string) {
|
|||||||
printDownwardAPIVolumeSource(volume.VolumeSource.DownwardAPI, out)
|
printDownwardAPIVolumeSource(volume.VolumeSource.DownwardAPI, out)
|
||||||
case volume.VolumeSource.AzureDisk != nil:
|
case volume.VolumeSource.AzureDisk != nil:
|
||||||
printAzureDiskVolumeSource(volume.VolumeSource.AzureDisk, out)
|
printAzureDiskVolumeSource(volume.VolumeSource.AzureDisk, out)
|
||||||
|
case volume.VolumeSource.VsphereVolume != nil:
|
||||||
|
printVsphereVolumeSource(volume.VolumeSource.VsphereVolume, out)
|
||||||
default:
|
default:
|
||||||
fmt.Fprintf(out, " <unknown>\n")
|
fmt.Fprintf(out, " <unknown>\n")
|
||||||
}
|
}
|
||||||
@ -738,6 +740,13 @@ func printAzureDiskVolumeSource(d *api.AzureDiskVolumeSource, out io.Writer) {
|
|||||||
d.DiskName, d.DataDiskURI, *d.FSType, *d.CachingMode, *d.ReadOnly)
|
d.DiskName, d.DataDiskURI, *d.FSType, *d.CachingMode, *d.ReadOnly)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func printVsphereVolumeSource(vsphere *api.VsphereVirtualDiskVolumeSource, out io.Writer) {
|
||||||
|
fmt.Fprintf(out, " Type:\tvSphereVolume (a Persistent Disk resource in vSphere)\n"+
|
||||||
|
" VolumePath:\t%v\n"+
|
||||||
|
" FSType:\t%v\n",
|
||||||
|
vsphere.VolumePath, vsphere.FSType)
|
||||||
|
}
|
||||||
|
|
||||||
type PersistentVolumeDescriber struct {
|
type PersistentVolumeDescriber struct {
|
||||||
client.Interface
|
client.Interface
|
||||||
}
|
}
|
||||||
@ -789,6 +798,8 @@ func (d *PersistentVolumeDescriber) Describe(namespace, name string, describerSe
|
|||||||
printRBDVolumeSource(pv.Spec.RBD, out)
|
printRBDVolumeSource(pv.Spec.RBD, out)
|
||||||
case pv.Spec.Quobyte != nil:
|
case pv.Spec.Quobyte != nil:
|
||||||
printQuobyteVolumeSource(pv.Spec.Quobyte, out)
|
printQuobyteVolumeSource(pv.Spec.Quobyte, out)
|
||||||
|
case pv.Spec.VsphereVolume != nil:
|
||||||
|
printVsphereVolumeSource(pv.Spec.VsphereVolume, out)
|
||||||
}
|
}
|
||||||
|
|
||||||
if events != nil {
|
if events != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user