-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/rotator/add-all-option
- Loading branch information
Showing
18 changed files
with
153 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,8 @@ ARG MAINTAINER="vdaas.org vald team <[email protected]>" | |
FROM --platform=${BUILDPLATFORM} mcr.microsoft.com/vscode/devcontainers/go:1 AS base | ||
LABEL maintainer="${MAINTAINER}" | ||
|
||
ARG TARGETARCH | ||
|
||
# skipcq: DOK-DL3008 | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
build-essential \ | ||
|
@@ -51,7 +53,9 @@ COPY versions versions | |
COPY hack/go.mod.default hack/go.mod.default | ||
|
||
# basic deps | ||
RUN make deps \ | ||
RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ | ||
--mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ | ||
make deps GO_CLEAN_DEPS=false \ | ||
&& make ngt/install \ | ||
&& make helm/install \ | ||
&& make helm-docs/install \ | ||
|
@@ -62,7 +66,9 @@ RUN make deps \ | |
&& make kubectl/install | ||
|
||
# additional deps | ||
RUN make k3d/install \ | ||
RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ | ||
--mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ | ||
make k3d/install \ | ||
&& make buf/install \ | ||
&& make k9s/install \ | ||
&& make minikube/install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,9 +19,11 @@ ARG DISTROLESS_IMAGE=gcr.io/distroless/static | |
ARG DISTROLESS_IMAGE_TAG=nonroot | ||
ARG MAINTAINER="vdaas.org vald team <[email protected]>" | ||
|
||
FROM golang:${GO_VERSION} AS golang | ||
FROM --platform=${BUILDPLATFORM} golang:${GO_VERSION} AS golang | ||
|
||
FROM ubuntu:devel AS builder | ||
FROM --platform=${BUILDPLATFORM} ubuntu:devel AS builder | ||
|
||
ARG TARGETARCH | ||
|
||
ENV GO111MODULE on | ||
ENV DEBIAN_FRONTEND noninteractive | ||
|
@@ -53,7 +55,9 @@ WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} | |
COPY go.mod . | ||
COPY go.sum . | ||
|
||
RUN go mod download | ||
RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ | ||
--mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ | ||
go mod download | ||
|
||
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal | ||
COPY internal . | ||
|
@@ -77,10 +81,12 @@ WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} | |
COPY Makefile . | ||
COPY .git . | ||
|
||
RUN make REPO=${ORG} NAME=${REPO} cmd/${PKG}/${APP_NAME} \ | ||
RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ | ||
--mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ | ||
make REPO=${ORG} NAME=${REPO} cmd/${PKG}/${APP_NAME} \ | ||
&& mv "cmd/${PKG}/${APP_NAME}" "/usr/bin/${APP_NAME}" | ||
|
||
FROM ${DISTROLESS_IMAGE}:${DISTROLESS_IMAGE_TAG} | ||
FROM --platform=${BUILDPLATFORM} ${DISTROLESS_IMAGE}:${DISTROLESS_IMAGE_TAG} | ||
LABEL maintainer "${MAINTAINER}" | ||
|
||
ENV APP_NAME mirror | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,9 +20,11 @@ ARG DISTROLESS_IMAGE=gcr.io/distroless/static | |
ARG DISTROLESS_IMAGE_TAG=nonroot | ||
ARG MAINTAINER="vdaas.org vald team <[email protected]>" | ||
|
||
FROM golang:${GO_VERSION} AS golang | ||
FROM --platform=${BUILDPLATFORM} golang:${GO_VERSION} AS golang | ||
|
||
FROM ubuntu:devel AS builder | ||
FROM --platform=${BUILDPLATFORM} ubuntu:devel AS builder | ||
|
||
ARG TARGETARCH | ||
|
||
ENV GO111MODULE on | ||
ENV DEBIAN_FRONTEND noninteractive | ||
|
@@ -57,7 +59,9 @@ COPY .git . | |
COPY go.mod . | ||
COPY go.sum . | ||
|
||
RUN make go/download | ||
RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ | ||
--mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ | ||
make go/download | ||
|
||
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/internal | ||
COPY internal . | ||
|
@@ -75,13 +79,15 @@ WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/versions | |
COPY versions . | ||
|
||
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} | ||
RUN make REPO=${ORG} NAME=${REPO} cmd/${PKG}/${APP_NAME} \ | ||
RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${TARGETARCH}" \ | ||
--mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${TARGETARCH}" \ | ||
make REPO=${ORG} NAME=${REPO} cmd/${PKG}/${APP_NAME} \ | ||
&& mv "cmd/${PKG}/${APP_NAME}" "/usr/bin/${APP_NAME}" | ||
|
||
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/cmd/${PKG} | ||
RUN cp sample.yaml /tmp/config.yaml | ||
|
||
FROM ${DISTROLESS_IMAGE}:${DISTROLESS_IMAGE_TAG} | ||
FROM --platform=${BUILDPLATFORM} ${DISTROLESS_IMAGE}:${DISTROLESS_IMAGE_TAG} | ||
LABEL maintainer="${MAINTAINER}" | ||
|
||
ENV APP_NAME readreplica-rotate | ||
|
Oops, something went wrong.