helm icon indicating copy to clipboard operation
helm copied to clipboard

Add some parameters to change `volumeNamePrefix` with `csi-external-provisioner`

Open rockwyc992 opened this issue 3 years ago • 6 comments

Are there any method to change volumeNamePrefix for the new PV Name ? If there would be multiple Nutanix Volume to use, every PV Name are same with the prefix pvc- by default.

Maybe adding some args for csi-external-provisioner is a good idea. like below: https://github.com/nutanix/helm/blob/master/charts/nutanix-csi-storage/templates/ntnx-csi-controller-deployment.yaml#L44

And the default parameter to use for volumeNamePrefix like below: https://github.com/nutanix/csi-external-provisioner/blob/master/cmd/csi-provisioner/csi-provisioner.go#L62 https://github.com/nutanix/csi-external-provisioner/blob/master/pkg/controller/controller.go#L558

rockwyc992 avatar Nov 24 '22 17:11 rockwyc992

The volumeNamePrefix argument is not that useful. If you change the prefix from "pvc-" to let's say "abc-", then the name of all PVs will have "abc-" as prefix.

-Subodh

subodh01 avatar Nov 24 '22 20:11 subodh01

Yes, that would be the function I want to do.

If I have 2 Nutanix Volume, then it would have different prefix as sparate, like nutainix-boston- and nutanix-tokyo-. When I use kubectl get pv, I could easy to know which PV is used for the corresponding Nutanix Cluster.

On the other hand, If I have multiple k8s cluster to share with same Nutanix Volume, it would be named as PV Name, like pvc-, in the Prism console. So that I could use different prefix, like k8s-prod and k8s-dr, to declare that VolumeGroup, whose name is automatically generated with csi-external-provision, is used for which k8s cluster.

Like above, volumeNamePrefix parameter is very useful for these situation as management resons.

rockwyc992 avatar Nov 26 '22 08:11 rockwyc992

Okay, this is a valid use case. We can expose volumeNamePrefix customization via helm chart. @tuxtof

subodh01 avatar Nov 26 '22 18:11 subodh01

Hi @rockwyc992 we have the field Description who allow to add some info in the VG to identify your cluster for exemple did you test it ?

tuxtof avatar Nov 27 '22 18:11 tuxtof

Hi @rockwyc992 we have the field Description who allow to add some info in the VG to identify your cluster for exemple did you test it ?

Yes, I use that field to identify which volume is belong to corresponding kubernetes cluster.

But this is not easy to search and maintain. With this situation, I must to click and open every volume in the Prism console to identify.

rockwyc992 avatar Feb 08 '23 09:02 rockwyc992

i know and i agree there is plan to add dedicated category in the futur

tuxtof avatar Feb 08 '23 10:02 tuxtof