Skip to content

Allow configurable apis/ folder structure to avoid path collisions #214

Description

@BigGold1310

What problem are you facing?

Generating APIs from an XRD or simple schema can conflict when two resources share the same kind but belong to different API groups. For example:

kubernetesclusters.onprem.example.com
kubernetesclusters.cloud.example.com

Both of these generate today into the same directory, apis/kubernetesclusters/, causing a conflict.

There is currently an option to specify the output path explicitly, but that doesn't scale for larger repositories or automated build tooling, where paths need to be derived consistently rather than set by hand.

How could Crossplane help solve your problem?

Allow conflict-free generation of XRD definitions from an XR or simple schema. Ideas:

  1. Add an option in crossplane-project.yaml to configure how the apis/ folder is populated, using a template string such as {{ groupElement[1] }}/{{ kindPlural }}. For example, this would resolve to:
apis/
  onprem/
    kubernetesclusters/
      definition.yaml
  cloud/
    kubernetesclusters/
      definition.yaml
  1. Default to a non-conflicting structure, similar to what schemas/ already uses.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions