bug: Remove duplicate storage resources update validations

Signed-off-by: Gavin Lam <gavin.oss@tutamail.com>
This commit is contained in:
Gavin Lam
2025-06-26 00:29:51 -04:00
parent b3e438aef9
commit ba46831c87
3 changed files with 3 additions and 6 deletions

View File

@@ -122,8 +122,7 @@ func (persistentvolumeclaimStrategy) ValidateUpdate(ctx context.Context, obj, ol
newPvc := obj.(*api.PersistentVolumeClaim)
oldPvc := old.(*api.PersistentVolumeClaim)
opts := validation.ValidationOptionsForPersistentVolumeClaim(newPvc, oldPvc)
errorList := validation.ValidatePersistentVolumeClaim(newPvc, opts)
return append(errorList, validation.ValidatePersistentVolumeClaimUpdate(newPvc, oldPvc, opts)...)
return validation.ValidatePersistentVolumeClaimUpdate(newPvc, oldPvc, opts)
}
// WarningsOnUpdate returns warnings for the given update.

View File

@@ -99,8 +99,7 @@ func (volumeAttachmentStrategy) PrepareForUpdate(ctx context.Context, obj, old r
func (volumeAttachmentStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList {
newVolumeAttachmentObj := obj.(*storage.VolumeAttachment)
oldVolumeAttachmentObj := old.(*storage.VolumeAttachment)
errorList := validation.ValidateVolumeAttachment(newVolumeAttachmentObj)
return append(errorList, validation.ValidateVolumeAttachmentUpdate(newVolumeAttachmentObj, oldVolumeAttachmentObj)...)
return validation.ValidateVolumeAttachmentUpdate(newVolumeAttachmentObj, oldVolumeAttachmentObj)
}
// WarningsOnUpdate returns warnings for the given update.

View File

@@ -68,8 +68,7 @@ func (volumeAttributesClassStrategy) PrepareForUpdate(ctx context.Context, obj,
}
func (volumeAttributesClassStrategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList {
errorList := validation.ValidateVolumeAttributesClass(obj.(*storage.VolumeAttributesClass))
return append(errorList, validation.ValidateVolumeAttributesClassUpdate(obj.(*storage.VolumeAttributesClass), old.(*storage.VolumeAttributesClass))...)
return validation.ValidateVolumeAttributesClassUpdate(obj.(*storage.VolumeAttributesClass), old.(*storage.VolumeAttributesClass))
}
// WarningsOnUpdate returns warnings for the given update.