Problem
When the github.com/traefik/traefik component is transferred to a local OCI registry via ocm transfer componentversion --copy-resources, both chart resources (chart and crds) are stored as localBlob layers within a single OCI manifest at component-descriptors/github.com/traefik/traefik:<version>.
The component manifest contains two layers with the same media type:
Layer 1: name="chart" mediaType=application/vnd.cncf.helm.chart.content.v1.tar+gzip
Layer 2: name="crds" mediaType=application/vnd.cncf.helm.chart.content.v1.tar+gzip
The platform-mesh-operator ResourceSubroutine creates Flux OCIRepository sources from OCM Resource CRs. For localBlob access, it points the OCIRepository to the component descriptor manifest and uses a layerSelector with the helm chart media type.
However, Flux's layerSelector only supports filtering by mediaType and operation — not by OCI layer annotations. This means both the traefik and traefik-crds OCIRepositories resolve to the same (first matching) layer, resulting in the wrong chart being deployed for the CRDs resource.
Source component descriptor
resources:
- access:
helmChart: traefik:39.0.0
helmRepository: https://traefik.github.io/charts
type: helm
name: chart
type: helmChart
- access:
helmChart: traefik-crds:39.0.0
helmRepository: https://traefik.github.io/charts
type: helm
name: crds
type: helmChart
After transfer, both become type: localBlob with only a localReference digest — the helmRepository URL is lost.
Proposed solution
Restructure the traefik component into a parent with sub-components, where each sub-component contains exactly one resource:
github.com/traefik/traefik (parent)
├── github.com/traefik/traefik-chart (chart resource only)
├── github.com/traefik/traefik-crd-chart (crds resource only)
└── github.com/traefik/traefik-image (image resource only)
This way, each sub-component's OCI manifest has exactly one helm chart layer, and the layerSelector can unambiguously select it after transfer. The parent component uses componentReferences to tie them together.
This pattern should be applied to any component that has multiple resources of the same media type.
Affected components
Any component with multiple helmChart resources that uses type: helm access (external helm repo reference). Currently known:
github.com/traefik/traefik (chart + crds + image)
Problem
When the
github.com/traefik/traefikcomponent is transferred to a local OCI registry viaocm transfer componentversion --copy-resources, both chart resources (chartandcrds) are stored aslocalBloblayers within a single OCI manifest atcomponent-descriptors/github.com/traefik/traefik:<version>.The component manifest contains two layers with the same media type:
The
platform-mesh-operatorResourceSubroutine creates FluxOCIRepositorysources from OCMResourceCRs. ForlocalBlobaccess, it points the OCIRepository to the component descriptor manifest and uses alayerSelectorwith the helm chart media type.However, Flux's
layerSelectoronly supports filtering bymediaTypeandoperation— not by OCI layer annotations. This means both thetraefikandtraefik-crdsOCIRepositories resolve to the same (first matching) layer, resulting in the wrong chart being deployed for the CRDs resource.Source component descriptor
After transfer, both become
type: localBlobwith only alocalReferencedigest — thehelmRepositoryURL is lost.Proposed solution
Restructure the traefik component into a parent with sub-components, where each sub-component contains exactly one resource:
This way, each sub-component's OCI manifest has exactly one helm chart layer, and the
layerSelectorcan unambiguously select it after transfer. The parent component usescomponentReferencesto tie them together.This pattern should be applied to any component that has multiple resources of the same media type.
Affected components
Any component with multiple
helmChartresources that usestype: helmaccess (external helm repo reference). Currently known:github.com/traefik/traefik(chart + crds + image)