samuelmasuy / helm-playground

Interactive site to debug Helm templating (& syntax cheatsheet)

Home Page:https://helm-playground.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Helm Playground

This repository contains the source code for https://helm-playground.com

Screenshot of Helm Playground – Click to open

How it works

A piece of Go code is compiled to a Wasm module which can be ran in the browser. This code implements a simple function which takes two inputs:

  • YAML template
  • YAML values

Then it simply renders the given template with the given values using Sprig, which is also what Helm uses.

The Wasm module is compiled in a GitHub action. You can find the workflow in .github/workflows/compile.yaml. When a commit is pushed to master, the workflow is triggered, the code is compiled and committed back to master with the commit message [GitHub action] Wasm module. The master branch is hosted live via GitHub Pages at https://helm-playground.com.

Development

Pull the repository

git clone git@github.com:shipmight/helm-playground.git

Run tests for the golang code

make test

Build Wasm from golang

make build

Test the built Wasm code in browser

yarn --cwd ./browser-test # Install puppeteer in the subfolder
make browser-test

Locally develop in browser

You need a HTTP server to run the site locally, because fetch doesn't work under file:// protocol.

npx http-server -c-1

License

Some files in this repository contain embedded license notes.

Other files in this repository are licensed under GNU AGPLv3 (see LICENSE).

About

Interactive site to debug Helm templating (& syntax cheatsheet)

https://helm-playground.com

License:GNU Affero General Public License v3.0


Languages

Language:JavaScript 89.9%Language:CSS 3.6%Language:HTML 3.3%Language:Go 3.1%Language:Makefile 0.1%