generated from kyma-project/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
replace (bump) serverless images with name function_* (#637)
Co-authored-by: Filip Strozik <[email protected]>
- Loading branch information
Showing
9 changed files
with
143 additions
and
30 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# | ||
# This Dockerfile is used to build serverless-operator image locally | ||
# It's a copy of Dockerfile.release with additional logic bumping serverless images in the values.yaml | ||
# | ||
|
||
# Build the operator binary | ||
FROM golang:1.21.6 as builder | ||
|
||
WORKDIR /workspace | ||
|
||
# Copy the Go Modules manifests | ||
COPY go.mod go.sum ./ | ||
|
||
# cache deps before building and copying source so that we don't need to re-download as much | ||
# and so that source changes don't invalidate our downloaded layer | ||
RUN go mod download | ||
|
||
# Copy the go source | ||
COPY components/operator components/operator | ||
|
||
# Build | ||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o operator ./components/operator/main.go | ||
|
||
# Replace main images in values.yaml | ||
FROM alpine:3.19.0 as replacer | ||
|
||
WORKDIR /workspace | ||
|
||
ARG IMG_DIRECTORY | ||
ARG IMG_VERSION | ||
|
||
ENV IMG_DIRECTORY=$IMG_DIRECTORY | ||
ENV IMG_VERSION=$IMG_VERSION | ||
|
||
RUN apk update && apk add make yq | ||
|
||
COPY components/operator/hack components/operator/hack | ||
COPY config/serverless config/serverless | ||
|
||
RUN make -C components/operator/hack/ci replace-only-main-chart-images | ||
|
||
# Use distroless as minimal base image to package the operator binary | ||
# Refer to https://github.com/GoogleContainerTools/distroless for more details | ||
FROM gcr.io/distroless/static:nonroot | ||
|
||
WORKDIR / | ||
COPY --chown=65532:65532 --from=builder /workspace/operator . | ||
COPY --chown=65532:65532 --from=replacer /workspace/config/serverless /module-chart | ||
USER 65532:65532 | ||
|
||
ENTRYPOINT ["/operator"] |
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