<p>I'm making use of a conf file in my pod which is necessary for my application.
Right now I'm adding this conf file directly to my Docker image with</p>
<pre><code>COPY ./example.conf  /etc/example.conf
</code></pre>
<p>This is the contents of my conf file</p>
<pre><code>[example]
url = url
username = username
password = password
</code></pre>
<p>I want to be able to give the url dynamically via helm (or some other way), so the docker image method is not suitable. How do I approach this problem ?</p>

VIOLET
<p>You should use <code>volume</code> and <code>volumeMount</code> to refactor your project.</p>
<p><a href="https://kubernetes.io/docs/concepts/storage/volumes/" rel="nofollow noreferrer">k8s volume</a></p>
<p><a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/" rel="nofollow noreferrer">configMap</a></p>
<p>Note:</p>
<ul>
<li>You can create a ConfigMap before you can use it.</li>
<li>A container using a ConfigMap as a subPath volume mount will not receive ConfigMap updates.</li>
<li>Text data is exposed as files using the UTF-8 character encoding. For other character encodings, use binaryData.</li>
</ul>
<p>e.g.</p>
<p>configmap.yaml</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: v1
kind: ConfigMap
metadata:
  name: test-conf
data:
  example.conf: |
    url = url
    username = username
    password = password  
</code></pre>
<p>pod.yaml</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: v1
kind: Pod
metadata:
  name: test-pod
spec:
  containers:
    - name: test
      image: busybox:1.28
      volumeMounts:
        - name: conf
          mountPath: /etc/
  volumes:
    - name: conf
      configMap:
        name: test-conf
</code></pre>
