diff --git a/pkg/printers/internalversion/describe.go b/pkg/printers/internalversion/describe.go index 5135b231dae..16e8215d3e8 100644 --- a/pkg/printers/internalversion/describe.go +++ b/pkg/printers/internalversion/describe.go @@ -735,6 +735,8 @@ func describeVolumes(volumes []api.Volume, w PrefixWriter, space string) { printPortworxVolumeSource(volume.VolumeSource.PortworxVolume, w) case volume.VolumeSource.ScaleIO != nil: printScaleIOVolumeSource(volume.VolumeSource.ScaleIO, w) + case volume.VolumeSource.CephFS != nil: + printCephFSVolumeSource(volume.VolumeSource.CephFS, w) default: w.Write(LEVEL_1, "\n") } @@ -922,6 +924,17 @@ func printLocalVolumeSource(ls *api.LocalVolumeSource, w PrefixWriter) { ls.Path) } +func printCephFSVolumeSource(cephfs *api.CephFSVolumeSource, w PrefixWriter) { + w.Write(LEVEL_2, "Type:\tCephFS (a CephFS mount on the host that shares a pod's lifetime)\n"+ + " Monitors:\t%v\n"+ + " Path:\t%v\n"+ + " User:\t%v\n"+ + " SecretFile:\t%v\n"+ + " SecretRef:\t%v\n"+ + " ReadOnly:\t%v\n", + cephfs.Monitors, cephfs.Path, cephfs.User, cephfs.SecretFile, cephfs.SecretRef, cephfs.ReadOnly) +} + type PersistentVolumeDescriber struct { clientset.Interface } @@ -993,6 +1006,8 @@ func describePersistentVolume(pv *api.PersistentVolume, events *api.EventList) ( printScaleIOVolumeSource(pv.Spec.ScaleIO, w) case pv.Spec.Local != nil: printLocalVolumeSource(pv.Spec.Local, w) + case pv.Spec.CephFS != nil: + printCephFSVolumeSource(pv.Spec.CephFS, w) } if events != nil {