Question: how to customize the zfs/nfs generated dataset name to include namespace+ pvc name?
See original GitHub issueQ:
- is there a way to configure the name of the created zfs dataset name (and derived nfs share) to include the namespace/pvc related name?
- if so why. democratic-csi is installed via Helm
Currently the name of the zfs volume is"pvc-<pv uuid>"
I know it is possible to change the static prefix “pvc-” by some static string
I would like to have the dataset name to be "<namespace>-<pvc name>-<uuid>"
(of course truncated to the max possible length)
Current config:
- Truenas v13.0-U3
- OpenShift v4.11 (k8s v1.24.6)
- democratic-csi image v1.7, csi-provisioner v3.1.0…
Issue Analytics
- State:
- Created 10 months ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Unable to bind PVC · Issue #6 · democratic-csi ... - GitHub
k get sc test-csi NAME PROVISIONER RECLAIMPOLICY ... This fails to create the dataset. pvc is created but waiting for volume to be...
Read more >Creating the persistent volume claims (PVC) using storage ...
Create a file for configuring the persistent volume claim, iccsap-instance-pvc. ... metadata: name: iccsap-instance-pvc namespace: <NAMESPACE> spec: ...
Read more >Using TrueNAS to provide persistent storage for Kubernetes
I've got various things on my TrueNAS box so under hdd I created a dataset k8s . I wanted to provide both iSCSI...
Read more >Learn how to recreate an existing PVC in a new namespace ...
NOTE: The CLI will show the name of the PVC bound to the PV. Use Case. I was working on a ticket to...
Read more >Persistent Volumes | Kubernetes
When none of the static PVs the administrator created match a user's ... kubectl describe pvc hostpath Name: hostpath Namespace: default ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yeah, iscsi has different limits for sizes etc (none of which are directly impacted by csi limits) making it less of an issue. In that case I use zfs props to store all that info as a quasi database, but I need to know the exact volume/dataset before I can get the props.
Regarding the volumeidfromname code, that works but the other methods which pass the id around don’t pass in the same parameters so I can’t deconstruct it 😦 the id must be the dataset name by my own convention (due to not having any kind of database).
I’m happy to leave this open. I would even be open to perhaps an entirely new ‘driver’ being introduced in the codebase which could meet your needs. I’m also open to introducing a soft delete to the existing drivers (although that normally would just be setting retain on storage class).
Also if it’s easier you can hit me up on slack/discord/whatever to have a more thorough discussion!
Thanks for your answer
I naively thought that generating a
volume_id
based onshorten(pvc_namespace+pvc_name+name)
in theCreateVolume
method executed when the volume is created would do the trick as this isvolume_id
that is received with the other lifecycle calls (egDeleteVolume
) by the CSI engine after the volume is created. There is already adriver.getVolumeIdFromName
method that take care of generating a volume_id:https://github.com/democratic-csi/democratic-csi/blob/7233bde497271c6a5bac13e757103313ef442359/src/driver/freenas/api.js#L2180
Also the
iscsi
implementation do that via theiscsi.nameTemplate
parameter that dynamically sets the name of the iSCSI extents/target/zvol in TrueNASAnyway, thanks for your answer.
I’ll close soon this issue except if you want to keep it as a feature request…
I’m currently evaluating the possibility to create on my side a very specialized TrueNAS v13+/k8s v1.23+/Filesystem only/NFS CSI driver with this feature and some others from my current non-CSI provisionner: nfs-subdir-external-provisioner (like the possibility to ‘archive’ -ie rename instead of delete- the dataset when deleted)