Make ./pkg/client into an internal package using the native k8s client.

This should simplify our build/test setup quite a bit, since it means we have only a single module (at the top level) with all hand-written code. I'll leave `module.sh` alone for now but we may be able to simplify that a bit more.

Signed-off-by: Matt Moyer <moyerm@vmware.com>
This commit is contained in:
Matt Moyer
2020-08-25 10:48:14 -05:00
parent 68893a1e15
commit 8f93fbb87b
12 changed files with 261 additions and 484 deletions

View File

@@ -19,7 +19,6 @@ RUN printf "machine github.com\n\
WORKDIR /work
# Get dependencies first so they can be cached as a layer
COPY go.* ./
COPY pkg/client/go.* ./pkg/client/
COPY generated/1.19/apis/go.* ./generated/1.19/apis/
COPY generated/1.19/client/go.* ./generated/1.19/client/
RUN go mod download
@@ -35,7 +34,6 @@ COPY hack ./hack
# Build the executable binary (CGO_ENABLED=0 means static linking)
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "$(hack/get-ldflags.sh)" -o out ./cmd/pinniped-server/...
# Use a runtime image based on Debian slim
FROM debian:10.5-slim