kubeshop / kusk-gateway

Kusk-gateway is an OpenAPI-driven API Gateway for Kubernetes
https://kubeshop.github.io/kusk-gateway/
MIT License
253 stars 21 forks source link

Vendor packages using `go mod vendor` #1026

Closed mbana closed 1 year ago

mbana commented 1 year ago

Summary

Run go mod vendor and track vendor/ folder.

Adjust Dockerfiles to not run go mod download as all the dependencies are stored in the vendor/ folder.

Add -mod=vendor flag to go build builds in Dockerfiles.

Add syntax = docker/dockerfile:experimental so we can run go build with --mount=type=cache,target=/go/pkg/mod --mount=type=cache,target=/root/.cache/go-build which is apparently faster.

build/manager/Dockerfile

Adjust WORKDIR to /go/src to match other Dockerfiles.

Change -o manager to -o main which results in ENTRYPOINT ["/main"].


Signed-off-by: Mohamed Bana mohamed@bana.io

netlify[bot] commented 1 year ago

Deploy Preview for kusk-docs-preview canceled.

Name Link
Latest commit bddea1655b0150ba3626aa9920d62037cd3a69d1
Latest deploy log https://app.netlify.com/sites/kusk-docs-preview/deploys/63985f52ee28fe0008314954
mbana commented 1 year ago

Please do not merge just yet.

I want to monitor a few things.

mbana commented 1 year ago

Closing as I am not sure why it's not working. Strange because it did work in the past.