Allow configurable apis/ folder structure to avoid path collisions
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 42/100
Research direction
Start by tracing the CLI's existing explicit output-path option and comparing it with the non-conflicting schemas/ layout mentioned in the issue. Define how crossplane-project.yaml should configure the apis/ template and what the default should be; done means resources with the same kind but different API groups generate into distinct, deterministic directories.
Written by the indexing model from the issue text.
Description
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:
- Add an option in
crossplane-project.yamlto configure how theapis/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
- Default to a non-conflicting structure, similar to what
schemas/already uses.
- Dominant language
- Go
- Stars
- 19
- Forks
- 31
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 52
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from crossplane/cli
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
crossplane/cli#282 ·
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 68/100
crossplane/cli#386 · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
crossplane/cli#384 ·
-
crossplane/cli#379 · 1 assignee ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 68/100
crossplane/cli#370 · 1 reaction ·
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
bazel-contrib/rules_go#4726 · 1 comment ·
-
area/auto-scaling area/monitoring area/ops-productivity kind/enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Type/Improvement
Difficulty 1/5 1-3 hours Newbie friendliness 90/100
OpenNSW/nsw-srilanka#522 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 92/100