Skip to content

Follow-ups for Crossplane v1 compatibility - #1

Merged
jakubramut merged 3 commits into
jakubramut:feat/crossplane-v1from
phisco:pr-111-followups
Jul 29, 2026
Merged

Follow-ups for Crossplane v1 compatibility#1
jakubramut merged 3 commits into
jakubramut:feat/crossplane-v1from
phisco:pr-111-followups

Conversation

@phisco

@phisco phisco commented Jul 29, 2026

Copy link
Copy Markdown

Description of your changes

Review follow-ups for crossplane-contrib#111, against its branch so they land together.

main declares capabilities: [required-resources], and Crossplane only defaults a Function to composition when no capabilities are declared at all — so on v2 every XR referencing this function currently fails with MissingCapabilities. Dropping the block, as this PR's base does, is what fixes that. Declaring composition explicitly makes it robust rather than incidental: capabilities: [] would silently break composition again, and it's what the other crossplane-contrib functions do.

The rest is about namespace, which now behaves differently on each major and can surprise people either way. It selects nothing on cluster-scoped kinds — EnvironmentConfig among them — because those have an empty namespace, and the Reference not-found error blamed the Crossplane version for what on v2 is usually just a typo.

Tested with go test ./... and golangci-lint at the CI-pinned v2.6.2. The input CRD carries only the matching description change: a full go generate ./... would also pull in a controller-gen v0.20.0 refresh that go.mod has been due since before this branch, which doesn't belong here.

I have:

phisco added 3 commits July 29, 2026 11:28
Crossplane only defaults a Function to the composition capability when no
capabilities are declared at all, so an empty list would silently break
every composition using this function.

Signed-off-by: Philippe Scorsolini <5697904+phisco@users.noreply.github.com>
The namespace is not honored server-side on Crossplane v1 and never
matches a cluster-scoped kind on either major. The Reference not-found
error also blamed the Crossplane version for what is usually a typo.

Signed-off-by: Philippe Scorsolini <5697904+phisco@users.noreply.github.com>
Signed-off-by: Philippe Scorsolini <5697904+phisco@users.noreply.github.com>
@phisco
phisco force-pushed the pr-111-followups branch from 856402f to d644767 Compare July 29, 2026 11:28
@jakubramut
jakubramut merged commit 86ce973 into jakubramut:feat/crossplane-v1 Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants