cert-controller icon indicating copy to clipboard operation
cert-controller copied to clipboard

Rotator fails to compile with cotroller-runtime 0.18.1

Open zbindenren opened this issue 1 year ago • 3 comments

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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/pkg/rotator/rotator.go:715:4: too many arguments in call to c.Watch
	have (source.SyncingSource, handler.EventHandler)
	want (source.Source)

zbindenren avatar May 03 '24 05:05 zbindenren

+1 we use 0.18.2.

kerthcet avatar May 15 '24 08:05 kerthcet

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.

yangzuo0621 avatar Jun 11 '24 23:06 yangzuo0621

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

Thanks a lot!

fedepaol avatar Jun 17 '24 15:06 fedepaol

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.

danielvegamyhre avatar Jul 11 '24 20:07 danielvegamyhre

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

sozercan avatar Aug 08 '24 21:08 sozercan

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

sgtm

ritazh avatar Aug 08 '24 21:08 ritazh

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

sozercan avatar Aug 08 '24 21:08 sozercan

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 avatar Aug 09 '24 00:08 kerthcet

Wait a minute, let me check again.

kerthcet avatar Aug 09 '24 00:08 kerthcet

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

kerthcet avatar Aug 09 '24 00:08 kerthcet