Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate helm template files without the folder `/templates`?

I create a helm chart directory

helm create myChart

After updating the templates and values I run

helm template .

Everything looks as expected. Next, I want to output the manifest files into another directory

helm template . --output-dir ./test

wrote ./test/myChart/templates/serviceaccount.yaml
wrote ./test/myChart/templates/service.yaml
wrote ./test/myChart/templates/deployment.yaml
wrote ./test/myChart/templates/tests/test-connection.yaml

Is there a way to output just the file manifest without the mychart/templates?

wrote ./test/serviceaccount.yaml
wrote ./test/service.yaml
wrote ./test/deployment.yaml
wrote ./test/test-connection.yaml
like image 751
M.Holmes Avatar asked Sep 20 '25 08:09

M.Holmes


1 Answers

I don't think there is such an option in the Helm command itself, but you can always run the following command.

helm template myChart . --output-dir ./test && mv ./test/myChart/templates/* ./test && rm -r ./test/myChart
like image 157
Rafał Leszko Avatar answered Sep 22 '25 08:09

Rafał Leszko