mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-14 13:45:06 +00:00
Merge pull request #37092 from linux-on-ibm-z/cross-s390x
Automatic merge from submit-queue [Part 1] Add support for cross-compiling s390x binaries <!-- Thanks for sending a pull request! Here are some tips for you: 1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md 2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md 3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes --> **What this PR does / why we need it**: The current release of Kubernetes support s390x architecture partly meaning we can build Kubernetes on s390x but while deploying Kubernetes it does not have required images pushed to gcr.io repository. This PR is to make Kubernetes docker images available for s390x architecture on gcr.io repository. This PR also enables s390x support to kube-dns , pause, addon-manager, etcd, hyperkube, kube-discovery etc. **Which issue this PR fixes** #34328 **Special notes for your reviewer**: In existing file "build-tools/build-image/cross/Dockerfile" the repository mentioned for installing cross build tool chains for supporting architecture does not have a tool chain for s390x hence in my PR I am changing the repository so that it will be cross compiled for s390x. **Release note**: <!-- Steps to write your release note: 1. Use the release-note-* labels to set the release note state (if you have access) 2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. --> ```release-note ```
This commit is contained in:
@@ -21,12 +21,14 @@ ENV GOARM 6
|
|||||||
ENV KUBE_DYNAMIC_CROSSPLATFORMS \
|
ENV KUBE_DYNAMIC_CROSSPLATFORMS \
|
||||||
armel \
|
armel \
|
||||||
arm64 \
|
arm64 \
|
||||||
|
s390x \
|
||||||
ppc64el
|
ppc64el
|
||||||
|
|
||||||
ENV KUBE_CROSSPLATFORMS \
|
ENV KUBE_CROSSPLATFORMS \
|
||||||
linux/386 \
|
linux/386 \
|
||||||
linux/arm linux/arm64 \
|
linux/arm linux/arm64 \
|
||||||
linux/ppc64le \
|
linux/ppc64le \
|
||||||
|
linux/s390x \
|
||||||
darwin/amd64 darwin/386 \
|
darwin/amd64 darwin/386 \
|
||||||
windows/amd64 windows/386
|
windows/amd64 windows/386
|
||||||
|
|
||||||
@@ -50,10 +52,9 @@ RUN mkdir -p /usr/local/src/protobuf \
|
|||||||
&& protoc --version
|
&& protoc --version
|
||||||
|
|
||||||
# Use dynamic cgo linking for architectures other than amd64 for the server platforms
|
# Use dynamic cgo linking for architectures other than amd64 for the server platforms
|
||||||
# More info here: https://wiki.debian.org/CrossToolchains
|
# To install crossbuild essential for other architectures add the following repository.
|
||||||
RUN echo "deb http://emdebian.org/tools/debian/ jessie main" > /etc/apt/sources.list.d/cgocrosscompiling.list \
|
RUN echo "deb http://archive.ubuntu.com/ubuntu xenial main universe" > /etc/apt/sources.list.d/cgocrosscompiling.list \
|
||||||
&& curl -s http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | apt-key add - \
|
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5 3B4FE6ACC0B21F32 \
|
||||||
&& for platform in ${KUBE_DYNAMIC_CROSSPLATFORMS}; do dpkg --add-architecture ${platform}; done \
|
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
&& apt-get install -y build-essential \
|
&& apt-get install -y build-essential \
|
||||||
&& for platform in ${KUBE_DYNAMIC_CROSSPLATFORMS}; do apt-get install -y crossbuild-essential-${platform}; done \
|
&& for platform in ${KUBE_DYNAMIC_CROSSPLATFORMS}; do apt-get install -y crossbuild-essential-${platform}; done \
|
||||||
|
@@ -1 +1 @@
|
|||||||
v1.7.4-0
|
v1.7.4-1
|
||||||
|
Reference in New Issue
Block a user