Why there is no vendor directory in kubernetes-ingress-controller?


I try to build kubernetes-ingress-controller0.2.1, I got errors like this:

> $ make build
> docker rmi -f kong-docker-kubernetes-ingress-controller.bintray.io/kong-ingress-controller-amd64:0.2.1 || true
> Error: No such image: kong-docker-kubernetes-ingress-controller.bintray.io/kong-ingress-controller-amd64:0.2.1
> CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo \
> 		-ldflags "-s -w -X github.com/kong/kubernetes-ingress-controller/version.RELEASE=0.2.1 -X github.com/kong/kubernetes-ingress-controller/version.COMMIT=git-694f1b6 -X github.com/kong/kubernetes-ingress-controller/version.REPO=https://github.com/Kong/kubernetes-ingress-controller" \
> 		-o /var/folders/c_/q1wyxzx14l713h58k4hkff180000gp/T/tmp.VAlLh4Ly/rootfs/kong-ingress-controller github.com/kong/kubernetes-ingress-controller/cli/ingress-controller
> # k8s.io/client-go/util/workqueue
> ../../../k8s.io/client-go/util/workqueue/delaying_queue.go:48:25: clock.Tick undefined (type clock.Clock has no field or method Tick)
> # k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1
> ../../../k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1/zz_generated.conversion.go:39:15: scheme.AddGeneratedConversionFuncs undefined (type *runtime.Scheme has no field or method AddGeneratedConversionFuncs)
> make: *** [build] Error 2

I know this is because “/k8s.io/client-go” on my computer doesn’t match with kubernetes-ingress-controller, the question is which version should I use?

I have tried client-go v5.0.0~v9.0.0, all failed.


Hi @lijiaocn,

Could you try doing dep ensure -v -vendor-only?
make deps should do this for you.

Let me know if that doesn’t help.



You are right, there is a “deps” target in makefile, I should execute “make deps” before “make build”.

I build it successfully. Thank you very much !