opensearch-project / helm-charts

:wheel_of_dharma: A community repository for Helm Charts of OpenSearch Project.
https://opensearch.org/docs/latest/opensearch/install/helm/
Apache License 2.0
171 stars 230 forks source link

[Enhancement][opensearch] allow change the volumeClaimTemplate name #339

Open retoo opened 2 years ago

retoo commented 2 years ago

Is your feature request related to a problem? Please describe. The current volumeClaimTemplate name is rather long, currently the name opensearch.unamebeing used. The problem is, that this leads to really long PVC names, i.e. if your clusterName is opensearch-testthen your volumeClaimTemplatewill be opensearch-test-master which leads to the pvc name opensearch-test-master-opensearch-test-master-0

Describe the solution you'd like The name itself probably cannot be changed without breaking old installations. Therefore we should make the name itself configurable.

smlx commented 2 years ago

Could you explain a bit why the current naming scheme is causing problems for you?

retoo commented 2 years ago

It just creates super long PVC names. Lets say I name my cluster opensearch-myapp-integration, this leads to both the claim-template and the statefulset to be called: opensearch-myapp-integration-master (the groupname mastergets appended).

When a statefulset scales up, it looks for a claim named: $CLAIM_TEMPLATE_NAME-$STATEFULSET_NAME-{0..N}

Meaning, it will create a PVC named: opensearch-myapp-integration-master-opensearch-myapp-integration-master-0 which is both ridiculous long (74 chars) ;)

The claimTemplate name just need to be unique within one statefulset, other vendors name the template data, which for example would lead to data-$CLUSTER_NAME-master-0.

Unfortunately it is not possible to change the pvc name now, it probably would break old setup, hence the override for people like me with long names ;).

tldr Ugly long names, possible break k8s identifier limit.

TheAlgo commented 1 year ago

If this is something which is really impacting users of the chart, then I don't have any strong opinions for this change. We can keep the default value and give a facility for configuring it.

cpockrandt commented 12 months ago

I agree, the PVC names are very long, which causes them to be truncated in our monitoring/logging dashboards. A way to overwrite the names would be very helpful in my opinion.