Skip to content

v0.8.0

Compare
Choose a tag to compare
@JeanMertz JeanMertz released this 23 Feb 14:55
· 11 commits to master since this release
9408029
  • #13: Auto update repositories when running kubecrt
  • #14: Add support for partials in charts.yml
  • #15: Better error reporting details to stderr

Partial Templates

You can optionally split your charts.yml file into multiple chunks, by using
partial templates. This works almost the same way as Helm's support for these
in charts. See the Helm documentation for more details.

To use these partials, you have to set the --partials-dir flag when calling
kubecrt, pass it the path to your partials directory, and then use those
partials in your charts.yml.

Example:

charts.yml:

apiVersion: v1
name: my-bundled-apps
namespace: apps
charts:
- stable/factorio:
    values:
      resources:
{{ include "factorio/resources" . | indent 8 }}

partials/factorio/resources.yml

{{- define "factorio/resources" -}}
requests:
  memory: 1024Mi
  cpu: 750m
{{- end -}}

You can then run this as follows:

kubecrt --partials-dir ./partials charts.yml

And the result is a fully-parsed charts printed to stdout.

Some notes:

  • you can use subfolders to organise your partials
  • each named define has to be uniquely named, or risk being overwritten
  • you can define multiple define blocks in a single file
  • the files don't need to be yaml files, you can use any content you need