Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatibilities in coming k8s client version #737

Open
Breee opened this issue Jun 1, 2024 · 3 comments
Open

Incompatibilities in coming k8s client version #737

Breee opened this issue Jun 1, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@Breee
Copy link

Breee commented Jun 1, 2024

Just to put in on your radar,

Seems the latest controller runtime / k8s versions is incompatible with crossplane-runtime

Deps:

module github.com/crossplane-contrib/provider-keycloak

go 1.22.0

toolchain go1.22.3

require (
	dario.cat/mergo v1.0.0
	github.com/alecthomas/kingpin/v2 v2.4.0
	github.com/crossplane/crossplane-runtime v1.16.0
	github.com/crossplane/crossplane-tools v0.0.0-20240522174801-1ad3d4c87f21
	github.com/crossplane/upjet v1.4.0
	github.com/pkg/errors v0.9.1
	k8s.io/apimachinery v0.30.1
	k8s.io/client-go v0.30.1
	sigs.k8s.io/controller-runtime v0.18.3
	sigs.k8s.io/controller-tools v0.15.0
)

leads to:

$ make generate && make build && make reviewable
17:27:37 [ .. ] verify go modules dependencies have expected content
all modules verified
17:27:38 [ OK ] go modules dependencies verified
17:27:38 [ .. ] generating provider schema for mrparkers/keycloak 4.4.0
17:27:39 [ OK ] generating provider schema for mrparkers/keycloak 4.4.0
17:27:40 [ .. ] go generate linux_amd64

Generated 43 resources!
17:27:51 [ OK ] go generate linux_amd64
17:27:51 [ .. ] go mod tidy
17:27:51 [ OK ] go mod tidy
17:27:52 [ .. ] verify go modules dependencies have expected content
all modules verified
17:27:53 [ OK ] go modules dependencies verified
17:27:55 [ .. ] go build linux_amd64
github.com/crossplane/crossplane-runtime/pkg/controller
# github.com/crossplane/crossplane-runtime/pkg/controller
/home/bree/go/pkg/mod/github.com/crossplane/crossplane-runtime@v1.16.0/pkg/controller/engine.go:237:14: cannot use ... in call to non-variadic ctrl.Watch
/home/bree/go/pkg/mod/github.com/crossplane/crossplane-runtime@v1.16.0/pkg/controller/engine.go:250:13: cannot use ... in call to non-variadic ctrl.Watch
/home/bree/go/pkg/mod/github.com/crossplane/crossplane-runtime@v1.16.0/pkg/controller/engine.go:250:40: not enough arguments in call to source.Kind
        have ("sigs.k8s.io/controller-runtime/pkg/cache".Cache, client.Object)
        want ("sigs.k8s.io/controller-runtime/pkg/cache".Cache, T, handler.TypedEventHandler[T], ...predicate.TypedPredicate[T])

branch to reproduce https://github.com/crossplane-contrib/provider-keycloak/tree/renovate/godeps

@Breee Breee added the bug Something isn't working label Jun 1, 2024
@cychiang
Copy link
Contributor

cychiang commented Jul 20, 2024

It looks like crossplane-runtime on release-1.16.0 is using sigs.k8s.io/controller-runtime v0.17.0. To narrow down the root cause.

  • crossplane-runtime is not compatible with sigs.k8s.io/controller-runtime on version ">=0.18.0"
  • Here is the change to the Watch function.

From your case, try to downgrade the controller-runtime into sigs.k8s.io/controller-runtime v0.17.x should solved the problem.

I also found that, in the v1.17-rc(v1.17.0-rc.0.0.20240701185925-ecb6ceeebe6f) release, the problem has been solved.

Copy link

Crossplane does not currently have enough maintainers to address every issue and pull request. This issue has been automatically marked as stale because it has had no activity in the last 90 days. It will be closed in 14 days if no further activity occurs. Leaving a comment starting with /fresh will mark this issue as not stale.

@github-actions github-actions bot added the stale label Feb 11, 2025
@Breee
Copy link
Author

Breee commented Feb 11, 2025 via email

@github-actions github-actions bot removed the stale label Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants