Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error after compiling to ARM architecture #3

Closed
carlosedp opened this issue Feb 26, 2018 · 3 comments
Closed

Error after compiling to ARM architecture #3

carlosedp opened this issue Feb 26, 2018 · 3 comments

Comments

@carlosedp
Copy link
Contributor

Since this image is a requirement to deploy some coreos prometheus-operator images, I tried compiling on an ARM64 board. I changed the GOARCH and the compilation went fine but when executing I get:

root@kubemaster1:/home/rock64/go/src/github.com/brancz/kube-rbac-proxy# export PATH=$PATH:/usr/local/go/bin
root@kubemaster1:/home/rock64/go/src/github.com/brancz/kube-rbac-proxy# export GOPATH=/home/rock64/go
root@kubemaster1:/home/rock64/go/src/github.com/brancz/kube-rbac-proxy# export PATH=$PATH:$GOPATH/bin
root@kubemaster1:/home/rock64/go/src/github.com/brancz/kube-rbac-proxy# make build
>> building for linux/arm to _output/linux/arm/kube-rbac-proxy
root@kubemaster1:/home/rock64/go/src/github.com/brancz/kube-rbac-proxy# ./_output/linux/arm/kube-rbac-proxy
F0225 20:59:00.638916    6257 main.go:107] Failed to build Kubernetes rest-config: unable to load in-cluster configuration, KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT must be defined
goroutine 1 [running]:
github.com/brancz/kube-rbac-proxy/vendor/github.com/golang/glog.stacks(0x442008db00, 0x442017a000, 0xc0, 0x114)
	/home/rock64/go/src/github.com/brancz/kube-rbac-proxy/vendor/github.com/golang/glog/glog.go:766 +0xb0
github.com/brancz/kube-rbac-proxy/vendor/github.com/golang/glog.(*loggingT).output(0x13e2fe0, 0x4400000003, 0x44200c82c0, 0x13415e6, 0x7, 0x6b, 0x0)
	/home/rock64/go/src/github.com/brancz/kube-rbac-proxy/vendor/github.com/golang/glog/glog.go:717 +0x2b8
github.com/brancz/kube-rbac-proxy/vendor/github.com/golang/glog.(*loggingT).printf(0x13e2fe0, 0x3, 0xbdeea1, 0x2a, 0x4420029e08, 0x1, 0x1)
	/home/rock64/go/src/github.com/brancz/kube-rbac-proxy/vendor/github.com/golang/glog/glog.go:655 +0x108
github.com/brancz/kube-rbac-proxy/vendor/github.com/golang/glog.Fatalf(0xbdeea1, 0x2a, 0x4420029e08, 0x1, 0x1)
	/home/rock64/go/src/github.com/brancz/kube-rbac-proxy/vendor/github.com/golang/glog/glog.go:1145 +0x54
main.main()
	/home/rock64/go/src/github.com/brancz/kube-rbac-proxy/main.go:107 +0x678

Same happens on ARM32 or ARM64.

@brancz
Copy link
Owner

brancz commented Feb 26, 2018

Thanks for reporting! 🙂

I believe this is unrelated to the architecture, the kube-rbac-proxy expects to be run within a Kubernetes cluster. Could you see if you can reproduce this with the provided examples within a cluster? For example: https://github.com/brancz/kube-rbac-proxy/tree/master/examples/non-resource-url

@carlosedp
Copy link
Contributor Author

Tried deploying and get:

rock64@kubemaster1:~/go/src/github.com/brancz/kube-rbac-proxy/examples/non-resource-url $ kubectl logs -f kube-rbac-proxy-57b8c8db5b-cgkpj kube-rbac-proxy
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x70 pc=0x97a4ac]

goroutine 1 [running]:
main.main()
        /home/rock64/go/src/github.com/brancz/kube-rbac-proxy/main.go:148 +0xbac

@brancz
Copy link
Owner

brancz commented Mar 27, 2018

This was indeed a bug in the code, it was closed by #8

@brancz brancz closed this as completed Mar 27, 2018
metalmatze pushed a commit to metalmatze/kube-rbac-proxy that referenced this issue Jan 29, 2019
Fast forward the 'master' branch to be in sync with 'openshift-master'
ibihim pushed a commit to ibihim/kube-rbac-proxy that referenced this issue Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants