elotl / kip

Virtual-kubelet provider running pods in cloud instances
Apache License 2.0
223 stars 14 forks source link

Go-go go Modules #175

Closed justnoise closed 4 years ago

justnoise commented 4 years ago

In the work to test out virtual kubelet changes, I ran into some k8s dependency issues. Dep wasn't going very well so I moved the repo over to modules, something we were interested in doing anyways.

Etcd has a few issues around how they handle their dependencies. As such, we had to downgrade etcd from 3.3.18 to 3.3.13 and make some tweaks to go.mod. I tested the backwards/forwards compatibility and it seems to be a-ok (which it should be).

The changes to the go-client mostly impact the cell controller. For now I've added an issue to timeout our calls to k8s and left the contexts as TODOs. That's functionally the same as a background context but we should updated them to timeouts.

In the build, when making the binaries go will rewrite go.mod and go.sum despite the fact that those have been tidied. I tried building with -mod=readonly but that did not work. To keep our binaries from being marked with dirty tags, I added a git checkout -- go.mod go.sum to the build instructions after the make step. There might be a better way around this.

Also got rid of the vendor folder. The sweet sweet code deletions are MINE!

justnoise commented 4 years ago

One question: do we want to keep vendor/?

justnoise commented 4 years ago

@ldx one last thing for this one: I'm going to add the vendor/ directory to .gitignore.