opensearch-k8s-operator icon indicating copy to clipboard operation
opensearch-k8s-operator copied to clipboard

[PROPOSAL] Add namespace field to opensearch-operator Helm chart values

Open nilushancosta opened this issue 10 months ago • 2 comments

What/Why

What are you proposing?

Add a namespace field to the opensearch-operator Helm chart values

What users have asked for this feature?

I faced an issue when using the opensearch-operator chart as a dependency (see below). Since it's a common usecase, I think it will help other users also

What problems are you trying to solve?

There can be situations where a user creates a Helm chart with multiple dependent Helm charts (with opensearch-operator being one dependency). The user may wish install the dependencies in different namespaces. E.g. dependent-chart1 in foo namespace and opensearch-operator in bar namespace.

Chart.yaml

dependencies:
- name: dependent-chart1
  version: 1.2.3
  repository: https://example.com/helm
- name: opensearch-operator
  version: 2.5.1
  repository: https://opensearch-project.github.io/opensearch-k8s-operator/

However Helm does not support it at the moment - Refer discussion in https://github.com/helm/helm/issues/5358 Therefore some Helm charts include a namespace field in the values file to solve it. E.g. - https://github.com/cert-manager/cert-manager/blob/a9166a8af4cbd53232b0d93b73621b5b74e3cd0e/deploy/charts/cert-manager/values.yaml#L164

What is the developer experience going to be?

No impact to any APIs. So developer experience is unaffected

Are there any security considerations?

No

Are there any breaking changes to the API

No

What is the user experience going to be?

Users will be able to utilize a new optional field in the Helm values file to specify the namespace to install opensearch-operator resources

namespace: ""

Are there breaking changes to the User Experience?

No. namespace will be empty by default. Then the Helm chart will continue to use .Release.Namespace to decide where to install resources

Why should it be built? Any reason not to?

When opensearch-operator chart is installed as a dependency, this feature helps to install it in a separate namespace

What will it take to execute?

This will require changes to the helm templates

Any remaining open questions?

No

nilushancosta avatar Apr 21 '24 19:04 nilushancosta

If this proposal sounds good, I would like to implement it

nilushancosta avatar Apr 21 '24 19:04 nilushancosta

Hi @nilushancosta. Not sure if this is such a big usecase and I would honestly rather recommend working with something like helmfile or FluxCD/ArgoCD to deploy multiple charts. But as long as you want to implement this and it can be done in a way that the default behaviour does not change, why not.

@prudhvigodithi @salyh Your thoughts?

swoehrl-mw avatar Apr 22 '24 10:04 swoehrl-mw