<p>I have my values.yaml in my_project_directory under deployment as below</p>
<pre><code>C:\Users\Username\IdeaProjects\my-project\deployment\values.yaml
</code></pre>
<p>I need to use different values.yaml based on certain triggers in AzureDevops.</p>
<p>Current way I am running is (This runs fine and uses values.yaml)</p>
<pre><code>helm install my-app-name ./deployment/ --namespace=my-namespace-name
</code></pre>
<p>I have two other values.yaml as below</p>
<pre><code>C:\Users\Username\IdeaProjects\my-project\deployment\values_dev.yaml
C:\Users\Username\IdeaProjects\my-project\deployment\values_preprod.yaml
</code></pre>
<p>and can run using respective commands</p>
<pre><code>helm install my-app-name . -f values_dev.yaml --namespace=my-namespace-name
helm install my-app-name . -f values_preprod.yaml --namespace=my-namespace-name
</code></pre>
<p>These work fine but I have to cd into deployment and run these. Anyway I can run it from project root directory?</p>
<p>Tried this</p>
<pre><code>helm install my-app-name -f ./deployment/values_dev.yaml --namespace=my-namespace-name
</code></pre>
<p>Got this error</p>
<pre><code>Error: must either provide a name or specify --generate-name
</code></pre>
<p>Also tried this</p>
<pre><code> helm install my-app-name -f ./deployment/values_dev.yaml --namespace=my-namespace-name --generate-name
</code></pre>
<p>Got this error</p>
<pre><code>Error: failed to download &quot;my-app-name&quot; (hint: running `helm repo update` may help)
</code></pre>
<p>Also tried this</p>
<pre><code>helm install my-app-name ./deployment/values_dev.yaml --namespace=my-namespace-name
</code></pre>
<p>Got this error</p>
<pre><code>Error: file 'C:\Users\User\IdeaProjects\my-project\deployment\values_dev.yaml' seems to be a YAML file, but expected a gzipped archive
</code></pre>

Venkatesh Gotimukul
<p>These commands worked for me to use different values.yaml from the root folder (All these 3 values files are under deployment folder)</p>
<pre><code>helm install my-app-name ./deployment/ --values ./deployment/values.yaml --namespace=my-namespace-name

helm install my-app-name ./deployment/ --values ./deployment/values_dev.yaml --namespace=my-namespace-name

helm install my-app-name ./deployment/ --values ./deployment/values_preprod.yaml --namespace=my-namespace-name
</code></pre>
