From ede621633474ac1d86d5af41adf462a5cdc86635 Mon Sep 17 00:00:00 2001 From: sylwit Date: Mon, 9 Jun 2025 12:53:38 -0400 Subject: [PATCH] feat: bump alpine to 3.22 and go to 1.24 [RL-342] --- Dockerfile | 10 +++++----- Makefile | 7 ++++--- README.md | 10 ++++++++++ 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2dc738601..c4fe8cbc8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,10 @@ ARG BASE_VARIANT=alpine -ARG GO_VERSION=1.19 -ARG XX_VERSION=1.1.2 +ARG GO_VERSION=1.24 +ARG XX_VERSION=1.6.1 FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx -FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-${BASE_VARIANT} as gostable +FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-${BASE_VARIANT} AS gostable FROM gostable AS go-linux @@ -17,7 +17,7 @@ RUN apk add --no-cache clang lld COPY --from=xx / / # build-go-mod can still be cached at build platform architecture. -FROM build-base as build +FROM build-base AS build ARG TARGETPLATFORM @@ -61,7 +61,7 @@ RUN export CGO_LDFLAGS="-static -fuse-ld=lld" && \ # Ensure that the binary was cross-compiled correctly to the target platform. RUN xx-verify --static /source-controller -FROM alpine:3.17 +FROM alpine:3.22 ARG TARGETPLATFORM RUN apk --no-cache add ca-certificates \ diff --git a/Makefile b/Makefile index 560dd7743..c314b0a2f 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ SKIP_COSIGN_VERIFICATION ?= false # e.g. '--push'. BUILD_ARGS ?= # Architectures to build images for -BUILD_PLATFORMS ?= linux/amd64,linux/arm64,linux/arm/v7 +BUILD_PLATFORMS ?= linux/amd64 #,linux/arm64,linux/arm/v7 # Go additional tag arguments, e.g. 'integration', # this is append to the tag arguments required for static builds @@ -137,11 +137,12 @@ generate: controller-gen ## Generate API code docker-build: ## Build the Docker image docker buildx build \ --platform=$(BUILD_PLATFORMS) \ - -t $(IMG):$(TAG) \ + --load \ + -t $(IMG) \ $(BUILD_ARGS) . docker-push: ## Push Docker image - docker push $(IMG):$(TAG) + docker push $(IMG) # Find or download controller-gen CONTROLLER_GEN = $(GOBIN)/controller-gen diff --git a/README.md b/README.md index f1fec2cb0..863685411 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,16 @@ [![license](https://img.shields.io/github/license/fluxcd/source-controller.svg)](https://github.com/fluxcd/source-controller/blob/main/LICENSE) [![release](https://img.shields.io/github/release/fluxcd/source-controller/all.svg)](https://github.com/fluxcd/source-controller/releases) +## VGS fork + +``` +today=$(date +%Y%m%d) +export IMG="190066226418.dkr.ecr.us-east-1.amazonaws.com/infra/source-controller:v0.34.0-$today" +make docker-build +assume presidio/infra +make docker-push +``` + The source-controller is a Kubernetes operator, specialised in artifacts acquisition from external sources such as Git, Helm repositories and S3 buckets. The source-controller implements the