A Helm v4 plugin that enables downloading Helm charts over serial/PTY connections. This plugin allows Helm to fetch charts using the serial:// protocol, useful for air-gapped environments or specialized deployment scenarios where traditional network connectivity is not available.
- Download Helm charts over serial/PTY connections
- Base64 encoded chart transmission for reliability
- Virtual serial port support using socat
- Automatic retry mechanism for connection establishment
- Compatible with Helm v4 downloader protocol
- Go 1.21 or later
socatutility (for virtual serial ports)# Ubuntu/Debian sudo apt-get install socat # RHEL/CentOS/Fedora sudo yum install socat
-
Clone this repository:
git clone <repository-url> cd helm-serial-getter
-
Build and install the plugin:
make build make install
This will build the binaries and install the plugin into your Helm installation.
Before using the plugin, start the chart server that will serve charts over serial connections:
# Build and start the server
make serveThe server will:
- Create virtual serial ports at
/tmp/vserial1and/tmp/vserial2 - Listen for chart requests on these ports
- Serve charts from the
charts/directory
Once the server is running, you can download charts using the serial:// protocol:
# Download a chart via serial connection
helm pull serial://tmp/vserial2/test-0.1.0.tgzThe URL format is: serial://path/to/pty/chartName.tgz
path/to/pty: Path to the serial/PTY devicechartName.tgz: Name of the chart file to download
Run the included test script to verify the plugin works correctly:
./test_serial.shOr use the Makefile target:
make test- Server Component (
serve): Creates virtual serial port pairs using socat and listens for chart requests - Client Component (
client): Connects to serial ports, sends chart requests, and receives base64-encoded chart data - Helm Integration: The plugin integrates with Helm's downloader protocol to handle
serial://URLs
The communication protocol is simple:
- Client sends:
GET helm-chart <chartname> - Server responds with base64-encoded chart data followed by
<<<EOF>>> - Client decodes the data and outputs the chart to stdout
make buildmake cleanThis will stop running processes and clean up temporary files.
├── cmd/
│ ├── client/ # Helm plugin client (downloader)
│ └── serve/ # Chart server
├── charts/ # Sample charts for testing
├── plugin.yaml # Helm plugin configuration
├── Makefile # Build and development commands
└── test_serial.sh # Integration test script
The plugin is configured via plugin.yaml:
- Protocol:
serial - Command:
./client - Version: 0.0.1
- Ensure the server is running before attempting to download charts
- Check that socat is installed and accessible
- Verify the PTY path exists and is accessible
- Check log files for detailed error information
- Ensure you have read/write permissions to the PTY devices
- On some systems, you may need to be in the
dialoutgroup
Both client and server components write detailed logs to log.txt for debugging purposes.