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

Import of k8s.io/kubernetes breaks Bazel #940

Closed
miekg opened this issue Jan 8, 2021 · 8 comments
Closed

Import of k8s.io/kubernetes breaks Bazel #940

miekg opened this issue Jan 8, 2021 · 8 comments

Comments

@miekg
Copy link
Contributor

miekg commented Jan 8, 2021

It's impossible (*) to build VK (and systemk) w/ Bazel because the entirety of kubernetes is a dependency.
It seems to be because of this one file https://github.com/virtual-kubelet/virtual-kubelet/blob/master/internal/podutils/env.go

VK probably needs more stuff than the usual k8s client, but I think it worth copy and pasting a few bits and depending on all of kubernetes just to get a thing. Yes, I realize 'go build' works.

(*): day of trying

@miekg miekg changed the title Import k8s.io/kubernetes breaks Bazel Import of k8s.io/kubernetes breaks Bazel Jan 8, 2021
@miekg
Copy link
Contributor Author

miekg commented Jan 8, 2021

in env.go only 3 functions are used, but there are more files:

test/e2e/basic.go:	"k8s.io/kubernetes/pkg/kubelet/apis/stats/v1alpha1"
cmd/virtual-kubelet/main.go:	k8sVersion   = "v1.15.2" // This should follow the version of k8s.io/kubernetes we are importing
cmd/virtual-kubelet/internal/provider/mock/mock.go:	stats "k8s.io/kubernetes/pkg/kubelet/apis/stats/v1alpha1"
cmd/virtual-kubelet/internal/provider/provider.go:	stats "k8s.io/kubernetes/pkg/kubelet/apis/stats/v1alpha1"
node/api/exec.go:	api "k8s.io/kubernetes/pkg/apis/core"
node/api/exec.go:	"k8s.io/kubernetes/pkg/kubelet/server/remotecommand"
node/api/stats.go:	stats "k8s.io/kubernetes/pkg/kubelet/apis/stats/v1alpha1"
internal/podutils/env.go:	podshelper "k8s.io/kubernetes/pkg/apis/core/pods"
internal/podutils/env.go:	v1helper "k8s.io/kubernetes/pkg/apis/core/v1/helper"
internal/podutils/env.go:	fieldpath "k8s.io/kubernetes/pkg/fieldpath"
internal/podutils/env.go:	"k8s.io/kubernetes/pkg/kubelet/envvars"
internal/podutils/env.go:	"k8s.io/kubernetes/third_party/forked/golang/expansion"
internal/test/e2e/framework/stats.go:	stats "k8s.io/kubernetes/pkg/kubelet/apis/stats/v1alpha1"
internal/test/e2e/framework/pod.go:	podutil "k8s.io/kubernetes/pkg/api/v1/pod"

api/exec.go and api/stats.go might be tricker to "fix".

@cpuguy83
Copy link
Contributor

cpuguy83 commented Jan 8, 2021

Yes, api/exec has definitely been on a todo to fix.
But as you say, it's really problematic... a lot to fork.

@miekg
Copy link
Contributor Author

miekg commented Jan 12, 2021

I can't find v1alpha1.Summary anymore in the k8s repo, seems moved/gone. Found these issues: elastic/beats#12792 and kubernetes/kubernetes#68522

@cpuguy83
Copy link
Contributor

We are no longer importing k8s.io/kubernetes on master.
Looking to cut a release soon.

@kent-h
Copy link

kent-h commented Jul 21, 2021

What is the ETA on this release?

I would very much like to pull this change into our project; but I would prefer a release version if possible.

@cpuguy83
Copy link
Contributor

I've been seeing some deadlocks when running tests and have not had enough time to hunt down the issue.
It is likely related to the queue changes but I'm not sure.

I also want to get #975 into the release, or revert the ControllerManager all-together before the release.

@helayoty
Copy link
Member

helayoty commented Apr 6, 2023

@cpuguy83 Can we close this issue now?

@cpuguy83
Copy link
Contributor

cpuguy83 commented Apr 6, 2023

Yep

@cpuguy83 cpuguy83 closed this as completed Apr 6, 2023
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

4 participants