docs

Dynamic Helm Configuration with Lua Scripts

Enhance Helm deployments with dynamic configuration by using Lua scripts

When luaScript is present and non-empty, it is executed by a Go library that processes Lua scripts and generates structured output in the format:

json
{
  "values": {
    "key": "value"
  },
  "valuesFiles": ["file1.txt", "file2.json"]
}

The full Helm release is rendered using this merged configuration.

Security Architecture

The Lua execution environment follows the principle of least privilege by:

  1. Selective Library Loading: Only essential, safe standard libraries are loaded
  2. Custom Module Control: All additional functionality is provided through controlled custom modules
  3. Restricted File Access: File operations are confined to a specified base directory

Lua Modules

Encoding Module

The encoding module provides functions for JSON and YAML serialization.

Functions