Skip to content

Commit

Permalink
chore: Support build on s390x and ppc64le (follow argoproj#6441) (arg…
Browse files Browse the repository at this point in the history
…oproj#8890)

* Support build on s390x and ppc64le

Signed-off-by: Sam Ding <[email protected]>
  • Loading branch information
samding01 authored Apr 22, 2022
1 parent e5e3b0f commit b760a27
Show file tree
Hide file tree
Showing 20 changed files with 26 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
IMAGE_PLATFORMS=linux/amd64
if [[ "${{ github.event_name }}" == "push" || "${{ contains(github.event.pull_request.labels.*.name, 'test-arm-image') }}" == "true" ]]
then
IMAGE_PLATFORMS=linux/amd64,linux/arm64
IMAGE_PLATFORMS=linux/amd64,linux/arm64,linux/s390x,linux/ppc64le
fi
echo "Building image for platforms: $IMAGE_PLATFORMS"
docker buildx build --platform $IMAGE_PLATFORMS --push="${{ github.event_name == 'push' }}" \
Expand Down
2 changes: 2 additions & 0 deletions hack/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ ARCHITECTURE=""
case $(uname -m) in
x86_64) ARCHITECTURE="amd64" ;;
arm64) ARCHITECTURE="arm64" ;;
ppc64le) ARCHITECTURE="ppc64le" ;;
s390x) ARCHITECTURE="s390x" ;;
arm|armv7l|armv8l|aarch64) dpkg --print-architecture | grep -q "arm64" && ARCHITECTURE="arm64" || ARCHITECTURE="arm" ;;
esac

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4e4df66130bb46ab4aa21e01b24f93276dbd6ee6cf4f03218a328f1a79f5cb34 helm-v2.17.0-linux-ppc64le.tar.gz
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0a77b6e70a549a09f044ad8abc96eb125338d9e189749e9b97315cec6a519346 helm-v2.17.0-linux-s390x.tar.gz
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5070fa5188e7bc798dd54bc1ea9fc4cda623d9ff45eedb05ec93db234309f391 helm-v3.8.0-linux-ppc64le.tar.gz
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f8088ea57290fcc0aae50e2075c1adc258247cdf55169e9a9ca7762a64f558db helm-v3.8.0-linux-s390x.tar.gz
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7ab60a643fb7dd06f13209d85782623d817f3e8361b96e39b9949932f264ea86 helm-v3.8.1-linux-ppc64le.tar.gz
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9eb564cdf4e5f4868c7abf790d4ac23ac2babc3f0c0eda7109259e21d43f8a83 helm-v3.8.1-linux-s390x.tar.gz
1 change: 1 addition & 0 deletions hack/installers/checksums/kubectl_ppc64le_1.17.8.sha256
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4600cc0103f8573fe326a3c80208cc8c948ba2b8b2855da2a242376ce855b9c9 kubectl_ppc64le_1.17.8
1 change: 1 addition & 0 deletions hack/installers/checksums/kubectl_s390x_1.17.8.sha256
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bc409f75082a0d081cecef2287914ca9990b9c71d199e0cdcc052333a7bc4835 kubectl_s390x_1.17.8
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
afa1747c21df0d5e5d7cf3f4ddaaeae0b51cfbb6724be2aa515030145daf7003 kustomize_4.4.1_linux_ppc64le.tar.gz
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
13bd9492d12c0591d6fcc0ee939e0e69c0aecd8648a6047f442e54eae5af6c80 kustomize_4.4.1_linux_s390x.tar.gz
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
e8f34f40ab548c977cc434f27f6d64416d00d809d98d7da2ccd53c4fa8f9c450 protoc_3.17.3_linux_ppc64le.zip
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1f6b42a88277ce779257e98a10d7b46241a69973d0ed28e58151da7e3085bb2e protoc_3.17.3_linux_s390x.zip
2 changes: 1 addition & 1 deletion hack/installers/install-codegen-tools.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
set -eux -o pipefail

KUSTOMIZE_VERSION=4.2.0 "$(dirname $0)/../install.sh" kustomize protoc
KUSTOMIZE_VERSION=4.4.1 "$(dirname $0)/../install.sh" kustomize protoc
2 changes: 1 addition & 1 deletion hack/installers/install-kustomize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ fi
# v3.2.1 = https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v3.2.1/kustomize_kustomize.v3.2.1_linux_amd64
# v3.3.0 = https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v3.3.0/kustomize_v3.3.0_linux_amd64.tar.gz
case $ARCHITECTURE in
arm|arm64)
arm|arm64|s390x|ppc64le)
export TARGET_FILE=kustomize_${KUSTOMIZE_VERSION}_${INSTALL_OS}_${ARCHITECTURE}.tar.gz
URL=https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v${KUSTOMIZE_VERSION}/kustomize_v${KUSTOMIZE_VERSION}_${INSTALL_OS}_$ARCHITECTURE.tar.gz
BINNAME=kustomize
Expand Down
6 changes: 6 additions & 0 deletions hack/installers/install-protoc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ case $OS in
arm64|arm)
protoc_arch=aarch_64
;;
s390x)
protoc_arch=s390_64
;;
ppc64le)
protoc_arch=ppcle_64
;;
*)
protoc_arch=x86_64
;;
Expand Down
3 changes: 0 additions & 3 deletions manifests/ha/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10110,7 +10110,6 @@ spec:
apiVersion: v1
kind: Service
metadata:
annotations: null
labels:
app.kubernetes.io/component: redis
app.kubernetes.io/name: argocd-redis-ha
Expand Down Expand Up @@ -10212,7 +10211,6 @@ spec:
apiVersion: v1
kind: Service
metadata:
annotations: null
labels:
app.kubernetes.io/component: redis
app.kubernetes.io/name: argocd-redis-ha-haproxy
Expand Down Expand Up @@ -11225,7 +11223,6 @@ spec:
apiVersion: apps/v1
kind: StatefulSet
metadata:
annotations: {}
labels:
app.kubernetes.io/component: redis
app.kubernetes.io/name: argocd-redis-ha
Expand Down
3 changes: 0 additions & 3 deletions manifests/ha/namespace-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,6 @@ spec:
apiVersion: v1
kind: Service
metadata:
annotations: null
labels:
app.kubernetes.io/component: redis
app.kubernetes.io/name: argocd-redis-ha
Expand Down Expand Up @@ -1136,7 +1135,6 @@ spec:
apiVersion: v1
kind: Service
metadata:
annotations: null
labels:
app.kubernetes.io/component: redis
app.kubernetes.io/name: argocd-redis-ha-haproxy
Expand Down Expand Up @@ -2149,7 +2147,6 @@ spec:
apiVersion: apps/v1
kind: StatefulSet
metadata:
annotations: {}
labels:
app.kubernetes.io/component: redis
app.kubernetes.io/name: argocd-redis-ha
Expand Down
5 changes: 3 additions & 2 deletions test/container/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM redis:6.2.6 as redis

FROM node:12.18.4 as node
FROM node:12.18.4-buster as node

FROM golang:1.18 as golang

FROM registry:2.7.1 as registry
FROM registry:2.8 as registry

FROM ubuntu:21.10

Expand All @@ -22,6 +22,7 @@ RUN apt-get update && apt-get install --fix-missing -y \
make \
wget \
gcc \
g++ \
sudo \
tini \
zip && \
Expand Down

0 comments on commit b760a27

Please sign in to comment.