mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-15 22:20:51 +00:00
Add Validate in addition to ValidateUpdate to validation for most resources.
This commit is contained in:
@@ -65,7 +65,8 @@ func (persistentvolumeStrategy) PrepareForUpdate(obj, old runtime.Object) {
|
||||
}
|
||||
|
||||
func (persistentvolumeStrategy) ValidateUpdate(ctx api.Context, obj, old runtime.Object) fielderrors.ValidationErrorList {
|
||||
return validation.ValidatePersistentVolumeUpdate(obj.(*api.PersistentVolume), old.(*api.PersistentVolume))
|
||||
errorList := validation.ValidatePersistentVolume(obj.(*api.PersistentVolume))
|
||||
return append(errorList, validation.ValidatePersistentVolumeUpdate(obj.(*api.PersistentVolume), old.(*api.PersistentVolume))...)
|
||||
}
|
||||
|
||||
type persistentvolumeStatusStrategy struct {
|
||||
|
Reference in New Issue
Block a user