Skip to content

Can't validate v1/legacy compositions #118

@fernandezcuesta

Description

@fernandezcuesta

What happened?

When we try to validate a LegacyCluster composition, we end up with the following error:

[x] schema validation error acme.com/v1alpha1, Kind=XFoo, test : spec.crossplane: Invalid value: "crossplane": unknown field: "crossplane"

Because the rendered XR contains ownerReferences hanging from spec.crossplane:

apiVersion: acme.com/v1alpha1
kind: XFoo
metadata:
  name: test
spec:
  compositionUpdatePolicy: Manual
  crossplane:
    resourceRefs:
    - apiVersion: bar.baz/v1alpha1
      kind: Test
      name: resource-one
    - apiVersion: bar.baz/v1alpha1
      kind: Test
      name: resource-two
[...]

How can we reproduce it?

crossplane composition render ... | crosplane resource validate for a LegacyCluster composition.

What environment did it happen in?

  • Crossplane CLI version: v2.3.2
  • Platform (e.g., linux/amd64): linux/amd64
  • Crossplane version (if applicable): v2.3.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions