Skip to content

Helm chart generates invalid TOML: trailing comma in inline table #195

@JARVIS-coding-Agent

Description

@JARVIS-coding-Agent

Description

The Helm chart template produces a trailing comma in TOML inline tables, which is invalid per the TOML spec.

Generated output (invalid)

env = { GH_TOKEN = "xxx",  }

Expected output

env = { GH_TOKEN = "xxx" }

Root Cause

The Go template range loop appends a , after every key-value pair, including the last one. TOML inline tables do not allow trailing commas, causing the TOML parser to fail and pods to crash on startup.

Suggested Fix

Use a $first flag pattern to only insert commas between items:

env = { {{ $first := true }}{{ range $k, $v := .Values.env }}{{ if not $first }}, {{ end }}{{ $k }} = "{{ $v }}"{{ $first = false }}{{ end }} }

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingp1High — address this sprint

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions