open-policy-agent / cert-controller

Apache License 2.0
90 stars 36 forks source link

Rotator fails to compile with cotroller-runtime 0.18.1 #207

Closed zbindenren closed 4 weeks ago

zbindenren commented 4 months ago

If you try you get the following error:

 github.com/open-policy-agent/cert-controller/pkg/rotator
.go/pkg/mod/github.com/open-policy-agent/cert-controller@v0.10.1/pkg/rotator/rotator.go:703:24: not enough arguments in call to source.Kind
    have ("sigs.k8s.io/controller-runtime/pkg/cache".Cache, *"k8s.io/api/core/v1".Secret)
    want ("sigs.k8s.io/controller-runtime/pkg/cache".Cache, T, handler.TypedEventHandler[T], ...predicate.TypedPredicate[T])
.go/pkg/mod/github.com/open-policy-agent/cert-controller@v0.10.1/pkg/rotator/rotator.go:704:3: too many arguments in call to c.Watch
    have (source.SyncingSource, *handler.TypedEnqueueRequestForObject[client.Object])
    want (source.Source)
.go/pkg/mod/github.com/open-policy-agent/cert-controller@v0.10.1/pkg/rotator/rotator.go:714:25: not enough arguments in call to source.Kind
    have ("sigs.k8s.io/controller-runtime/pkg/cache".Cache, *unstructured.Unstructured)
    want ("sigs.k8s.io/controller-runtime/pkg/cache".Cache, T, handler.TypedEventHandler[T], ...predicate.TypedPredicate[T])
.go/pkg/mod/github.com/open-policy-agent/cert-controller@v0.10.1/pkg/rotator/rotator.go:715:4: too many arguments in call to c.Watch
    have (source.SyncingSource, handler.EventHandler)
    want (source.Source)
kerthcet commented 3 months ago

+1 we use 0.18.2.

yangzuo0621 commented 2 months ago

The master branch has been updated to v0.18.3 for sigs.k8s.io/controller-runtime, but a release for this version has not been made yet.

fedepaol commented 2 months ago

@maxsmythe @ritazh @sozercan would it be possible to cut a release? We are hitting the same error while bumping MetalLB deps.

Thanks a lot!

danielvegamyhre commented 1 month ago

Any estimate for when this will be done? This is blocking our project from upgrading to k8s api v0.30 since it requires controller-runtime v0.18+, which is not compatible with cert-controller's latest release.

sozercan commented 4 weeks ago

Sorry for the delay. We can cut a new release. @ritazh @maxsmythe any objections?

ritazh commented 4 weeks ago

Sorry for the delay. We can cut a new release. @ritazh @maxsmythe any objections?

sgtm

sozercan commented 4 weeks ago

https://github.com/open-policy-agent/cert-controller/releases/tag/v0.11.0 is available now!

kerthcet commented 4 weeks ago

Awesome, thanks!

Update:

I tried with v0.18.4, seems the problem still occurs, I believe this should be the right version to fix the bug, right? Thanks again @ritazh @sozercan

kerthcet commented 4 weeks ago

Wait a minute, let me check again.

kerthcet commented 4 weeks ago

Yeah, that's my mistake, exactly got fixed. Sorry for the misleading.