Skip to content

Commit

Permalink
fix: disable clone for v2 volume
Browse files Browse the repository at this point in the history
Remove this once v2 volume clone #9106 is implemented.

Signed-off-by: Shuo Wu <shuo.wu@suse.com>
  • Loading branch information
shuo-wu authored and derekbit committed Oct 8, 2024
1 parent 53aec34 commit a3dbb45
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions webhook/resources/volume/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ func (v *volumeValidator) Create(request *admission.Request, newObj runtime.Obje
if volume.Spec.BackingImage != "" {
return werror.NewInvalidError("backing image is not supported for data engine v2", "")
}
if types.IsDataFromVolume(volume.Spec.DataSource) {
return werror.NewInvalidError("clone is not supported for data engine v2", "")
}
}

return nil
Expand Down

0 comments on commit a3dbb45

Please sign in to comment.