0

I have a lot of comments in my helm chart in my repository. I want to deliver my helm chart to others without these comments.

I am hoping to be able to do this during my CI pipeline. I have a step in my pipeline which performs the helm package command. I am hoping to have this package completely stripped of comments (in the templates, values, etc)

I have not found a way to do this directly with helm.

Is there a simple solution to my problem?

I have already considered some ways to solve it but I feel like I am missing a simple solution here. I know I can parse the values files and re write them using something like yq which will strip all comments. But that won't work for the template files as they are not valid yaml with the helm/go templating in them.

Inbar Rose
  • 41,843
  • 24
  • 85
  • 131
  • How is this programming-related? – Turing85 Jan 25 '23 at 20:04
  • You'd have to build a tool that could parse the Go template syntax, explicitly remove the `{{/* ... */}}` comments (possibly with `-` whitespace control markers), and write it out again. That feels complex to me. Do you also need to remove comments in places like `NOTES.txt` or individual values that will be interpreted using `tpl`? – David Maze Jan 26 '23 at 11:25
  • I’m voting to close this question because - moved to devops https://devops.stackexchange.com/q/17328/8189 – Inbar Rose Feb 28 '23 at 13:19

0 Answers0