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

Feature: Add labels/metadata to created volumes on hetzner cloud #316

Open
micw opened this issue Sep 22, 2022 · 17 comments
Open

Feature: Add labels/metadata to created volumes on hetzner cloud #316

micw opened this issue Sep 22, 2022 · 17 comments
Labels
enhancement New feature or request pinned

Comments

@micw
Copy link

micw commented Sep 22, 2022

Currently, volumes are created with the pv name, so the only information about a volume is the name (pvc-{$UUID}), the size, and the creation date. To manage a larger number of volumes, it would be very good if additional labels could be added to the hcloud volume. E.g. the claim name, the namespace and annotations of the original PVC could be added as labels to the volume created in hetzner cloud.

@captnCC
Copy link

captnCC commented Oct 25, 2022

Additionally support for custom preset labels would be a huge helper. This could help be greater helper to identify resources in a automated environment via the hcloud cli!

@apricote apricote added the enhancement New feature or request label Dec 15, 2022
@github-actions
Copy link

This issue has been marked as stale because it has not had recent activity. The bot will close the issue if no further action occurs.

@github-actions github-actions bot added the Stale label Mar 15, 2023
@micw
Copy link
Author

micw commented Mar 15, 2023

Not stale!

@apricote apricote removed the Stale label Mar 15, 2023
@schmidp
Copy link

schmidp commented May 13, 2023

I am also very interested in this feature.

@aki-ks
Copy link

aki-ks commented May 17, 2023

Likewise interested. I'd like to attach the name of my kubernetes cluster to volumes to distinguish which one they belong to.

@kayiplar
Copy link

Also interested!

@github-actions
Copy link

This issue has been marked as stale because it has not had recent activity. The bot will close the issue if no further action occurs.

@github-actions github-actions bot added the Stale label Oct 28, 2023
@micw
Copy link
Author

micw commented Oct 28, 2023

Not stale!

@github-actions github-actions bot removed the Stale label Oct 29, 2023
@jr-dimedis
Copy link

I'd love this feature, too.

@nicolai0
Copy link

+1 for this feature

@platdesign
Copy link

+1

@apricote
Copy link
Member

Some thoughts:

This is a generic csi-driver that must be compatible with other tools besides Kubernetes, accessing the Kubernetes API to get more information is out of the question.

The CreateVolume gRPC call does not include "Labels" or similar that we could directly pass through. What it makes available are map<string, string> parameters. In Kubernetes these are the options you configure in StorageClass.parameters.

Kubernetes uses a tool called external-provisioner to call CreateVolume when new PVs are created. It has a flag --extra-create-metadata, if this is active we will receive parameters for the PVC Name & Namespace and PV Name. While these are Kubernetes-specific parameters, I think we can still convert them into Volume Labels.

We could additional define a prefix like labels.csi.hetzner.cloud for parameters, such that a parameter labels.csi.hetzner.cloud/foo: bar would result in the label foo=bar on the Hetzner Cloud Volume. This could be used by any Container Orchestrator. In Kubernetes this would enable setting different labels per StorageClass, so you could for example add the name of the Cluster in there.

This comment was marked as off-topic.

@github-actions github-actions bot added the Stale label Apr 18, 2024
@Masegi
Copy link

Masegi commented Apr 18, 2024

+1, we need this please.

@apricote apricote added pinned and removed Stale labels Apr 22, 2024
@niklasweimann
Copy link

I'd love this feature, too.

@TimoGoetze
Copy link

  • one more :-)

@rwojsznis
Copy link

I'm glad to find that somebody thought about it 2 years before I ran into same problem; I recently pruned a volume by accident as I was sure it was dangling one from some experiment just to find out it actually belonged to a still used (kinda forgotten, but very much needed) cronjob - which obviously started to fail after I deleted it's volume outside of k8s :badpokerface:

having labels where you could specify cluster name and volume name among other human-readable stuff would be lovely <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pinned
Projects
None yet
Development

No branches or pull requests