-
Notifications
You must be signed in to change notification settings - Fork 79
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/internal/add-kvs-pogreb
- Loading branch information
Showing
16 changed files
with
74 additions
and
91 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
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,13 +19,12 @@ 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 ARCH=${TARGETARCH} | ||
ENV GO111MODULE on | ||
ENV DEBIAN_FRONTEND noninteractive | ||
ENV INITRD No | ||
|
@@ -56,8 +55,8 @@ WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} | |
COPY go.mod . | ||
COPY go.sum . | ||
|
||
RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${ARCH}" \ | ||
--mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${ARCH}" \ | ||
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 | ||
|
@@ -82,12 +81,12 @@ WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} | |
COPY Makefile . | ||
COPY .git . | ||
|
||
RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${ARCH}" \ | ||
--mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${ARCH}" \ | ||
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,13 +20,12 @@ 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 ARCH=${TARGETARCH} | ||
ENV GO111MODULE on | ||
ENV DEBIAN_FRONTEND noninteractive | ||
ENV INITRD No | ||
|
@@ -60,8 +59,8 @@ COPY .git . | |
COPY go.mod . | ||
COPY go.sum . | ||
|
||
RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${ARCH}" \ | ||
--mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${ARCH}" \ | ||
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 | ||
|
@@ -80,15 +79,15 @@ WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO}/versions | |
COPY versions . | ||
|
||
WORKDIR ${GOPATH}/src/github.com/${ORG}/${REPO} | ||
RUN --mount=type=cache,target="${GOPATH}/pkg",id="go-build-${ARCH}" \ | ||
--mount=type=cache,target="${HOME}/.cache/go-build",id="go-build-${ARCH}" \ | ||
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 | ||
|
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
Oops, something went wrong.