2
votes

I have a requirement to create helm charts in a Jenkins pipeline.

As I understand, helmfile makes it easier to deploy helm charts across environments, but it does not help create helm charts.

I have looked at chartify. It looks like it is no longer maintained.

move2kube seems to be prompt-based system. I cannot find an argument to generate a helm chart.

Has anyone achieved this some other way ?

1
Why do you want to create a chart dynamically? What would be so different between two different deployments that you couldn't parameterize it (or use complex Helm logic to construct it)? - David Maze
@DavidMaze David , thank you for replying. Would you please point me to some examples where helm chart creation is parameterized across projects ? What I am trying to achieve is creating a helm chart in a step of a Jenkins pipeline . Ideally , this step should be reused across pipelines. - Att A
You could run sh "helm init" and the like from a Jenkins pipeline, I guess, but I'm still a little unclear why you'd want to do this. Usually I've seen Jenkins used to build and deploy existing code and not to try to build up new code from scratch. (That is, I'd check in a Helm chart with each service, and possibly in a deployment step helm install the chart from the repository, but the chart would be in source control with the rest of the source code.) - David Maze
You can take a look into helmify CLI. It generates a Helm chart from k8s yaml. I've explained how to use it in this answer - Artem

1 Answers

1
votes

There are two choices in move2kube (use 0.2.0 alpha versions or latest), --setconfig and --config. The simplest for you is to run the step manually once, and then copy the m2kconfig.yaml file in the output folder, and place it in the filesystem, and provide that as --config m2kconfig.yaml during execution. Add --qaskip too.