Skip to content

make it easier to import the crdpuller from other projects#3887

Draft
xrstf wants to merge 1 commit intokcp-dev:mainfrom
xrstf:crdpuller-deps
Draft

make it easier to import the crdpuller from other projects#3887
xrstf wants to merge 1 commit intokcp-dev:mainfrom
xrstf:crdpuller-deps

Conversation

@xrstf
Copy link
Contributor

@xrstf xrstf commented Mar 9, 2026

Summary

The api-syncagent imports the crdpuller. Today I tried updating its dependencies to the latest multicluster-runtime, but this would bring the agent to Kubernetes 1.35. This then clashes with the import to kcp when running go mod tidy:

go: github.com/kcp-dev/api-syncagent/internal/discovery imports
        github.com/kcp-dev/kcp/pkg/crdpuller imports
        k8s.io/apiextensions-apiserver/pkg/apiserver imports
        k8s.io/apiserver/pkg/server imports
        k8s.io/apiserver/pkg/admission/plugin/namespace/lifecycle imports
        github.com/kcp-dev/client-go/informers imports
        github.com/kcp-dev/client-go/informers/storagemigration imports
        github.com/kcp-dev/client-go/informers/storagemigration/v1alpha1 imports
        k8s.io/client-go/listers/storagemigration/v1alpha1: module k8s.io/client-go@latest found (v0.35.2), but does not contain package k8s.io/client-go/listers/storagemigration/v1alpha1

For testing, I copied the entire crdpuller package into the syncagent and just removed the line about filtering resources part of apiextensions-apiserver. This solved the dependency hell. Therefore I think it's worth it to introduce a small indirection in kcp: instead of hardcoding a specific scheme in the crdpuller to ignore, it can now be configured by the caller, and in a separate package we provide the default scheme to ignore.

I provided a public MergeSchemes func to aid people in constructing their own scheme to ignore.

What Type of PR Is This?

/kind cleanup

Release Notes

NONE

@kcp-ci-bot kcp-ci-bot added release-note-none Denotes a PR that doesn't merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. dco-signoff: yes Indicates the PR's author has signed the DCO. labels Mar 9, 2026
@kcp-ci-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign mjudeikis for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kcp-ci-bot kcp-ci-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 9, 2026
@xrstf
Copy link
Contributor Author

xrstf commented Mar 9, 2026

part of kcp-dev/api-syncagent#146

@xrstf xrstf marked this pull request as draft March 9, 2026 16:53
@kcp-ci-bot kcp-ci-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants