Hi,

On Thu, 04 Jun 2020, Klemens Nanni wrote:

> On Thu, Jun 04, 2020 at 02:43:24PM +0200, karlis.mikels...@lf.lv wrote:
> > Please find attached port for kubectl latest stable version:
> > "The Kubernetes command-line tool, kubectl, allows you to run commands
> > against Kubernetes clusters. You can use kubectl to deploy applications,
> > inspect and manage cluster resources, and view logs."
> Thanks a lot for your port!  Installing it via `go get' already worked
> but proper packages are much nicer :)
> 
> > Tested on amd64, package works fine, but seems to ignore version parameters
> > set 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 to
> > set them up properly.
> FreeBSD seems to use the very same ldflags, do you know if it works for
> them?
> 
> Why overwrite version and date in the first place?  Does it matter?

No idea.  As far as I can tell this is informative only. But not only
Major and Minor are not right, the date one is also a bit off :-)

$ 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 tried to build it removing some of the flags.  But the result is
pretty similar.  I think that at least some of them, are totally ignored
or overridden at some point.

> 
> Your port looks good, however pre-configure looks a bit odd;  I've
> removed 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?

Built and tested on amd64 against GKE clusters with Klemens' ALL_TARGET
mod.  It works ok for me.

As far as I can see, PLIST does not change with this mod.  Maybe
somebody with more knowledge of Go can help us here.

Cheers,

-- 
Paco Esteban.
0x5818130B8A6DBC03

Reply via email to