Skip to content
This repository has been archived by the owner on Jan 9, 2025. It is now read-only.

Commit

Permalink
[rel-v3.4.13] Build Multi-Arch Images 📦 (#19)
Browse files Browse the repository at this point in the history
* Add support for ARM64

* Let pipeline build multi-arch images

* Bump etcd-custom-image version
  • Loading branch information
timuthy authored Jul 8, 2022
1 parent 99908b2 commit fc0486b
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 4 deletions.
5 changes: 4 additions & 1 deletion .ci/pipeline_definitions
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ etcd-custom-image:
traits:
draft_release: ~
publish:
oci-builder: 'docker'
oci-builder: docker-buildx
platforms:
- linux/amd64
- linux/arm64
dockerimages:
etcd:
registry: 'gcr-readwrite'
Expand Down
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# SPDX-FileCopyrightText: 2020 SAP SE or an SAP affiliate company and Gardener contributors
# SPDX-License-Identifier: Apache-2.0

FROM gcr.io/etcd-development/etcd:v3.4.13 as source
FROM gcr.io/etcd-development/etcd:v3.4.13 as source-amd64
FROM gcr.io/etcd-development/etcd:v3.4.13-arm64 as source-arm64

FROM source-$TARGETARCH as source

FROM alpine:3.15.4

WORKDIR /
Expand Down
6 changes: 5 additions & 1 deletion Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# SPDX-FileCopyrightText: 2020 SAP SE or an SAP affiliate company and Gardener contributors
# SPDX-License-Identifier: Apache-2.0

FROM gcr.io/etcd-development/etcd:ETCD_VERSION as source
FROM gcr.io/etcd-development/etcd:ETCD_VERSION as source-amd64
FROM gcr.io/etcd-development/etcd:ETCD_VERSION as source-arm64

FROM source-$TARGETARCH as source

FROM alpine:3.15.4

WORKDIR /
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v3.4.13-bootstrap-5
v3.4.13-bootstrap-6
6 changes: 6 additions & 0 deletions etcd_bootstrap_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ trap_and_propagate() {
}

start_managed_etcd(){
arch=$(uname -m)
if [ $arch = "aarch64" ] || [ $arch = "arm64" ]; then
# Running etcd on ARM has experimental support for version 3.4.x
# https://etcd.io/docs/v3.4/op-guide/supported-platform/
export ETCD_UNSUPPORTED_ARCH=arm64
fi
rm -rf $VALIDATION_MARKER
CONFIG_FILE=/etc/etcd.conf.yaml
curl "$BACKUP_ENDPOINT/config" -o $CONFIG_FILE
Expand Down

0 comments on commit fc0486b

Please sign in to comment.