generated from siderolabs/project-template-kubernetes-controller
-
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.
fix: properly pick talos client configuration
There was a bug in talosconfig iteration nested loop that `break` was just stopping the internal loop. Also allow building the container with race enabled. Signed-off-by: Artem Chernyshev <[email protected]>
- Loading branch information
Showing
3 changed files
with
19 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,13 +15,13 @@ FROM ghcr.io/talos-systems/fhs:${PKGS} AS pkg-fhs | |
|
||
FROM --platform=${BUILDPLATFORM} ${TOOLS} AS build | ||
SHELL ["/toolchain/bin/bash", "-c"] | ||
ARG CGO_ENABLED | ||
ENV PATH /toolchain/bin:/toolchain/go/bin:/go/bin | ||
RUN ["/toolchain/bin/mkdir", "/bin", "/tmp"] | ||
RUN ["/toolchain/bin/ln", "-svf", "/toolchain/bin/bash", "/bin/sh"] | ||
RUN ["/toolchain/bin/ln", "-svf", "/toolchain/etc/ssl", "/etc/ssl"] | ||
ENV GO111MODULE on | ||
ENV GOPROXY https://proxy.golang.org | ||
ENV CGO_ENABLED 0 | ||
ENV GOCACHE /.cache/go-build | ||
ENV GOMODCACHE /.cache/mod | ||
RUN --mount=type=cache,target=/.cache go install sigs.k8s.io/controller-tools/cmd/[email protected] | ||
|
@@ -67,8 +67,10 @@ COPY --from=release-build /control-plane-components.yaml /control-plane-componen | |
COPY --from=release-build /metadata.yaml /metadata.yaml | ||
|
||
FROM build AS binary | ||
ARG GO_BUILDFLAGS | ||
ARG GO_LDFLAGS | ||
ARG TARGETARCH | ||
RUN --mount=type=cache,target=/.cache GOOS=linux GOARCH=${TARGETARCH} go build -ldflags "-s -w" -o /manager | ||
RUN --mount=type=cache,target=/.cache GOOS=linux GOARCH=${TARGETARCH} go build ${GO_BUILDFLAGS} -ldflags "${GO_LDFLAGS}" -o /manager | ||
RUN chmod +x /manager | ||
|
||
FROM build AS integration-test-build | ||
|
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