Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for setting user properties on both datasets and snapshots #625

Open
solidDoWant opened this issue Feb 7, 2025 · 1 comment

Comments

@solidDoWant
Copy link

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
@Abhinandan-Purkait
Copy link
Member

Yeah, that sounds to be useful. @solidDoWant Are you interested in contributing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants