<p>I am trying to use helm to define some variables (including secrets which have been defined in GCP) and use them in an appsettings.json file. None are pulling through. My helm chart defines the vars as below. Some 'secrets' are pulling from the helm chart and some will be from GCP secrets):</p>
<pre><code>  - name: ASPNETCORE_ENVIRONMENT
    value: qa-k8
  - name: auth__apiScopeSecret
    value: foo
  - name: discovery__uri
    value: bar


envFrom:
  - secretRef:
      name: blah-secrets

gcpSecrets:
  enabled: true
  secretsFrom:
    - blah-secrets
</code></pre>
<p>And my appsettings.json file is configured as per the below example. When I check the container, none of the variables within the helm chart have translated and the values are blank. What am I missing? I understand that the double underscores are required to locate the variables in the correct locations and probably aren't required in the appsettings file.</p>
<pre><code>  &quot;auth&quot;: {
    &quot;apiScopeSecret&quot;: &quot;${auth__apiScopeSecret}&quot;
  },
  &quot;discovery&quot;: {
    &quot;uri&quot;: &quot;${discovery__uri}&quot;
</code></pre>

Shep85
<p>That is also the expected Behaviour. Usually You create the appsettings file with the helm values as a cm or secret that are replaced during the deployment and then you mount it into your container. In your case I dont see that you mount something into the container you just provide it as an env.</p>
<ol>
<li>You should specify a secret or configMap with your helm values that provide the appsettings file.</li>
</ol>
<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
  name: appsettings
data:
  appsettings.dev.json: |-
    {
      &quot;Logging&quot;: {
        &quot;LogLevel&quot;: {
          &quot;Default&quot;: {{my__helmvalue}},
        }
      }
    }

</code></pre>
<ol start="2">
<li>In your pod you should specify the volumes and in your container the volumeMounts to specify in wich location the appsetting file should get mounted into.</li>
</ol>
<pre><code>apiVersion: v1
kind: Pod
metadata:
   name: examplepod
spec:
   containers:
     - name: test-container
       image: myimage
       volumeMounts:
       - name: config-volume
         mountPath: /app ## specify your path to overwrite the appsettingsfile!
   volumes:
     - name: config-volume
       configMap:
         name: appsettings
   restartPolicy: Never
</code></pre>
