Skip to content

Commit abdb065

Browse files
author
Niels Geuze
committed
chore(snapshot): expand upon the design for annotations when mounted a snapshot
1 parent dfbaf8a commit abdb065

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

design/lvm/mountable_snapshot.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,4 +188,4 @@ All testcases mentioned in [Test Plan](#test-plan) section need to be automated
188188
## Drawbacks
189189

190190
- 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.
191-
- 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?
191+
- 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 commit comments

Comments
 (0)