<p>I have two development phases, <code>dev</code> and <code>prod</code>. and it could be distinguished as <code>.Values.profile</code></p>
<p>In dev, the below resource limit is enough.</p>
<pre><code>cpu: 4
memory: 4Gi
ephemeral-storage: 4Gi
</code></pre>
<p>However, I have to increase it as below while using <code>prod</code> phase.</p>
<pre><code>cpu: 8
memory: 16Gi
ephemeral-storage: 16Gi
</code></pre>
<p>I tried to write my <code>deployment.yaml</code> as follows, and it works.</p>
<pre><code>name : my-app
...      
resources:
    limits:
    {{ if (eq .Values.profile &quot;dev&quot;)}}
    cpu: 4
    memory: 4Gi
    ephemeral-storage: 4Gi
    {{ end }}
    {{ if (eq .Values.profile &quot;prod&quot;)}}
    cpu: 8
    memory: 16Gi
    ephemeral-storage: 16Gi
    {{end}}
</code></pre>
<p>However, I wondered what is the best practice to separate container resources between two phases.</p>
<p>Thank you!</p>

mozzi
<p>Create a separate values.yaml file for each environment.
E.g. values_dev.yaml , values_prod.yaml.
Put the environment specific values in the corresponding yamls.
Based on the environment on which the deployment is being done, pass the corresponding values.yaml file as argument helm install command.</p>
