nutanix / helm

Nutanix Helm Charts repository
https://nutanix.github.io/helm/
MIT License
17 stars 30 forks source link

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

Open rockwyc992 opened 1 year ago

rockwyc992 commented 1 year ago

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

subodh01 commented 1 year ago

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

rockwyc992 commented 1 year ago

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.

subodh01 commented 1 year ago

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

tuxtof commented 1 year ago

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 ?

rockwyc992 commented 1 year ago

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.

tuxtof commented 1 year ago

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