Repository navigation
fix(platform): bundle prologue swallows the document separator into the # Networking comment #2475
Copy link
Copy link
Open
Labels
area/platformIssues or PRs related to platform infrastructure (bundle, flux, talos, installer)Issues or PRs related to platform infrastructure (bundle, flux, talos, installer)kind/bugCategorizes issue or PR as related to a bugCategorizes issue or PR as related to a buglifecycle/staleDenotes an issue or PR has remained open with no activity and has become staleDenotes an issue or PR has remained open with no activity and has become stalepriority/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
Description
Activity
- addedkind/bugCategorizes issue or PR as related to a bugCategorizes issue or PR as related to a bug
on Apr 24, 2026 - addedarea/platformIssues or PRs related to platform infrastructure (bundle, flux, talos, installer)Issues or PRs related to platform infrastructure (bundle, flux, talos, installer)priority/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
on Apr 27, 2026 - added a commit that references this issue
on May 20, 2026 - added a commit that references this issue
on May 20, 2026 Hi, Aleksei Sviridkin (@lexfrei). I'm Dosu, and I'm helping the cozystack team manage their backlog and am marking this issue as stale.
Issue Summary
- A left-trimmed Go template tag in
packages/core/platform/templates/bundles/system.yamlcan cause the# Networkingcomment to consume the first---document separator. - When that happens, YAML no longer recognizes the document boundary, which can lead to Flux post-rendering failures.
- The failure mode appears fragile and can be triggered by adding new package includes before that line, resulting in duplicate
apiVersionkeys. - The suggested fix is to remove the
-from{{- if ... }}or ensure the package helper always emits an explicit---.
Next Steps
- Please let us know if this is still relevant on the latest version of the cozystack repository.
- If it is still reproducible, you can keep the discussion open by commenting here; otherwise, this issue will be automatically closed in 7 days.
Thanks for your understanding and contribution.
- A left-trimmed Go template tag in
- addedlifecycle/staleDenotes an issue or PR has remained open with no activity and has become staleDenotes an issue or PR has remained open with no activity and has become staleand removed
on Aug 3, 2026 - added a commit that references this issue
on Aug 11, 2026
Metadata
Metadata
Assignees
Labels
area/platformIssues or PRs related to platform infrastructure (bundle, flux, talos, installer)Issues or PRs related to platform infrastructure (bundle, flux, talos, installer)kind/bugCategorizes issue or PR as related to a bugCategorizes issue or PR as related to a buglifecycle/staleDenotes an issue or PR has remained open with no activity and has become staleDenotes an issue or PR has remained open with no activity and has become stalepriority/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
Description
The top of
packages/core/platform/templates/bundles/system.yamlis:The
{{-strips the newline after# Networking, and the first---that the Package helper emits lands on the same line as the comment, producing# Networking---. YAML parses that as a pure comment — the document separator is lost.Why it matters
Today it works because the
isp-fullvariant block itself emits the first Package and there is nothing to collide with. The fragility only surfaces when a new Package include is added immediately before the# Networkingline: the first emitted Package document'sapiVersionmerges into the previous Package's output and Flux's post-renderer fails withmapping key "apiVersion" already defined.Hit this while adding a
cozystack.gateway-api-crdsinclude at the top of the bundle for #2470. I worked around it by moving the include into the Common Packages block, but the root cause is still there.Fix options
{{- if eq .Values.bundles.system.variant ...}}so the comment's trailing newline is preserved.---line at the start of every Package helper's output.Either fix is small. The first is less invasive; the second is defensive for any future include reshuffling.