kubetemplate

Kubernetes specific helpers and Jinja templating


Keywords
kubernetes, template, templating, jinja, pangaea
License
MIT
Install
pip install kubetemplate==0.0.1

Documentation

Kubetemplate

Command line Jinja templating with Kubernetes specific helpers

Installation: pip3 install kubetemplate

Usage kubet [-h] [-i INPUT_T] [-o OUTPUT_T]
-h help
-i input target path, defaults to targets in .kubetemplate file
-o output target path if input target path specified, defaults to same directory

Put a .kubetemplate file in your project root. It looks like this:

compiler:
  # Compiles target .jinja files at 'path' to 'to' or the same directory by default
  targets:
    - path: app
      to: app.compiled
    - path: files
  # Optionally specify a prefix to be attached to all compiled files (then .gitignore the prefix)
  output_prefix: 'pan.'

any_other_data:
  available_inside_the_templates: in_the_config_hash
  see: the_example

This can be used, for example, to generate a Kubernetes secret that contains Google service account credentials.

You can then use this with pangaea to enable Kubernetes to download Docker images from a private Google Cloud Registry.

Contributions

Made at Hasura

Released under the MIT license.

Ideas and issues are welcome.