Skip to content

Add Kubernetes v0.37 client compatibility to v1.20 - #1280

Closed
nisan1101 wants to merge 1 commit into
crossplane:release-1.20from
nisan1101:crossplane-v1-kubernetes-037-compat
Closed

nisan1101 wants to merge 1 commit into
crossplane:release-1.20from
nisan1101:crossplane-v1-kubernetes-037-compat

Conversation

@nisan1101

Copy link
Copy Markdown

Description of your changes

Why

Consumers selecting Kubernetes client v0.37 cannot compile crossplane-runtime v1 because its client adapters do not implement the newer Apply interfaces.

Summary

- controller-runtime v0.19 / Kubernetes clients v0.31
+ controller-runtime v0.25.3 / Kubernetes clients v0.37.1
+ typed resource and status Apply adapters, with matching mock support
+ explicit legacy Applicator selection and current admission interface assertions

Backports the v2 adapter behavior, including rejecting legacy unstructured wrappers for status Apply. Preserves literal event messages through a constant format string. Adds HTTP-boundary regression tests for payload/options, returned configurations, API conflicts, and unsupported status wrappers.

Evidence

  • Before: wrapperStatusClient does not implement client.SubResourceWriter (missing method Apply) with the newer dependency graph; regression compilation fails against the pristine v1.20.12 adapter.
  • After: go test -race ./... passes all 23 test packages on this branch with both Go 1.27.3 and Go 1.26.10.
  • The repository-pinned golangci-lint v2.12.2 run passes with Go 1.26.10.
  • go mod tidy, go mod verify, and git diff --check pass.
  • earthly +reviewable remains unchecked: Earthly is unavailable locally and the Docker daemon is not running. Full container generation/checks are pending CI.

Merge Danger

Door: Two-way.

Blast Radius: Consumers.

This raises the v1 dependency baseline substantially. ClientApplicator embeds two different Apply signatures; callers must select .Client or .Applicator explicitly. This is a draft for compatibility and support-policy review, including whether this belongs on release-1.20. Passing local tests does not establish compatibility for all downstream consumers.

Spec

Sources:

PR scope: allow the v1 codebase to compile and pass its unit tests with the newer Kubernetes client graph while preserving explicit legacy-applicator behavior. Minimum-version policy, release approval, and downstream adoption require maintainer agreement.

Contributor checklist

I have:

DCO sign-off is pending the author's personal attestation; no Signed-off-by certification has been added by automation.

@coderabbitai

coderabbitai Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@nisan1101 nisan1101 closed this Nov 16, 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.

1 participant