@@ -18,7 +18,8 @@ We want to make RBD image name generation more deterministic, so that in catastr
1818situations, we can derive the PVC name from rbd image name/metadata and allow customer
1919the following options:
2020- Backup RBD volume data for specific customers and hand them their copy before deleting
21- the RBD volume.
21+ the RBD volume. Without knowing from rbd image , which customers they belong to we
22+ cannot do this.
2223- Create PV with the given RBD name and pre-bind it to the desired PVC so that customer
2324 can get its data back.
2425
@@ -29,11 +30,10 @@ was no way to restore customer data. This proposal aims to store pvc name as met
2930RBD image name so that in catostrophic scenarios, the mapping can be restored by just looking
3031at the RBD's.
3132
32- ## Implementation
33+ ## Proposal
3334
3435### Implementation Detail
3536
36-
3737#### Current Implementation
3838
3939``` go
@@ -58,14 +58,23 @@ func (r *rbdVolumeProvisioner) Provision() (*v1.PersistentVolume, error) {
5858
5959 // create RBD Image name
6060 image := fmt.Sprintf (" kubernetes-dynamic-pvc-%s " , uuid.NewUUID ())
61+
62+ // Create a base64 encoding of the PVC Name
6163 rbdImageName := b64.StdEncoding .EncodeToString ([]byte (r.options .PVC .Name ))
64+
65+ // Append the base64 encoding to the string `kubernetes-dynamic-pvc-`
6266 rbdImageName = fmt.Sprintf (" kubernetes-dynamic-pvc-%s " , rbdImageName)
6367 r.rbdMounter .Image = rbdImageName
6468` ` `
6569
6670#### API Changes
6771There are no API changes needed for this work
6872
73+ ## Alternative Proposals
74+ - Append the fully qualified PVC name(namespace-pvcname) to the string
75+ - This exposes the customer name directly to Ceph Admins
76+ - Use SHA1 hash for rbd names
77+ - The hashes are one way so we cant use them to get back the pvc name
6978
7079### Misc
7180- Document how Pre-Binding of PV to PVC works in dynamic provisioning
0 commit comments