Skip to content

Deployer API: failed to resolve resource reference: cannot resolve reference "name"="XXX" #1344

@nexus49

Description

@nexus49

What happened:
It seems that the Deployer runs into an error when referencing a Resource that makes use of referencePath.

Error:

  conditions:
  - lastTransitionTime: "2025-12-05T15:20:45Z"
    message: 'failed to resolve resource reference: cannot resolve reference "name"="platform-mesh-operator":
      component reference ""name"="platform-mesh-operator"" not found'
    observedGeneration: 1
    reason: GetOCMResourceFailed
    status: "False"
    type: Ready

What you expected to happen:
The Deployer should be able to create the RGD based on the referenced Resource

How to reproduce it (as minimally and precisely as possible):

This can be reproduced with the following resources:

apiVersion: delivery.ocm.software/v1alpha1
kind: Repository
metadata:
  name: platform-mesh
  namespace: default
spec:
  interval: 1m0s
  repositorySpec:
    baseUrl: ghcr.io
    subPath: platform-mesh
    type: OCIRegistry

---
apiVersion: delivery.ocm.software/v1alpha1
kind: Component
metadata:
  name: platform-mesh
  namespace: default
spec:
  repositoryRef:
    name: platform-mesh
  component: github.com/platform-mesh/platform-mesh
  semver: 0.2.0-build.29
  interval: 1m
  ocmConfig:
    - kind: Repository
      apiVersion: delivery.ocm.software/v1alpha1
      name: platform-mesh
      namespace: default
---
apiVersion: delivery.ocm.software/v1alpha1
kind: Resource
metadata:
  name: platform-mesh-operator-rgd
  namespace: default
spec:
  componentRef:
    name: platform-mesh
  interval: 3m0s
  ocmConfig:
  - apiVersion: delivery.ocm.software/v1alpha1
    kind: Repository
    name: platform-mesh
    namespace: default
    policy: Propagate
  resource:
    byReference:
      referencePath:
      - name: platform-mesh-operator
      resource:
        name: rgd
  skipVerify: true

---
apiVersion: delivery.ocm.software/v1alpha1
kind: Deployer
metadata:
  name: platform-mesh-operator
spec:
  ocmConfig:
  - apiVersion: delivery.ocm.software/v1alpha1
    kind: Repository
    name: platform-mesh
    namespace: default
    policy: Propagate
  resourceRef:
    name: platform-mesh-operator-rgd
    namespace: default

Anything else we need to know:

Environment: Tested on kind

Metadata

Metadata

Assignees

Labels

area/ipceiImportant Project of Common European Interestkind/bugfixBug

Type

No fields configured for Bug.

Projects

Status
🍺 Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions