<p>I'm installing fluent-bit in our k8s cluster.  I have the helm chart for it on our repo, and argo is doing the deployment.</p>
<p>Among the resources in the helm chart is a config-map with data value as below:</p>
<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
  name: fluent-bit
  labels:
    app: fluent-bit
data:
...
  output-s3.conf: |
    [OUTPUT]
        Name s3
        Match *
        bucket bucket/prefix/random123/test
        region ap-southeast-2
...
</code></pre>
<p>My question is how can I externalize the value for the bucket so it's not hardcoded (please note  that the bucket value has random numbers)? As the s3 bucket is being created by a separate app that gets ran on the same master node, the randomly generated s3 bucket name is available as environment variable, e.g. doing &quot;echo $s3bucketName&quot; on the node would give the actual value).</p>
<p>I have tried doing below on the config map but it didn't work and is just getting set as it is when inspected on pod:</p>
<pre><code>bucket $(echo $s3bucketName) 
</code></pre>
<p>Using helm, I know it can be achieved something like below and then can populate using scripting something like <code>helm --set</code> to set the value from environment variable.  But the deployment is happening auto through argocd so it's not like there is a place to do <code>helm --set</code> command or please let me know if otherwise.</p>
<pre><code>bucket {{.Values.s3.bucket}}
</code></pre>
<p>TIA</p>

lorraine batol
<p>Instead of using <code>helm install</code> you can use <code>helm template ... --set ... &gt; out.yaml</code> to locally render your chart in a yaml file. This file can then be processed by Argo.</p>
<p><a href="https://helm.sh/docs/helm/helm_template/" rel="nofollow noreferrer">Docs</a></p>
