Minikube: Remove dependecy on k8s.io/kubernetes in go mod

Created on 1 Jul 2019  路  4Comments  路  Source: kubernetes/minikube

While I was trying to bump up the dependecy in go mod for k8s.io/kubernetes 1.11.3
I noticed we our go mod fails because we are importing the whole kubernetes. and I could not add a new depedency on kubectl subpackage.

Thanks to the help on golang issues, (https://github.com/golang/go/issues/32864) I found out the root cause is Kubernetes is is not meant to be imported as a go module See comment https://github.com/golang/go/issues/32776#issuecomment-505607726 . we need to import only sub-packages kuberentes and delete k8s.io/kubernetes in the the go.mod

it is a good opportunity to upgrade to 1.15.0 ( there is a few breaking api changes for apimachinary that watch.Until needs to be changed to use api machinary wait package.

if I have time I will do this, but if someone wants to take this, I would be happy to review the PR.

aredependency good first issue help wanted kincleanup prioritimportant-longterm

Most helpful comment

Thank you @josedonizetti for taking this , I came across this comment https://github.com/kubernetes/kubernetes/issues/79384#issuecomment-505627280 recomending using replace () it might be helpful to you . let me know if you have any questions

All 4 comments

I'll take this.

Thank you @josedonizetti for taking this , I came across this comment https://github.com/kubernetes/kubernetes/issues/79384#issuecomment-505627280 recomending using replace () it might be helpful to you . let me know if you have any questions

@medyagh currently replace() in go.mod is hard to upgrade the version of the replacement.

see https://github.com/golang/go/issues/32721

closed by #4719 thank you @josedonizetti

Was this page helpful?
0 / 5 - 0 ratings