A simple utility for rendering Go Templates with the Sprig library and/or the Helm Templating Language.
Go to file
2023-10-30 12:04:03 +00:00
.version@a07a509d76 include version calculator 2023-10-23 13:47:26 +02:00
.gitignore build with make & inject version on build 2023-10-27 13:15:10 +02:00
.gitlab-ci.yml Update .gitlab-ci.yml file 2023-10-30 12:04:03 +00:00
.gitmodules Add version calculation submodule 2023-10-23 11:30:22 +00:00
go.mod build with make & inject version on build 2023-10-27 13:15:10 +02:00
go.sum build with make & inject version on build 2023-10-27 13:15:10 +02:00
LICENSE Add LICENSE 2023-10-12 18:04:03 +00:00
main.go improve README and help 2023-10-27 14:02:38 +02:00
Makefile asset on tag upload 2023-10-27 14:26:06 +02:00
README.md improve README and help 2023-10-27 14:02:38 +02:00

spry

Basic Sprig & Helm Templating Language (HTL) Template Rendering Tool.

It's design emulates how the helm template command runs, for rendering simple Go Templates, Sprig extended Go Templates, or Helm Templating Language (HTL) Templates, outside of a Helm Chart.

It takes provided templates and renders them using provided values.

_ Files

Like with helm template template files whose names begins with _ will not produce output, but are used to provide common code used in other template files.

Usage Examples

$ ./spry
Usage of ./spry [Options] [Template Files]:
  -d string
        Output delimiter between template files rendered (default "---")
  -delimErr
        Whether to print output delimiter to STDERR.
  -f value
        Specify a values file (JSON or YAML)
  -filenameErr
        Whether to print filename to STDERR. (default true)
  -fp string
        Prefix for the filename in the output. (default "# ")
  -helm
        Use the Helm Templating Language (HTL) (a superset of Sprig).
  -helmDNS
        When using HTL, support DNS resolution. (default true)
  -helmLin
        When using HTL, enable the Linting Mode.
  -helmNestValues
        When using HTL, Nest provided values under '.Values' (default true)
  -helmStrict
        When using HTL, use strict rendering.
  -set value
        Set a specific value (foo.bar=spam)
  -v    Print the version and exit.
  -version
        Print the version and exit.

Template Files can also be directories to recurse for templates.

If no template files are provided it will attempt read from STDIN.
If no input is available from STDIN it will print this usage message instead.
Pass only '-' to Template Files to force waiting for input.

Helm Mode: use the Helm Templating Language/Engine
with the following caveats:
        - 'lookup' function unavailable.