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

upgrade controller-runtime to a version that support k8s/api 0.27.1 or higher #285

Open
sthaha opened this issue May 12, 2023 · 0 comments

Comments

@sthaha
Copy link
Collaborator

sthaha commented May 12, 2023

Upgrading Prometheus Operator to version 0.65.1 which depends on k8s/api 0.27.1 breaks ObO build go build ./cmd/operator/... produces the following compilation error

# sigs.k8s.io/controller-runtime/pkg/cache
# sigs.k8s.io/controller-runtime/pkg/cache
sigs.k8s.io/controller-runtime@v0.14.6/pkg/cache/multi_namespace_cache.go:308:9: cannot use handles (variable of type map[string]"k8s.io/client-go/tools/cache".ResourceEventHan
dlerRegistration) as "k8s.io/client-go/tools/cache".ResourceEventHandlerRegistration value in return statement: map[string]"k8s.io/client-go/tools/cache".ResourceEventHandlerRegistration does not impl
ement "k8s.io/client-go/tools/cache".ResourceEventHandlerRegistration (missing method HasSynced)
sigs.k8s.io/controller-runtime@v0.14.6/pkg/cache/multi_namespace_cache.go:321:9: cannot use handles (variable of type map[string]"k8s.io/client-go/tools/cache".ResourceEventHan
dlerRegistration) as "k8s.io/client-go/tools/cache".ResourceEventHandlerRegistration value in return statement: map[string]"k8s.io/client-go/tools/cache".ResourceEventHandlerRegistration does not impl
ement "k8s.io/client-go/tools/cache".ResourceEventHandlerRegistration (missing method HasSynced)
sigs.k8s.io/controller-runtime@v0.14.6/pkg/cache/multi_namespace_cache.go:326:17: impossible type assertion: h.(map[string]toolscache.ResourceEventHandlerRegistration)
        map[string]"k8s.io/client-go/tools/cache".ResourceEventHandlerRegistration does not implement "k8s.io/client-go/tools/cache".ResourceEventHandlerRegistration (missing method HasSynced)

See also: operator-framework/operator-sdk#6396

As a hack all k8s/ are pinned to 0.26.4.

Remove this hack when the fix is available.

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

No branches or pull requests

1 participant