<p>I have a kubeconfig yaml file which contains the property &quot;ENABLED&quot; in env. There is a secrets file being read using envFrom as well which also contains the property &quot;ENABLED&quot;. Which one will get picked up at runtime?</p>
<pre><code>env:
   - name: ENABLED
     value: &quot;true&quot;                
envFrom:
  - secretRef:
    name: test
</code></pre>

Bash
<p>The <a href="https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#container-v1-core" rel="nofollow noreferrer">kubernetes documentation of <code>envFrom</code></a> states that:</p>
<blockquote>
<p>... Values defined by an Env with a duplicate key will take precedence. ...</p>
</blockquote>
<p>Thus, the value defined by <code>env</code> will take precedence.</p>
<p>The answer was take from <a href="https://stackoverflow.com/users/6878708/nightfury1204">nightfury1204</a>'s <a href="https://stackoverflow.com/questions/54398272/override-env-values-defined-in-container-spec/54398918#54398918">answer</a> of <a href="https://stackoverflow.com/questions/54398272/override-env-values-defined-in-container-spec">this question</a>.</p>
