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

Remove dependencies on k8s.io/kubernetes #200

Closed
damemi opened this issue Nov 25, 2019 · 6 comments
Closed

Remove dependencies on k8s.io/kubernetes #200

damemi opened this issue Nov 25, 2019 · 6 comments
Assignees
Labels
kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt.

Comments

@damemi
Copy link
Contributor

damemi commented Nov 25, 2019

There are several places in the code where we are importing k8s.io/kubernetes

$ grep -rni "k8s.io/kubernetes" *
pkg/descheduler/pod/pods_test.go:24:	"k8s.io/kubernetes/pkg/apis/scheduling"
pkg/descheduler/pod/pods.go:24:	api "k8s.io/kubernetes/pkg/apis/core"
pkg/descheduler/pod/pods.go:25:	"k8s.io/kubernetes/pkg/apis/core/v1/helper/qos"
pkg/descheduler/pod/pods.go:26:	"k8s.io/kubernetes/pkg/kubelet/types"
pkg/descheduler/strategies/lownodeutilization.go:26:	helper "k8s.io/kubernetes/pkg/api/v1/resource"
pkg/descheduler/strategies/pod_antiaffinity.go:29:	priorityutil "k8s.io/kubernetes/pkg/scheduler/algorithm/priorities/util"
pkg/utils/predicates.go:25:	v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper"
pkg/utils/predicates.go:30:// k8s.io/kubernetes/plugin/pkg/scheduler/algorithm/predicates/
test/e2e/e2e_test.go:29:	"k8s.io/kubernetes/pkg/api/testapi"

At a glance many of these seem to be importing internal APIs, for possibly dubious reasons (such as here, where this is only used to access 2 constants, both which are available in k8s.io/api). Some of these changes may require minor refactors to k8s.io/kubernetes (such as moving constants that never got copied to the external APIs)

I think we should work to break these dependencies on k8s.io/kubernetes, as I don't think it is intended to be imported by external tools and this will make the switch to go.mod simpler (as well as reduce our transitive dependencies)

@damemi
Copy link
Contributor Author

damemi commented Nov 25, 2019

/assign

@aveshagarwal
Copy link
Contributor

aveshagarwal commented Jan 24, 2020

@damemi we dont have to use k8s.io/kubernetes` and also we should stop using internap apis and replace them with external exported apis.

@seanmalloy
Copy link
Member

/kind cleanup

@k8s-ci-robot k8s-ci-robot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Feb 6, 2020
@seanmalloy
Copy link
Member

@damemi I think this issue can be closed now that #216 has been merged. Is there anything else that need to be done before we close this one out?

@damemi
Copy link
Contributor Author

damemi commented Feb 10, 2020

@seanmalloy nope, thought it would get closed automatically. Thanks for reminding me
/close

@k8s-ci-robot
Copy link
Contributor

@damemi: Closing this issue.

In response to this:

@seanmalloy nope, thought it would get closed automatically. Thanks for reminding me
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt.
Projects
None yet
Development

No branches or pull requests

4 participants