blablacar / dgr

Container build and runtime tool
Apache License 2.0
248 stars 21 forks source link

[bin-templater] - Recursively walk the attributes dir. #228

Closed nyodas closed 7 years ago

nyodas commented 7 years ago

Fix an issue with the templater and kubernetes config-map When there is a subfolder we automaticaly assume that everything inside is a file. Which in my case is not true.

To reproduce Inside a container

cd /dgr/attributes
rm -rf /dgr/attributes/lol
mkdir -p /dgr/attributes/lol/..129812_20_12_19_58_52.155114496
cd //dgr/attributes/lol
ln -s ..129812_20_12_19_58_52.155114496 ..data
echo -e '---\noverride:\n  kubeconfig: nill' > ..data/lol.yml
ln -s ..data/lol.yml lol.yml
ls -lah
//dgr/bin/templater -t / /dgr -L TRACE

If not in a container the test case 6 fit the need.