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

added serveral endpoints #28

Merged
merged 10 commits into from
Apr 5, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
reverted dockerfile
Signed-off-by: Jasmin Gacic <jasmin.gacic@gmail.com>
  • Loading branch information
jasmingacic committed Apr 4, 2022
commit d77d3e3b5a0385ffe979c9464168e47389c55366
3 changes: 2 additions & 1 deletion kgw-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ spec:
app: kgwtest
spec:
containers:
- image: jasmingacic/kuskgateway-api
- image: jasmingacic/kuskgateway-api:latest
imagePullPolicy: Always
name: kuskgateway-api
serviceAccountName: kusk-gateway-manager
---
Expand Down
22 changes: 13 additions & 9 deletions server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
FROM golang:1.10 AS build
FROM golang:1.17 AS build
WORKDIR /go/src
COPY go ./go
COPY main.go .
# Copy `go.mod` for definitions and `go.sum` to invalidate the next layer
# in case of a change in the dependencies
COPY go.mod go.sum ./
# Download dependencies
RUN go mod download

ENV CGO_ENABLED=0
RUN go get -d -v ./...

RUN go build -a -installsuffix cgo -o openapi .
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -v -o kusk-gateway-api

FROM scratch AS runtime
COPY --from=build /go/src/openapi ./
COPY --from=build --chown=65532:65532 /go/src/kusk-gateway-api ./
EXPOSE 8080/tcp
ENTRYPOINT ["./openapi"]

USER 65532:65532

ENTRYPOINT ["./kusk-gateway-api"]