This simple project is a generator for Kustomize using dhall, which will allow to use dhall templates everywhere that supports Kustomize.
To install the plugin, you need to copy it into your plugin path. If you clone this repository, you can do:
cp -r plugin/ $XDG_CONFIG_HOME/kustomize/plugin/
If undefined, the default $XDG_CONFIG_HOME
is $HOME/.config
.
Note: this also assumes you have dhall-to-yaml
(from dhall-json
) in your $PATH
.
To use the plugin, create a yaml template like this
# your_file.yaml
apiVersion: com.alessandromarrella/v0
kind: DhallGenerator
metadata:
name: notImportantHere
packageLocation: {YOUR_PACKAGE_LOCATION}
And then you should list your generators in your kustomization.yaml
:
# kustomization.yaml
generators:
- your_file.yaml
See the example
folder for a simple example with nginx
.
You can then run
kustomize build --enable_alpha_plugins
Note: it's not possible yet to use it directly with kubectl due to kubernetes/enhancements#993
You need to use the kustomize
binary.