address review comments for rwx volume types

This commit is contained in:
Hemant Kumar 2022-03-24 12:58:16 -04:00
parent ed217f4140
commit 1809094389
2 changed files with 4 additions and 2 deletions

View File

@ -281,7 +281,8 @@ type attachedVolume struct {
// for this volume and volume expansion on this node should not be retried
volumeInUseErrorForExpansion bool
// persistentVolumeSize records size of the volume when pod was started.
// persistentVolumeSize records size of the volume when pod was started or
// size after successful completion of volume expansion operation.
persistentVolumeSize *resource.Quantity
}

View File

@ -296,7 +296,8 @@ func (dsw *desiredStateOfWorld) AddPodToVolume(
if volumeSpec.PersistentVolume != nil {
pvCap := volumeSpec.PersistentVolume.Spec.Capacity.Storage()
if pvCap != nil {
vmt.persistentVolumeSize = pvCap
pvCapCopy := pvCap.DeepCopy()
vmt.persistentVolumeSize = &pvCapCopy
}
}