Skip to content

"mapping values are not allowed in this context" when adding valid crd dependency #392

Description

@eric-carlsson

What happened?

When attempting to add a dependency for VPA CRDs, I got

crossplane: error: failed to parse file "vpa-v1-crd-gen.yaml": error converting YAML to JSON: yaml: line 47: mapping values are not allowed in this context

Line 47 looks like

              More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.

as part of a description field:

            description: |-
              Specification of the checkpoint.
              More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status.

This line is valid yaml since it's in a block scalar, but it seems like it's incorrectly parsed as a field of its own.

How can we reproduce it?

crossplane dependency add https://github.com/kubernetes/autoscaler/blob/vertical-pod-autoscaler-1.6.0/vertical-pod-autoscaler/deploy/vpa-v1-crd-gen.yaml

What environment did it happen in?

  • Crossplane CLI version: v2.5.0
  • Platform (e.g., linux/amd64): darwin/arm64

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions