mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-15 14:14:39 +00:00
Fix printISCSIVolumeSource to show kubectl describe properly
Fixes #51635
This commit is contained in:
@@ -835,6 +835,10 @@ func printPortworxVolumeSource(pwxVolume *api.PortworxVolumeSource, w PrefixWrit
|
||||
}
|
||||
|
||||
func printISCSIVolumeSource(iscsi *api.ISCSIVolumeSource, w PrefixWriter) {
|
||||
initiator := "<none>"
|
||||
if iscsi.InitiatorName != nil {
|
||||
initiator = *iscsi.InitiatorName
|
||||
}
|
||||
w.Write(LEVEL_2, "Type:\tISCSI (an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod)\n"+
|
||||
" TargetPortal:\t%v\n"+
|
||||
" IQN:\t%v\n"+
|
||||
@@ -845,9 +849,9 @@ func printISCSIVolumeSource(iscsi *api.ISCSIVolumeSource, w PrefixWriter) {
|
||||
" Portals:\t%v\n"+
|
||||
" DiscoveryCHAPAuth:\t%v\n"+
|
||||
" SessionCHAPAuth:\t%v\n"+
|
||||
" SecretRef:\t%v\n",
|
||||
" SecretRef:\t%v\n"+
|
||||
" InitiatorName:\t%v\n",
|
||||
iscsi.TargetPortal, iscsi.IQN, iscsi.Lun, iscsi.ISCSIInterface, iscsi.FSType, iscsi.ReadOnly, iscsi.Portals, iscsi.DiscoveryCHAPAuth, iscsi.SessionCHAPAuth, iscsi.SecretRef, iscsi.InitiatorName)
|
||||
iscsi.TargetPortal, iscsi.IQN, iscsi.Lun, iscsi.ISCSIInterface, iscsi.FSType, iscsi.ReadOnly, iscsi.Portals, iscsi.DiscoveryCHAPAuth, iscsi.SessionCHAPAuth, iscsi.SecretRef, initiator)
|
||||
}
|
||||
|
||||
func printGlusterfsVolumeSource(glusterfs *api.GlusterfsVolumeSource, w PrefixWriter) {
|
||||
|
Reference in New Issue
Block a user