code: func ValidatePersistentVolumeUpdate(newPv, oldPv *core.PersistentVolume) field.ErrorList {
  	allErrs := field.ErrorList{}
  	allErrs = ValidatePersistentVolume(newPv)
  
  	// PersistentVolumeSource should be immutable after creation.
  	if !apiequality.Semantic.DeepEqual(newPv.Spec.PersistentVolumeSource, oldPv.Spec.PersistentVolumeSource) {
  		allErrs = append(allErrs, field.Forbidden(field.NewPath("spec", "persistentvolumesource"), "is immutable after creation"))
  	}
  	newPv.Status = oldPv.Status
  
  	allErrs = append(allErrs, ValidateImmutableField(newPv.Spec.VolumeMode, oldPv.Spec.VolumeMode, field.NewPath("volumeMode"))...)
  
  	// Allow setting NodeAffinity if oldPv NodeAffinity was not set
  	if oldPv.Spec.NodeAffinity != nil {
  		allErrs = append(allErrs, ValidateImmutableField(newPv.Spec.NodeAffinity, oldPv.Spec.NodeAffinity, field.NewPath("nodeAffinity"))...)
  	}
  
  	return allErrs
  }
docs: // ValidatePersistentVolumeUpdate tests to see if the update is legal for an end user to make.
  // newPv is updated with fields that cannot be changed.