Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep original manifest filename, support list of files #100

Closed
ComeBurguburu opened this issue Mar 30, 2023 · 4 comments · Fixed by #105
Closed

Keep original manifest filename, support list of files #100

ComeBurguburu opened this issue Mar 30, 2023 · 4 comments · Fixed by #105

Comments

@ComeBurguburu
Copy link

Hi,
I want to use helmify on many files and keeping original name and mutualise values.yaml

Here is how I run it with bash

rm -rf pypi-server

for f in $(ls pypi-server-src);
do 
  cat pypi-server-src/$f | ./helmify pypi-server;
  mv pypi-server/templates/pyserver.yaml pypi-server/templates/$f;
  cat pypi-server/values.yaml >> pypi-server/values-all.yaml;
done
@arttor
Copy link
Owner

arttor commented Mar 31, 2023

Hi @ComeBurguburu. Can you please elaborate on which part is missing in helmify for your use-case?

As i can see, the bash script handles manifests one-by-one which will not work, because:

  • it will overwrite chart every time and may lose data from previous manifests
  • it will not preserve correct links between chart objects

This means that all app manifests should be passed to helmify at once.
Currently, helmify supports only stdin as a source. You can use this script to pass all manifest from the given directory:

awk 'FNR==1 && NR!=1  {print "---"}{print}'  pypi-server-src/*.yaml | helmify pypi-server

The script reads all yamls from dir (script can be modified to read recursively and to use other file extensions), separates yaml objects with --- separator and pass everything to helmify at once.

The best option for overriding values.yaml is to use native helm features for overriding files (-f ) or concrete params (--set):

helm install -f myvalues.yaml  --set foo=bar

@ComeBurguburu
Copy link
Author

ComeBurguburu commented Mar 31, 2023

Hi arttor,
Thanks for this amazing tools

I find two issues:

  • helmify can't have a folder as source (I want to keep one file per object)
  • deployment file generated is named deployment.yaml

@arttor
Copy link
Owner

arttor commented Mar 31, 2023

got it. in this case, it makes sense to adjust the issue, to support input from the filesystem.

@arttor
Copy link
Owner

arttor commented Apr 7, 2023

Hi @ComeBurguburu, the feature implemented in v0.4.0 release. Check it out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants