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

chore(deps): downgrade k8s.io/api and k8s.io/client-go to v0.27.0 #642

Closed
wants to merge 1 commit into from

Conversation

programmer04
Copy link
Member

Currently KTF can't be imported from the current latest commit - 3b8ce68 to KIC as a dependency. It results in

go vet ./...
# sigs.k8s.io/controller-runtime/pkg/cache
../../../go/pkg/mod/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".ResourceEventHandlerRegistration) as "k8s.io/client-go/tools/cache".ResourceEventHandlerRegistration value in return statement: map[string]"k8s.io/client-go/tools/cache".ResourceEventHandlerRegistration does not implement "k8s.io/client-go/tools/cache".ResourceEventHandlerRegistration (missing method HasSynced)
../../../go/pkg/mod/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".ResourceEventHandlerRegistration) as "k8s.io/client-go/tools/cache".ResourceEventHandlerRegistration value in return statement: map[string]"k8s.io/client-go/tools/cache".ResourceEventHandlerRegistration does not implement "k8s.io/client-go/tools/cache".ResourceEventHandlerRegistration (missing method HasSynced)
../../../go/pkg/mod/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)

This PR fixes it by pinning to specific version some of k8s/* dependencies to avoid conflict with sigs.k8s.io/controller-runtime v0.14.6 used in KIC. More about upgrade strategy can be read in comment in the go.mod file.

This PR is a prerequisite to do Kong/kubernetes-ingress-controller#3916 - it requires KTF that doesn't use obsolete Endpoint API (it will be dropped in a separate PR).

@programmer04 programmer04 requested review from a team and shaneutt as code owners May 5, 2023 07:50
@CLAassistant
Copy link

CLAassistant commented May 5, 2023

CLA assistant check
All committers have signed the CLA.

@pmalek
Copy link
Member

pmalek commented May 5, 2023

Apart from the tests failing does Kong/kubernetes-ingress-controller#3916 require newer version of ktf than KIC already uses?

I believe those can be solved separately but I might be proven wrong 🤔

@programmer04
Copy link
Member Author

It requires version of KTF that does not use CoreV1 Endpoints API. I'll prepare PR with it for KTF (I've already had changes locally tested), release new version of KTF and set it in KIC.

Hence as a prerequisite KTF needs to be importable by KIC from current main

@programmer04
Copy link
Member Author

Other approach (maybe better), create release branch from current newest release v0.30.1, get rid of Endpoints and release v0.30.2 from this branch. Cherry-pick that commit to current main of KTF and leave for now in this unimportable state. What do you think @pmalek?

@pmalek
Copy link
Member

pmalek commented May 5, 2023

I might be missing something here but why are Endpoints relevant here? 🤔

What's the specific functionality that uses that and makes KIC<->KTF connection break?

@programmer04 programmer04 self-assigned this May 8, 2023
@programmer04
Copy link
Member Author

A different approach will be taken to resolve the problem described in PR

@programmer04 programmer04 removed the WIP label May 9, 2023
@shaneutt shaneutt deleted the downgrade-deps branch May 9, 2023 13:32
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

Successfully merging this pull request may close these issues.

3 participants