Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support to dynamic value in values.yaml #661

Open
idolaman opened this issue Nov 28, 2023 · 2 comments
Open

Adding support to dynamic value in values.yaml #661

idolaman opened this issue Nov 28, 2023 · 2 comments
Labels
enhancement New feature or request helm

Comments

@idolaman
Copy link

First of all this project is amazing!

I encountered an issue when i tried to use this chart as an dependency to my chart.

in my use case i want to be able to give a dynamic value in values yaml.
for an example i want that the configmap name to be dynamic because i want to deploy multiple solr cluters in the same k8s envirement.
my chart values.yaml

global:
  configmap: idolaman

solr:
  podOptions:
    volumes:
      - name: my-configmap
        source:
          configMap:
            name: "{{ .Values.global.configmap }}"
         
...

my Chart.yaml

name: idolaman-solr
dependencies:
  - name: solr
    ....

an solution might be change the solr chart to evaluate using tpl every value it gets

@HoustonPutman HoustonPutman added enhancement New feature or request helm labels Nov 28, 2023
@HoustonPutman
Copy link
Contributor

Is this common for other Helm charts?

I understand how it could be useful, but it would add a lot of complexity to the already fairly complex helm chart.

@almogtavor
Copy link

@HoustonPutman I also think that it would be nice and actually I think it's quite common. I've found this article that helps with this issue. In this example, the tpl function is used in the Helm chart templates to allow for dynamic referencing of values. Useful for scenarios where you want to deploy multiple instances of an application (like multiple Solr clusters).

This example aligns with this scenario where we want to dynamically set the configmap name for deploying multiple Solr clusters.

To show the need for the feature in general I'm referring you to a SO question the requests the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request helm
Projects
None yet
Development

No branches or pull requests

3 participants