Re: [NEW] sysutils/kubectl
On Fri, 05 Jun 2020, Klemens Nanni wrote: > On Fri, Jun 05, 2020 at 11:15:05AM +0200, karlis.mikels...@lf.lv wrote: > > Yes, it does. Just deployed FreeBSD test VM and installed kubectl package: > > $ kubectl version --client > > Client 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"} > No idea why our build does not pick it up... > > > > 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. > I'd just drop these bits; if at all, they're only relevant for > reproducible builds which we do not support anyway. > > > You are correct and this is indeed better way to build kubectl. I've > > attached updated version of this port. > Thanks for testing. > > I looked further into this and here's a greatly simplified Makefile that > works just fine: > > # $OpenBSD$ > > COMMENT = command line tool for controlling Kubernetes > clusters > > GH_ACCOUNT =kubernetes > GH_PROJECT =kubernetes > VERSION = 1.18.3 > GH_TAGNAME =v${VERSION} > PKGNAME = kubectl-${VERSION} > > CATEGORIES =sysutils > > HOMEPAGE = > https://kubernetes.io/docs/reference/kubectl/overview/ > > # Apache License 2.0 > PERMIT_PACKAGE =Yes > > WANTLIB = c pthread > > MODULES = lang/go > > GO_PKGNAME =k8s.io/kubernetes > WRKSRC =${MODGO_WORKSPACE}/src/${GO_PKGNAME} > ALL_TARGET =${GO_PKGNAME}/cmd/kubectl > > .include > > No custom targets, I also adopted the variable name GO_PKGNAME from the > FreeBSD port. > > Are you fine with this? > Any porters around with an OK for import? As said earlier, works ok for me on GKE clusters so ok paco. -- Paco Esteban. 0x5818130B8A6DBC03
Re: [NEW] sysutils/kubectl
On Fri, Jun 05, 2020 at 11:15:05AM +0200, karlis.mikels...@lf.lv wrote: > Yes, it does. Just deployed FreeBSD test VM and installed kubectl package: > $ kubectl version --client > Client 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"} No idea why our build does not pick it up... > > 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. I'd just drop these bits; if at all, they're only relevant for reproducible builds which we do not support anyway. > You are correct and this is indeed better way to build kubectl. I've > attached updated version of this port. Thanks for testing. I looked further into this and here's a greatly simplified Makefile that works just fine: # $OpenBSD$ COMMENT = command line tool for controlling Kubernetes clusters GH_ACCOUNT =kubernetes GH_PROJECT =kubernetes VERSION = 1.18.3 GH_TAGNAME =v${VERSION} PKGNAME = kubectl-${VERSION} CATEGORIES =sysutils HOMEPAGE = https://kubernetes.io/docs/reference/kubectl/overview/ # Apache License 2.0 PERMIT_PACKAGE =Yes WANTLIB = c pthread MODULES = lang/go GO_PKGNAME =k8s.io/kubernetes WRKSRC =${MODGO_WORKSPACE}/src/${GO_PKGNAME} ALL_TARGET =${GO_PKGNAME}/cmd/kubectl .include No custom targets, I also adopted the variable name GO_PKGNAME from the FreeBSD port. Are you fine with this? Any porters around with an OK for import? kubectl-v3.tgz Description: Binary data
Re: [NEW] sysutils/kubectl
Thank you for your feedback, Klemens! 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? Yes, it does. Just deployed FreeBSD test VM and installed kubectl package: $ kubectl version --client Client 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'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? 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
Re: [NEW] sysutils/kubectl
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
Re: [NEW] sysutils/kubectl
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? 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?