opensearch-project / opensearch-k8s-operator

OpenSearch Kubernetes Operator
Apache License 2.0
366 stars 192 forks source link

[BUG] Some OpenSearchClusterSpec names remain after renaming to opensearchCluster #756

Open ideaship opened 3 months ago

ideaship commented 3 months ago

What is the bug?

The OpenSearchClusterSpec name which was (mostly) renamed some time ago (commit fea1e20) is still present in the repo.

How can one reproduce the bug?

In the current main branch of opensearch-k8s-operator:

$ git grep -i opensearchclusterspec
.github/workflows/functional-tests.yaml:          helm install opensearch-cluster ../charts/opensearch-cluster --set OpenSearchClusterSpec.enabled=true --wait
docs/designs/crd.md:<h3 id="OpensearchClusterSPec">
docs/userguide/cluster-chart.md:For instance, if you need to change the httpPort to 9300, this can be achieved by setting `OpenSearchClusterSpec.general.httpPort` to `9300` in the [helm chart values](../../charts/opensearch-cluster/values.yaml).
docs/userguide/cluster-chart.md:OpenSearchClusterSpec:
opensearch-operator/functionaltests/execute_tests.sh:helm install opensearch-cluster ../charts/opensearch-cluster --set OpenSearchClusterSpec.enabled=true --wait

What is the expected behavior?

At least the documentation should use the current names instead of referring to names that are no longer in use. For instance, I could only get my values.yaml as described in the Configuring OpenSearch Cluster of docs/userguide/cluster-chart.md to work when I changed OpenSearchClusterSpec: to opensearchCluster:.

salyh commented 3 months ago

I would absolutely make sense to unify the naming. Thank you for your contribution.

I proposed a general naming convention in https://github.com/opensearch-project/opensearch-k8s-operator/pull/741#issuecomment-2025229856, and once we agree on this (or another one), we should adhere to it for all new CRDs, resources, etc., and give it a complete overhaul as a breaking change in the next major version.

I agree that we indeed need to fix the docs for the time being.

@ideaship Would you like to submit a PR for the docs?