-
Notifications
You must be signed in to change notification settings - Fork 117
Description
Describe the problem/challenge you have
It is difficult to look at a dataset or snapshot (i.e. zfs get all openebs-zpool/pvc-90106d50-69e1-45c3-9922-279b8110aded@snapshot-114e501d-ba43-4ac5-862e-5ce56ae85e4a) and understand how it relates to Kubernetes resources (PVC, VolumeSnapshot, namespace, etc.). Determining this is useful for streaming specific backup snapshots (zfs send) to other machines, associating ZFS metrics (such as actual usage) with Kubernetes resources, and restoring data outside of Kubernetes.
Describe the solution you'd like
I would like the CSI to add information about associated Kubernetes resources to the created ZFS datasets and snapshots as user properties. I think that this should include, at minimum:
- The associated namespace
- The associated PVC
- The associated PV (this is already in the dataset name, but putting it in the same place as other info could make filtering easier)
- The associated VolumeSnapshot (snapshots only)
- Related ZFS CRD resources (zfssnapshots, zfsvolumes, etc)
- The Kubernetes node name
Ideally labels and/or annotations for all the above would be added as well.
Anything else you would like to add:
This could be further improved in a couple of ways:
- Values could be synced from Kubernetes resource to the datasets/snapshots when they change
- Labels and annotations could be filtered via a property in the storageclass and volumesnapshot class, to allow or deny specific keys, or patterns
Environment:
- LocalPV-ZFS version: v2.6.2
- Kubernetes version (use
kubectl version): 1.32 - Kubernetes installer & version: N/A
- Cloud provider or hardware configuration: N/A
- OS (e.g. from
/etc/os-release): N/A