<p>I am new to helm charts and I am trying to pass some environment variables to schema-registry </p>

<p>Values.yaml </p>

<pre><code>replicaCount: 1

image:
  repository: confluentinc/cp-schema-registry
  tag: 5.0.0
  pullPolicy: IfNotPresent
  env:
    - name: "SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS"
      value: "PLAINTEXT://xx.xxx.xx.x:9092,PLAINTEXT://xx.xxx.xx.x:9092,PLAINTEXT://xx.xxx.xx.x:9092"
    - name: "SCHEMA_REGISTRY_LISTENERS"
      value: "http://0.0.0.0:8083"
</code></pre>

<p>But these environment variables are not passed to the pod. </p>

<p>I tried passing as part of install command, but it failed because I cannot pass multiple values, Can anyone please let me know how you have passed your multiple environment variables</p>

<pre><code>ubuntu@ip-10-xx-x-xx:~/helm-test$ helm install helm-test-0.1.0.tgz --set SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS=PLAINTEXT://xx.xxx.xx.xx:9092,PLAINTEXT://xx.xxx.xx.xx:9092,PLAINTEXT://xx.xxx.xx.xx:9092,SCHEMA_REGISTRY_LISTENERS=http://0.0.0.0:8083
Error: failed parsing --set data: key "97:9092" has no value (cannot end with ,)
</code></pre>

<hr>

<p>After trying to pass the environment values both inside the values.yaml file and also as install command</p>

<pre><code>replicaCount: 1

image:
  repository: confluentinc/cp-schema-registry
  tag: 5.0.0
  pullPolicy: IfNotPresent
  env:
    - name:
       SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: "PLAINTEXT://10.xxx.x.xx:9092,PLAINTEXT://10.xxx.x.xx:9092,PLAINTEXT://10.xxx.x.xx.xxx:9092"
       SCHEMA_REGISTRY_LISTENERS: "http://0.0.0.0:8083"


helm install helm-test-0.1.0.tgz --set env.name.SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS="PLAINTEXT://10.xx.x.xx:9092\,PLAINTEXT://10.xx.x.xx:9092\,PLAINTEXT://10.xx.x.xx:9092", --set env.nameSCHEMA_REGISTRY_LISTENERS="http://0.0.0.0:8083"
</code></pre>

<p>I escaped the commas since it was throwing an error 
Error: failed parsing --set data: key "xxx:9092" has no value (cannot end with ,)</p>

<p>I see that my environment values does not show when i try to describe a deployment.</p>

<pre><code>kubectl describe deployment/crusty-aardwolf-helm-test
Name:                   crusty-aardwolf-helm-test
Namespace:              default
CreationTimestamp:      Wed, 10 Oct 2018 14:23:37 +0000
Labels:                 app.kubernetes.io/instance=crusty-aardwolf
                        app.kubernetes.io/managed-by=Tiller
                        app.kubernetes.io/name=helm-test
                        helm.sh/chart=helm-test-0.1.0
Annotations:            deployment.kubernetes.io/revision=1
Selector:               app.kubernetes.io/instance=crusty-aardwolf,app.kubernetes.io/name=helm-test
Replicas:               1 desired | 1 updated | 1 total | 0 available | 1 unavailable
StrategyType:           RollingUpdate
MinReadySeconds:        0
RollingUpdateStrategy:  25% max unavailable, 25% max surge
Pod Template:
  Labels:  app.kubernetes.io/instance=crusty-aardwolf
           app.kubernetes.io/name=helm-test
  Containers:
   helm-test:
    Image:        confluentinc/cp-schema-registry:5.0.0
    Port:         80/TCP
    Host Port:    0/TCP
    Liveness:     http-get http://:http/ delay=0s timeout=1s period=10s #success=1 #failure=3
    Readiness:    http-get http://:http/ delay=0s timeout=1s period=10s #success=1 #failure=3
    Environment:  &lt;none&gt;
</code></pre>

<p>Why are my environment values not passed to my container? Can someone please point me in right direction.</p>

user_01_02
<p>The <a href="https://docs.helm.sh/developing_charts/#values-files" rel="noreferrer"><code>values.yaml</code></a> is more for actual values. You can use <a href="https://golang.org/pkg/text/template/" rel="noreferrer">go template</a> substitutions if you'd like to but it's less common. (These substitutions get used later in a template)</p>

<p>When you specify <code>--set</code> in for example <code>helm install --set foo=bar</code> foo will be overridden by <code>bar</code> in the <code>values.yaml</code> file. What you may really want is something like this:</p>

<pre><code>...
env:
  name:
    SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: "PLAINTEXT://xx.xxx.xx.x:9092,PLAINTEXT://xx.xxx.xx.x:9092,PLAINTEXT://xx.xxx.xx.x:9092"
    SCHEMA_REGISTRY_LISTENERS: "http://0.0.0.0:8083"
</code></pre>

<p>and then on the <code>helm install</code> command line:</p>

<pre><code>helm install helm-test-0.1.0.tgz --set env.name.SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS="PLAINTEXT://xx.xxx.xx.xx:9092,PLAINTEXT://xx.xxx.xx.xx:9092,PLAINTEXT://xx.xxx.xx.xx:9092" --set env.nameSCHEMA_REGISTRY_LISTENERS="http://0.0.0.0:8083"
</code></pre>

<p>More information on how to set the values <a href="https://helm.sh/docs/intro/using_helm/#the-format-and-limitations-of-set" rel="noreferrer">here</a>.</p>
