-
Notifications
You must be signed in to change notification settings - Fork 159
add current PD description as disk labels #1064
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
Comments
Thanks for the issue, this has been on our backlog and I appreciate the ping to bump up its priority. |
Thank for your quick answer, can you give me a link to your card in backlog ? |
(sorry for the delay, this got buried) We have an internal bug list at Google, it's not public, sorry. |
Can the custom labels applied to a PVC be propagated to the PD? In my use case, I am creating a PVC dynamically for a pod with a custom label for that execution. However, the custom label never gets applied to the PV or PD. The description of the PD has bunch of details including the PVC & PV name and the fix for this issue will help to have additional labels in the PD. But, it will be great to have any custom label applied to PVC be applied to the PV-PD during dynamic provisioning. Could you please review? |
Propagating PVC labels is surprisingly complex, as it would cross the k8s-csi API boundary. At first glance it would require us creating a new PD specific controller to watch for PVC mutations and update PD labels. Hence I think it's infeasible unless we have a large volumes of requests for this. |
@mattcary thank you for your quick reply. The PD description is able to capture the PVC name, the PV name, the PVC namespace, etc. Which means, if I am not wrong, that the PD probably also has any labels from PVC at the time of creation. Wouldn’t it be possible to capture the PVC labels in the PD description with other existing details and then with this original issue fix apply it to the PD labels at the time of creation? Please let me know |
See https://github.com/kubernetes-csi/external-provisioner/blob/master/pkg/controller/controller.go#L624 for details of how the create volume request is made; note this controller is not GCE PD-specific. |
I see that the logic at this line is probably adding the request parameters that finally go into the PD description, This logic is using meta functions GetName and GetNamespace and there is GetLabels meta function that can be added to the request parameter to add labels to the PD description and eventually add to the PD labels from the description? Also, in my understanding, when I create PVC with labels, the labels will be part of ObjectMeta Do you see it possible? Please let me know |
Note all of those references are in the external-provisioner, which is a general CSI service that's not PD specific. So any changes made there would affect all CSI drivers, not just PDCSI. We'd have to make sure that any changes made sense for all drivers. It might be best to start a discussion on that external-provisioner repo; if there was a general mechanism for having annotations appear as volume parameters then PD CSI could take advantage of it. |
I have created an issue under the external-provisioner repo, |
Thanks! |
/reopen (the original question of the pd description appearing as labels is still open & being worked on, sorry for the confusion). |
/reopen |
Hi, Thanks for your reply. |
Hi,
Currently i have persistent disk created from a persitentVolumeClaims (GKE) and i want to monitor disks performance.
I need to filter disks by (pvc name, namespace) but this informations is store in disk description and i'm not able to use this fied in Cloud monitoring 😞 .
Is it possible to add this information as disks labels in addition to description ?
Regards,
Gaetan
The text was updated successfully, but these errors were encountered: