-
Notifications
You must be signed in to change notification settings - Fork 26
proposal(chart): migrate talm options out of Chart.yaml top-level into a Helm-compliant location #134
Copy link
Copy link
Open
Labels
area/chartIssues or PRs related to charts/ (Chart.yaml, helpers, templates)Issues or PRs related to charts/ (Chart.yaml, helpers, templates)kind/api-changeCategorizes issue or PR as related to adding, removing, or otherwise changing an APICategorizes issue or PR as related to adding, removing, or otherwise changing an APIkind/featureCategorizes issue or PR as related to a new featureCategorizes issue or PR as related to a new featurepriority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to completeImportant over the long term, but may not be staffed and/or may need multiple releases to completetriage/acceptedIndicates an issue is ready to be actively worked onIndicates an issue is ready to be actively worked on
Metadata
Metadata
Assignees
Labels
area/chartIssues or PRs related to charts/ (Chart.yaml, helpers, templates)Issues or PRs related to charts/ (Chart.yaml, helpers, templates)kind/api-changeCategorizes issue or PR as related to adding, removing, or otherwise changing an APICategorizes issue or PR as related to adding, removing, or otherwise changing an APIkind/featureCategorizes issue or PR as related to a new featureCategorizes issue or PR as related to a new featurepriority/important-longtermImportant over the long term, but may not be staffed and/or may need multiple releases to completeImportant over the long term, but may not be staffed and/or may need multiple releases to completetriage/acceptedIndicates an issue is ready to be actively worked onIndicates an issue is ready to be actively worked on
Problem
talm projects ship a
Chart.yamlthat mixes Helm chart metadata with talm-specific configuration at the top level:Per the Helm chart specification (Chart.yaml), the top-level keys allowed in
Chart.yamlare a fixed set:apiVersion,name,version,kubeVersion,description,type,keywords,home,sources,dependencies,maintainers,icon,appVersion,deprecated,annotations. talm'sglobalOptions/templateOptions/applyOptions/upgradeOptionsare not in that set.Helm's loader is permissive about unknown keys, so the current shape works at runtime — but it breaks tooling that validates against the schema:
helm lintdoes not flag these today (it is itself permissive), but tooling that wraps the Helm JSON Schema (IDE plugins, schema-driven editors, security scanners, registry validators) sees them as schema violations.Chart.yamlthrough a typed Helm SDK can drop the unknown fields silently — meaning a chart pushed throughhelm pushand pulled back from a non-trivial registry may lose its talm config.Proposed migration
A soft, two-phase migration that preserves backward compatibility:
Phase 1 (this release): keep accepting the existing top-level keys, AND introduce a Helm-compliant location to read the same configuration from. Print a
WARNING:to stderr when a project still uses the legacy top-level shape, naming the new location and a future release in which the legacy form will be removed. Bothtalm initand the embedded preset chart should write to the new location only.Phase 2 (future major release, e.g. v1): drop legacy-key support; load configuration from the new location only.
Open questions for discussion:
Target location. Two reasonable candidates:
annotationsinChart.yamlunder a stable prefix, e.g.cozystack.io/talm-config: |. Stays insideChart.yaml, no new file. Helm-compliant. Slightly awkward to edit because the value is a YAML string-of-YAML.Chart.yaml, e.g.talm.yamlor.talm/config.yaml. Cleaner separation between Helm chart metadata and talm operational config. Adds a file to the project layout.I lean toward the dedicated file — it scales better as more options accumulate, and editing remains plain YAML.
Deprecation horizon. v1 is the obvious target if a major bump is planned. Otherwise: at least one minor release of overlap with warnings before dropping.
Migration helper.
talm initcould detect a legacy-shapeChart.yamland offer to rewrite it on-the-fly, so users on existing projects do not have to hand-edit. Optional but reduces friction.Acceptance criteria
WARNING:printed to stderr naming the new location and the deprecation target release.talm inittemplate document the new location as canonical.