@@ -243,50 +243,50 @@ func createPersistentVolumeInfo() generator.FamilyGenerator {
243
243
)
244
244
245
245
switch {
246
- case p .Spec .PersistentVolumeSource . GCEPersistentDisk != nil :
247
- gcePDDiskName = p .Spec .PersistentVolumeSource . GCEPersistentDisk .PDName
248
- case p .Spec .PersistentVolumeSource . AWSElasticBlockStore != nil :
249
- ebsVolumeID = p .Spec .PersistentVolumeSource . AWSElasticBlockStore .VolumeID
250
- case p .Spec .PersistentVolumeSource . AzureDisk != nil :
251
- azureDiskName = p .Spec .PersistentVolumeSource . AzureDisk .DiskName
252
- case p .Spec .PersistentVolumeSource . FC != nil :
253
- if p .Spec .PersistentVolumeSource . FC .Lun != nil {
254
- fcLun = strconv .FormatInt (int64 (* p .Spec .PersistentVolumeSource . FC .Lun ), 10 )
246
+ case p .Spec .GCEPersistentDisk != nil :
247
+ gcePDDiskName = p .Spec .GCEPersistentDisk .PDName
248
+ case p .Spec .AWSElasticBlockStore != nil :
249
+ ebsVolumeID = p .Spec .AWSElasticBlockStore .VolumeID
250
+ case p .Spec .AzureDisk != nil :
251
+ azureDiskName = p .Spec .AzureDisk .DiskName
252
+ case p .Spec .FC != nil :
253
+ if p .Spec .FC .Lun != nil {
254
+ fcLun = strconv .FormatInt (int64 (* p .Spec .FC .Lun ), 10 )
255
255
}
256
- for _ , wwn := range p .Spec .PersistentVolumeSource . FC .TargetWWNs {
256
+ for _ , wwn := range p .Spec .FC .TargetWWNs {
257
257
if len (fcTargetWWNs ) != 0 {
258
258
fcTargetWWNs += ","
259
259
}
260
260
fcTargetWWNs += wwn
261
261
}
262
- for _ , wwid := range p .Spec .PersistentVolumeSource . FC .WWIDs {
262
+ for _ , wwid := range p .Spec .FC .WWIDs {
263
263
if len (fcWWIDs ) != 0 {
264
264
fcWWIDs += ","
265
265
}
266
266
fcWWIDs += wwid
267
267
}
268
- case p .Spec .PersistentVolumeSource . ISCSI != nil :
269
- iscsiTargetPortal = p .Spec .PersistentVolumeSource . ISCSI .TargetPortal
270
- iscsiIQN = p .Spec .PersistentVolumeSource . ISCSI .IQN
271
- iscsiLun = strconv .FormatInt (int64 (p .Spec .PersistentVolumeSource . ISCSI .Lun ), 10 )
272
- if p .Spec .PersistentVolumeSource . ISCSI .InitiatorName != nil {
273
- iscsiInitiatorName = * p .Spec .PersistentVolumeSource . ISCSI .InitiatorName
268
+ case p .Spec .ISCSI != nil :
269
+ iscsiTargetPortal = p .Spec .ISCSI .TargetPortal
270
+ iscsiIQN = p .Spec .ISCSI .IQN
271
+ iscsiLun = strconv .FormatInt (int64 (p .Spec .ISCSI .Lun ), 10 )
272
+ if p .Spec .ISCSI .InitiatorName != nil {
273
+ iscsiInitiatorName = * p .Spec .ISCSI .InitiatorName
274
274
}
275
- case p .Spec .PersistentVolumeSource . NFS != nil :
276
- nfsServer = p .Spec .PersistentVolumeSource . NFS .Server
277
- nfsPath = p .Spec .PersistentVolumeSource . NFS .Path
278
- case p .Spec .PersistentVolumeSource . CSI != nil :
279
- csiDriver = p .Spec .PersistentVolumeSource . CSI .Driver
280
- csiVolumeHandle = p .Spec .PersistentVolumeSource . CSI .VolumeHandle
281
- case p .Spec .PersistentVolumeSource . Local != nil :
282
- localPath = p .Spec .PersistentVolumeSource . Local .Path
283
- if p .Spec .PersistentVolumeSource . Local .FSType != nil {
284
- localFS = * p .Spec .PersistentVolumeSource . Local .FSType
275
+ case p .Spec .NFS != nil :
276
+ nfsServer = p .Spec .NFS .Server
277
+ nfsPath = p .Spec .NFS .Path
278
+ case p .Spec .CSI != nil :
279
+ csiDriver = p .Spec .CSI .Driver
280
+ csiVolumeHandle = p .Spec .CSI .VolumeHandle
281
+ case p .Spec .Local != nil :
282
+ localPath = p .Spec .Local .Path
283
+ if p .Spec .Local .FSType != nil {
284
+ localFS = * p .Spec .Local .FSType
285
285
}
286
- case p .Spec .PersistentVolumeSource . HostPath != nil :
287
- hostPath = p .Spec .PersistentVolumeSource . HostPath .Path
288
- if p .Spec .PersistentVolumeSource . HostPath .Type != nil {
289
- hostPathType = string (* p .Spec .PersistentVolumeSource . HostPath .Type )
286
+ case p .Spec .HostPath != nil :
287
+ hostPath = p .Spec .HostPath .Path
288
+ if p .Spec .HostPath .Type != nil {
289
+ hostPathType = string (* p .Spec .HostPath .Type )
290
290
}
291
291
}
292
292
@@ -430,7 +430,7 @@ func createPersistentVolumeCSIAttributes() generator.FamilyGenerator {
430
430
}
431
431
432
432
var csiMounter , csiMapOptions string
433
- for k , v := range p .Spec .PersistentVolumeSource . CSI .VolumeAttributes {
433
+ for k , v := range p .Spec .CSI .VolumeAttributes {
434
434
// storage attributes handled by external CEPH CSI driver
435
435
if k == "mapOptions" {
436
436
csiMapOptions = v
0 commit comments