2

I'm trying to generate the helm charts using jkube maven plugin. What I would like to do is put some information in the chart template as {{ .Values.something }}. In order to do that I need to, first of all, being able to define/populate that file using the plugin and also knowing how to consume that from the templates I add in the src/main/jkube section.

Does anybody has a working example that I could use?

Luis Tobon
  • 101
  • 4

1 Answers1

2

Answering my own question. You need to create a template.yaml and add the variables with their default values there.

kind: Template
parameters:
- name: limits_memory
  value: "512Mi"
- name: requests_memory
  value: "256Mi"

Then. In any template, you only need to reference them as ${myVariable}. For example in this case it will be

whatever: ${limits_memory}

For a full working example check here https://github.com/eclipse/jkube/tree/master/quickstarts/maven/spring-boot-helm

Luis Tobon
  • 101
  • 4