Environment
Device and OS: Ubuntu Linux on x86_64
App version: Zarf v0.77.0
Kubernetes distro being used: K3s v1.34.4+k3s1 (k3d v5.9.0)
Other:
Steps to reproduce
-
Create a chart with a kind: List template that uses a YAML anchor across items.
min-chart/Chart.yaml:
apiVersion: v2
name: min-chart
version: 0.1.0
min-chart/templates/list.yaml:
apiVersion: v1
kind: List
items:
- apiVersion: v1
kind: ConfigMap
metadata:
name: cm-a
data: &shared
key: value
- apiVersion: v1
kind: ConfigMap
metadata:
name: cm-b
data: *shared
-
Wrap it in a zarf.yaml:
kind: ZarfPackageConfig
metadata:
name: min-anchor
version: "dev"
components:
- name: chart
required: true
charts:
- name: min-chart
namespace: min-test
localPath: min-chart
version: 0.1.0
-
Build and deploy:
zarf package create --architecture amd64 --skip-sbom --confirm
zarf package deploy zarf-package-min-anchor-amd64-dev.tar.zst --confirm
Expected result
Both ConfigMaps deploy successfully, each with data.key = value. Vanilla helm install of the same chart and kubectl apply -f on the rendered output both succeed (see Visual Proof for more details).
Actual Result
ERR failed to deploy package: unable to deploy component "chart":
release: not found
unable to install chart error while running post render on files:
error re-rendering helm output:
YAML parse error on /tmp/zarf-3747194653/chart.yaml:
error converting YAML to JSON:
yaml: unknown anchor 'shared' referenced
Visual Proof (screenshots, videos, text, etc)
Zarf deploy failure (full error above).
Same chart deploys cleanly via Helm directly:
$ helm install repro ./min-chart -n min-test --create-namespace
NAME: repro
LAST DEPLOYED: ...
NAMESPACE: min-test
STATUS: deployed
REVISION: 1
$ kubectl get cm -n min-test cm-a cm-b \
-o jsonpath='{range .items[*]}{.metadata.name}={.data.key} {end}'
cm-a=value cm-b=value
The two ConfigMaps both end up with data.key = value — the anchor materializes correctly under Helm and the apiserver.
The same rendered YAML also applies cleanly with kubectl apply -f.
Severity/Priority
Medium. A workaround exists at the chart level (modify the upstream template), but it requires the chart author's intervention.
Additional Context
Scope of the issue, verified with three tests to narrow it down:
| Scenario |
helm install |
zarf package deploy |
| Single resource, anchor and alias used internally |
✅ |
✅ |
kind: List with two items, no anchor |
✅ |
✅ |
kind: List with two items, anchor crosses items |
✅ |
❌ |
So the issue is specifically about YAML anchors crossing item boundaries within a kind: List, not YAML anchors or kind: List in general. Anchors within a single resource resolve correctly under Zarf; plain kind: List resources without anchors deploy correctly under Zarf.
Environment
Device and OS: Ubuntu Linux on x86_64
App version: Zarf v0.77.0
Kubernetes distro being used: K3s v1.34.4+k3s1 (k3d v5.9.0)
Other:
Steps to reproduce
Create a chart with a
kind: Listtemplate that uses a YAML anchor across items.min-chart/Chart.yaml:min-chart/templates/list.yaml:Wrap it in a
zarf.yaml:Build and deploy:
Expected result
Both ConfigMaps deploy successfully, each with
data.key = value. Vanillahelm installof the same chart andkubectl apply -fon the rendered output both succeed (see Visual Proof for more details).Actual Result
Visual Proof (screenshots, videos, text, etc)
Zarf deploy failure (full error above).
Same chart deploys cleanly via Helm directly:
The two ConfigMaps both end up with
data.key = value— the anchor materializes correctly under Helm and the apiserver.The same rendered YAML also applies cleanly with
kubectl apply -f.Severity/Priority
Medium. A workaround exists at the chart level (modify the upstream template), but it requires the chart author's intervention.
Additional Context
Scope of the issue, verified with three tests to narrow it down:
helm installzarf package deploykind: Listwith two items, no anchorkind: Listwith two items, anchor crosses itemsSo the issue is specifically about YAML anchors crossing item boundaries within a
kind: List, not YAML anchors orkind: Listin general. Anchors within a single resource resolve correctly under Zarf; plainkind: Listresources without anchors deploy correctly under Zarf.