amazon-apigateway-ingress-controller
amazon-apigateway-ingress-controller copied to clipboard
make docker-build fails due to vendor/
When running make docker-build, assuming one does not go get the dependencies separately, the command fails with something similar to:
pkg/cloudformation/cloudformation.go:10:2: cannot find package "github.com/awslabs/goformation/cloudformation/resources" in any of:
/usr/local/opt/go/libexec/src/github.com/awslabs/goformation/cloudformation/resources (from $GOROOT)
/Users//golang/src/github.com/awslabs/goformation/cloudformation/resources (from $GOPATH)
/Users//golang/src/github.com/awslabs/goformation/cloudformation/resources
/Users//Development/amazon-apigateway-ingress-controller/src/github.com/awslabs/goformation/cloudformation/resources
/Users//Development/amazon-apigateway-ingress-controller/vendor/src/github.com/awslabs/goformation/cloudformation/resources
../../golang/src/sigs.k8s.io/controller-runtime/pkg/webhook/alias.go:20:2: cannot find package "gomodules.xyz/jsonpatch/v2" in any of:
/usr/local/opt/go/libexec/src/gomodules.xyz/jsonpatch/v2 (from $GOROOT)
/Users//golang/src/gomodules.xyz/jsonpatch/v2 (from $GOPATH)
/Users//golang/src/gomodules.xyz/jsonpatch/v2
/Users//Development/amazon-apigateway-ingress-controller/src/gomodules.xyz/jsonpatch/v2
/Users//Development/amazon-apigateway-ingress-controller/vendor/src/gomodules.xyz/jsonpatch/v2
make: *** [vet] Error 1
From what I can tell this is because vendor/ is now ignored in golang v1.11+ https://github.com/golang/go/wiki/GOPATH#use-a-single-gopath . It sounds like we need to adapt either the documentation or the automation to accommodate this.
I'm running into this, and it appears that "github.com/awslabs/goformation/cloudformation/resources" doesn't exist unless you go way back to v2.3.1 of goformation.