Skip to content

Commit c168294

Browse files
Merge pull request #483 from furkatgofurov7/remove-unneccesary-archs
feat: Improvements to make image buildings faster
2 parents fda4dd3 + e200841 commit c168294

File tree

13 files changed

+14
-27
lines changed

13 files changed

+14
-27
lines changed

.devcontainer/devcontainer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// Features to add to the dev container. More info: https://containers.dev/features.
88
"features": {
99
"ghcr.io/devcontainers/features/go:1": {
10-
"version": "1.21"
10+
"version": "1.22"
1111
},
1212
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
1313
"ghcr.io/mpriscella/features/kind:1": {},

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
- uses: actions/checkout@v4
1111
- uses: actions/setup-go@v5
1212
with:
13-
go-version: '1.21'
13+
go-version: '1.22'
1414
check-latest: true
1515
cache: true
1616
- name: Verify

.github/workflows/e2e-test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: Install Go
3232
uses: actions/setup-go@v5
3333
with:
34-
go-version: 1.21.x
34+
go-version: 1.22.x
3535
- name: Build e2e image
3636
run: make e2e-image
3737
- uses: actions/[email protected]

.github/workflows/e2e.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: Install Go
3535
uses: actions/setup-go@v5
3636
with:
37-
go-version: 1.21.x
37+
go-version: 1.22.x
3838
- name: Setup kind
3939
uses: helm/[email protected]
4040
with:

.github/workflows/golangci-lint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- uses: actions/checkout@v4
2020
- uses: actions/setup-go@v5
2121
with:
22-
go-version: 1.21.8
22+
go-version: 1.22.8
2323
- name: golangci-lint
2424
uses: golangci/[email protected]
2525
with:

.github/workflows/lint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ jobs:
1515
- uses: actions/checkout@v4
1616
- uses: actions/setup-go@v5
1717
with:
18-
go-version: 1.21.8
18+
go-version: 1.22.8
1919
- name: Lint
2020
run: make lint

.github/workflows/release.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: setupGo
2626
uses: actions/setup-go@v5
2727
with:
28-
go-version: '=1.21.8'
28+
go-version: '=1.22.8'
2929
- name: Docker login ghcr.io
3030
uses: docker/login-action@v3
3131
with:
@@ -62,7 +62,7 @@ jobs:
6262
- name: setupGo
6363
uses: actions/setup-go@v5
6464
with:
65-
go-version: '=1.21.8'
65+
go-version: '=1.22.8'
6666
- name: Update manifests
6767
run: |
6868
make release RELEASE_TAG=${{ env.TAG }} REGISTRY=${{ env.GHCR_REGISTRY }}

.golangci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Options for analysis running.
22
run:
3-
go: "1.21"
3+
go: "1.22"
44
skip-files:
55
- "zz_generated.*\\.go$"
66
- "conversion\\.go"

Dockerfile

-9
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,6 @@ ARG goproxy=https://proxy.golang.org
1616
# Run this with docker build --build-arg package=./controlplane or --build-arg package=./bootstrap
1717
ENV GOPROXY=$goproxy
1818

19-
# Copy the Go Modules manifests
20-
COPY go.mod go.mod
21-
COPY go.sum go.sum
22-
23-
# Cache deps before building and copying source so that we don't need to re-download as much
24-
# and so that source changes don't invalidate our downloaded layer
25-
RUN --mount=type=cache,target=/go/pkg/mod \
26-
go mod download
27-
2819
# Copy the sources
2920
COPY ./ ./
3021

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ SHELL = /usr/bin/env bash -o pipefail
1313
#
1414
# Go.
1515
#
16-
GO_VERSION ?= 1.22.0
16+
GO_VERSION ?= 1.22.8
1717
GO_CONTAINER_IMAGE ?= docker.io/library/golang:$(GO_VERSION)
1818

1919
# Use GOPROXY environment variable if set
@@ -113,8 +113,8 @@ GH := $(abspath $(TOOLS_BIN_DIR)/$(GH_BIN))
113113
# Registry / images
114114
TAG ?= dev
115115
ARCH ?= $(shell go env GOARCH)
116-
ALL_ARCH = amd64 arm arm64 ppc64le s390x
117-
TARGET_PLATFORMS := linux/amd64,linux/arm64,linux/arm,linux/ppc64le,linux/s390x
116+
ALL_ARCH = amd64 arm64
117+
TARGET_PLATFORMS := linux/amd64,linux/arm64
118118
MACHINE := cluster-api-provider-rke2
119119
REGISTRY ?= ghcr.io
120120
ORG ?= rancher

examples/docker/air-gapped/image-building/files/install.sh

-4
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,6 @@ setup_arch() {
165165
ARCH=amd64
166166
SUFFIX=$(uname -s | tr '[:upper:]' '[:lower:]')-${ARCH}
167167
;;
168-
s390x)
169-
ARCH=s390x
170-
SUFFIX=$(uname -s | tr '[:upper:]' '[:lower:]')-${ARCH}
171-
;;
172168
*)
173169
fatal "unsupported architecture ${ARCH}"
174170
;;

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/rancher/cluster-api-provider-rke2
22

3-
go 1.21
3+
go 1.22
44

55
require (
66
github.com/blang/semver/v4 v4.0.0

hack/tools/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/rancher/cluster-api-provider-rke2/hack/tools
22

3-
go 1.22.6
3+
go 1.22.8
44

55
require sigs.k8s.io/cluster-api/hack/tools v0.0.0-20240820112706-3abe3058a6a8
66

0 commit comments

Comments
 (0)