Skip to content

Commit

Permalink
chore(snapshot): expand upon the design for annotations when mounted …
Browse files Browse the repository at this point in the history
…a snapshot
  • Loading branch information
Niels Geuze committed May 2, 2022
1 parent dfbaf8a commit abdb065
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion design/lvm/mountable_snapshot.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,4 +188,4 @@ All testcases mentioned in [Test Plan](#test-plan) section need to be automated
## Drawbacks

- As far as I understand it, normally when creating a PersistentVolumeClaim with a snapshot as datasource it would clone the Snapshot into an actual volume, so we'd be diverging from this behaviour.
- We could use an annotation to specify the behaviour that we are implementing here so that the clone behaviour can be added at a later time?
- We could use an annotation (e.g. `local.csi.openebs.io/volume-type: mounted-snapshot`) applied to the PVC to specify the behaviour that we are implementing here. In the `CreateVolume` function of the [controller.go](../../pkg/driver/controller.go) we could then check whether this annotation is set and only then mount the snapshot. When the annotation is not set or set to `local.csi.openebs.io/volume-type: clone` the code would create a clone instead (which for now would `return nil, status.Error(codes.Unimplemented, "")`) until someone implements the logic to clone a snapshot.

0 comments on commit abdb065

Please sign in to comment.