Skip to content

Commit ffe9a7c

Browse files
authored
🌱 parameterize all base images in fleetconfig-controller Dockerfiles; bump to v0.0.5 (#25)
* ci: parameterize base images * chore: bump to v0.0.5 --------- Signed-off-by: Tyler Gillson <[email protected]>
1 parent 24c4e23 commit ffe9a7c

File tree

6 files changed

+28
-15
lines changed

6 files changed

+28
-15
lines changed

‎fleetconfig-controller/build/Dockerfile.base‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@
33
ARG OS
44
ARG ARCH
55

6+
ARG GO_BASE_IMAGE=golang:1.24.4-alpine3.22
7+
ARG PYTHON_BASE_IMAGE=python:3.13-alpine
8+
ARG DISTROLESS_IMAGE=gcr.io/distroless/static:nonroot
9+
610
## Stage 1: Build the manager binary
7-
FROM golang:1.24.4-alpine3.22 AS builder
11+
FROM ${GO_BASE_IMAGE} AS builder
812
ARG OS
913
ARG ARCH
1014

@@ -27,7 +31,7 @@ COPY pkg/ pkg/
2731
RUN CGO_ENABLED=0 GOOS=${OS:-linux} GOARCH=${ARCH} go build -a -o manager cmd/main.go
2832

2933
## Stage 2: Install dependencies
30-
FROM golang:1.24.4-alpine3.22 AS dependencies
34+
FROM ${GO_BASE_IMAGE} AS dependencies
3135
ARG OS
3236
ARG ARCH
3337

@@ -38,7 +42,7 @@ ARG CLUSTERADM_VERSION=1.0.0
3842
RUN curl -L https://raw.githubusercontent.com/open-cluster-management-io/clusteradm/main/install.sh | bash -s -- ${CLUSTERADM_VERSION}
3943

4044
## Stage 3: Compress binaries with upx to reduce image size
41-
FROM python:3.13-alpine AS upx
45+
FROM ${PYTHON_BASE_IMAGE} AS upx
4246
RUN apk update && apk add --no-cache upx
4347

4448
WORKDIR /output
@@ -51,7 +55,7 @@ RUN mkdir -p /output && \
5155

5256
## Stage 4: Finalize
5357

54-
FROM gcr.io/distroless/static:nonroot AS production
58+
FROM ${DISTROLESS_IMAGE} AS production
5559
WORKDIR /
5660

5761
COPY --from=upx /output/manager .

‎fleetconfig-controller/build/Dockerfile.devspace‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ ARG OS
22
ARG ARCH
33
ARG PROVIDER
44

5+
ARG GO_BASE_IMAGE=golang:1.24.4-alpine3.22
6+
57
# Build the manager binary
6-
FROM golang:1.24.4-alpine3.22 AS builder
8+
FROM ${GO_BASE_IMAGE} AS builder
79
ARG OS
810
ARG ARCH
911
ARG PROVIDER

‎fleetconfig-controller/build/Dockerfile.eks‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@
33
ARG OS
44
ARG ARCH
55

6+
ARG GO_BASE_IMAGE=golang:1.24.4-alpine3.22
7+
ARG PYTHON_BASE_IMAGE=python:3.13-alpine
8+
ARG DISTROLESS_IMAGE=gcr.io/distroless/static:nonroot
9+
610
## Stage 1: Build the manager binary
7-
FROM golang:1.24.4-alpine3.22 AS builder
11+
FROM ${GO_BASE_IMAGE} AS builder
812
ARG OS
913
ARG ARCH
1014

@@ -27,7 +31,7 @@ COPY pkg/ pkg/
2731
RUN CGO_ENABLED=0 GOOS=${OS:-linux} GOARCH=${ARCH} go build -a -o manager cmd/main.go
2832

2933
## Stage 2: Install dependencies
30-
FROM golang:1.24.4-alpine3.22 AS dependencies
34+
FROM ${GO_BASE_IMAGE} AS dependencies
3135
ARG OS
3236
ARG ARCH
3337

@@ -44,7 +48,7 @@ RUN curl -Lo aws-iam-authenticator https://github.com/kubernetes-sigs/aws-iam-au
4448
mv aws-iam-authenticator /usr/local/bin/aws-iam-authenticator
4549

4650
## Stage 3: Compress binaries with upx to reduce image size
47-
FROM python:3.13-alpine AS upx
51+
FROM ${PYTHON_BASE_IMAGE} AS upx
4852
RUN apk update && apk add --no-cache upx
4953

5054
WORKDIR /output
@@ -59,7 +63,7 @@ RUN mkdir -p /output && \
5963

6064
## Stage 4: Finalize
6165

62-
FROM gcr.io/distroless/static:nonroot AS production
66+
FROM ${DISTROLESS_IMAGE} AS production
6367

6468
WORKDIR /
6569

‎fleetconfig-controller/build/Dockerfile.gke‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33
ARG OS
44
ARG ARCH
55

6+
ARG GO_BASE_IMAGE=golang:1.24.4-alpine3.22
7+
ARG PYTHON_BASE_IMAGE=python:3.13-alpine
8+
69
## Stage 1: Build the manager binary
7-
FROM golang:1.24.4-alpine3.22 AS builder
10+
FROM ${GO_BASE_IMAGE} AS builder
811
ARG OS
912
ARG ARCH
1013

@@ -27,7 +30,7 @@ COPY pkg/ pkg/
2730
RUN CGO_ENABLED=0 GOOS=${OS:-linux} GOARCH=${ARCH} go build -a -o manager cmd/main.go
2831

2932
## Stage 2: Install dependencies
30-
FROM golang:1.24.4-alpine3.22 AS dependencies
33+
FROM ${GO_BASE_IMAGE} AS dependencies
3134
ARG OS
3235
ARG ARCH
3336

@@ -38,7 +41,7 @@ ARG CLUSTERADM_VERSION=1.0.0
3841
RUN curl -L https://raw.githubusercontent.com/open-cluster-management-io/clusteradm/main/install.sh | bash -s -- ${CLUSTERADM_VERSION}
3942

4043
## Stage 3: Compress binaries with upx to reduce image size
41-
FROM python:3.13-alpine AS upx
44+
FROM ${PYTHON_BASE_IMAGE} AS upx
4245
RUN apk update && apk add --no-cache upx
4346

4447
WORKDIR /output
@@ -52,7 +55,7 @@ RUN mkdir -p /output && \
5255
## Stage 4: Finalize
5356

5457
# Use Python image instead of distroless to support gcloud
55-
FROM python:3.13-alpine AS production
58+
FROM ${PYTHON_BASE_IMAGE} AS production
5659
ARG OS
5760
ARG ARCH
5861

‎fleetconfig-controller/charts/fleetconfig-controller/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ Refer to the [Multicluster Controlplane configuration](https://github.com/open-c
111111
| `replicas` | fleetconfig-controller replica count | `1` |
112112
| `imageRegistry` | Image registry | `""` |
113113
| `image.repository` | Image repository | `quay.io/open-cluster-management/fleetconfig-controller` |
114-
| `image.tag` | Image tag | `v0.0.3` |
114+
| `image.tag` | Image tag | `v0.0.5` |
115115
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
116116
| `imagePullSecrets` | Image pull secrets | `[]` |
117117
| `serviceAccount.annotations` | Annotations to add to the service account | `{}` |

‎fleetconfig-controller/charts/fleetconfig-controller/values.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ imageRegistry: ""
247247
## @param image.pullPolicy Image pull policy
248248
image:
249249
repository: quay.io/open-cluster-management/fleetconfig-controller
250-
tag: v0.0.4
250+
tag: v0.0.5
251251
pullPolicy: IfNotPresent
252252

253253
## @param imagePullSecrets Image pull secrets

0 commit comments

Comments
 (0)