Thank you for your feedback, Klemens!
Yes, it does. Just deployed FreeBSD test VM and installed kubectl package:Tested on amd64, package works fine, but seems to ignore version parametersset in MODGO_LDFLAGS: $ kubectl version --client=true Client Version: version.Info{Major:"", Minor:"", GitVersion:"v0.0.0-master+2e7996e3e2712", GitCommit:"2e7996e3e2712684bc73f0dec0200d64eec7fe40", GitTreeState:"", BuildDate:"1970-01-01T00:00:00Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"openbsd/amd64"}I would appreciate if someone could point me in the right direction how toset them up properly.FreeBSD seems to use the very same ldflags, do you know if it works for them?
$ kubectl version --clientClient Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.0", GitCommit:"", GitTreeState:"", BuildDate:"2020-05-15T10:10:43Z", GoVersion:"go1.14.1", Compiler:"gc", Platform:"freebsd/amd64"}
Why overwrite version and date in the first place? Does it matter?
It's not critical (or even important) for kubectl operation, but still would be nice to have.
Your port looks good, however pre-configure looks a bit odd; I'veremoved the entire target and simply set `ALL_TARGET = k8s.io/kubernetes'instead; I'm not yet sure if this does the same thing or causes more stuff to be built, but it works, looks cleaner and resulting kubectl works also. Can you check if I missed something with ALL_TARGET?
You are correct and this is indeed better way to build kubectl. I've attached updated version of this port. Kind regards, Karlis
kubectl-v2.tar.gz
Description: GNU Zip compressed data