charts icon indicating copy to clipboard operation
charts copied to clipboard

Support the namespace as a value parameter

Open justinmchase opened this issue 4 years ago • 4 comments

I am using keda as a dependency of my main chart and helm does not support specifying namespaces for dependencies. As a result keda is installing into the wrong namespace.

Use-Case

# ./example/Chart.yaml
dependencies:
- name: keda
  version: "2.4.0"
  repository: https://kedacore.github.io/charts
helm install example ./example --namespace example 

Specification

  • [ ] Keda still installs into the "keda" namespace
  • [ ] I can optionally specify a different namespace for keda to install to

Additional Info

To provide a value, such as a namespace, to a dependency I believe that your values.yaml file should define a field called namespace: keda.

Then throughout the resources in your chart you would use:

metadata:
  namespace: {{ .Values.namespace }}

Then it would always go to the keda namespace and if I wanted it to go to a different namespace then I would run:

helm install example ./example --set keda.namesapce=whatever

justinmchase avatar Nov 14 '21 13:11 justinmchase

I think this is a valuable ask, but we should still support not specifying that and just using the release namespace if namespace is not specified as a parameter.

Are you open to contributing this? If so, I would suggest to just introduce namespace as a root value.

tomkerkhove avatar Nov 16 '21 07:11 tomkerkhove

PS: We are always happy to list end-users on our website if it's being used in production

tomkerkhove avatar Nov 16 '21 07:11 tomkerkhove

I'll give it a go, just wanted to gauge your openness level first.

justinmchase avatar Nov 16 '21 14:11 justinmchase

We are definitely open for it, thanks a ton!

tomkerkhove avatar Nov 16 '21 14:11 tomkerkhove