rhobs / rhobs/observability-operator
upgrade controller-runtime to a version that support k8s/api 0.27.1 or higher
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 51
- Forks
- 90
- Avg merge
- 5d 15h
- Merged PRs (30d)
- 22
Description
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: https://github.com/operator-framework/operator-sdk/issues/6396
As a hack all k8s/ are pinned to 0.26.4.
Remove this hack when the fix is available.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the dependency pins for the k8s modules and the controller-runtime v0.14.6 dependency. Run go build ./cmd/operator/... while evaluating a controller-runtime version compatible with k8s/api 0.27.1 or higher; done means the build succeeds and the 0.26.4 pinning hack is removed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100