-
Notifications
You must be signed in to change notification settings - Fork 102
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
Comments
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 |
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. |
Not stale! |
I am also very interested in this feature. |
Likewise interested. I'd like to attach the name of my kubernetes cluster to volumes to distinguish which one they belong to. |
Also interested! |
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. |
Not stale! |
I'd love this feature, too. |
+1 for this feature |
+1 |
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 Kubernetes uses a tool called We could additional define a prefix like |
This comment was marked as off-topic.
This comment was marked as off-topic.
+1, we need this please. |
I'd love this feature, too. |
|
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 |
I've had a look at the source code and this actually seems a fairly simple thing to do. Happy to raise a PR if it's likely to be accepted by the Hetzner folk. There are two, mutually-exclusive, places where this could be done - at volume creation or volume attach. My thought is to do it when the volume is attached, mainly so that the labels are added to volumes that have been created with a previous version of the CSI without this support. Thoughts? Also, what labels would be applied? My thinking is to add any labels that are present on the |
I think that sounds completly right and we need this :D |
@Masegi I finish for the year on Tuesday - I'll have a bash next week |
I've had a bit of a look at this today and it's going to be a bit more awkward than first thought. The Hetzner side is fairly easy, but the container-storage-interface doesn't receive anything about the PVC's name or namespace. I'll have a look at how other CSI drivers do it and take my lead from them. |
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.The text was updated successfully, but these errors were encountered: