Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Correct (my own) spelling of integrations #2312
I did not expect this to pass CI without further intervention*. Now, I am deeply confused.
*It does not complete
BOOYAH! I have made it fail for the right reason:
There are two problems with
Having fixed those two problems, now we are at the thing that actually needs to be fixed:
a. code-generator at the version indicated in go.mod generates code that is not compatible with apimachinery from the version indicated in go.mod.
I'm not sure it's possible to keep all of these things:
The version of k8s.io/code-generator that will produce code compatible with client-go v11 (roughly, that at the tag kubernetes-1.14.4) isn't kitted out for go mod. Attempting to run it from its pkg/mod location (as the current update_codegen.sh script does) won't work, because it wants to
In general we use go mod(ules), so it doesn't matter where the code is checked out. But: the script bin/helm/update_codegen.sh puts its generated files in the location indicated by their package and GOPATH. So the checkout and that location should be the same.
The way to do this (I eventually figured out) is to use `replace` lines in go.mod. Just using `go get <whatever kubernetes-1.14.4`, or putting the equivalent `require` line in go.mod, will usually result in the head revision.
The k8s.io/code-generator package version needed to produce code compatible with client-go@v11 is old enough that it won't work with `go mod`. To be able to use it, we have to copy it locally and let it be compiled there.