opsgenie / kubernetes-event-exporter

Export Kubernetes events to multiple destinations with routing and filtering
Apache License 2.0
1.04k stars 351 forks source link

Building binary fails in v0.11 #160

Open FraPazGal opened 2 years ago

FraPazGal commented 2 years ago

Hello all,

As the title says, I'm having trouble compiling the go binary by running:

$ CGO_ENABLED=0 GOOS=linux GO11MODULE=on go build -mod=vendor -a .

vendor/k8s.io/client-go/discovery/discovery_client.go:31:2: cannot find package "."

I'm using Golang 1.17 and building the latest 0.11 version. I have seen the same error in the GitHub CI, so I'm inclined to believe there is an issue in the released files.

Thanks in advance, Francisco de Paz

petchumpriwan commented 2 years ago

@FraPazGal I got similar issues with errors in the GitHub CI. The reason is caused by git doesn't detect folder name change. you can fix this by follow this or if you just clone the repo, just remove vendor folder and run go mod vendor

FraPazGal commented 2 years ago

That was a nice solution @petchumpriwan, thanks for the help! I suppose the vendor folder was not updated before the release and that is the cause of the issue.

petchumpriwan commented 2 years ago

When I read my reply again, I think I type something that quite not clear and mislead the cause. Let's me give more information on that

😄