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.

longhorn 6710

Signed-off-by: Shuo Wu <[email protected]>
  • Loading branch information
shuo-wu committed Oct 7, 2024
1 parent 8693e0c commit 8ac8577
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 8ac8577

Please sign in to comment.