kubernetes: get it working on AArch64 as well

In past I disabled those images on non-x86 because had lot of other
things to do. Now it is time to get it running on aarch64 too.

Had to revert rename done in 5a530be776
so backward compatibility is broken ;(

Change-Id: I44160dfb1d151e97d473e6c13194e043657094a8
Partially-Implements: blueprint multiarch-and-arm64-containers
This commit is contained in:
Marcin Juszkiewicz 2017-05-11 18:52:10 +02:00 committed by Marcin Juszkiewicz
parent 27ab91b2ab
commit ad4784b54b
7 changed files with 33 additions and 20 deletions

View File

@ -3,9 +3,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
ENV KUBERNETES_COMPONENT=kube-apiserver ENV KUBERNETES_COMPONENT=kube-apiserver
{% block kube_apiserver_amd64_header %}{% endblock %} {% block kube_apiserver_header %}{% endblock %}
{% block kube_apiserver_amd64_install %} {% block kube_apiserver_install %}
RUN true \ RUN true \
&& curl -L ${KUBERNETES_DOWNLOAD_ROOT}/${KUBERNETES_COMPONENT} -o /usr/bin/${KUBERNETES_COMPONENT} \ && curl -L ${KUBERNETES_DOWNLOAD_ROOT}/${KUBERNETES_COMPONENT} -o /usr/bin/${KUBERNETES_COMPONENT} \
&& chmod +x /usr/bin/${KUBERNETES_COMPONENT} && chmod +x /usr/bin/${KUBERNETES_COMPONENT}
@ -15,5 +15,5 @@ RUN true \
ENTRYPOINT [] ENTRYPOINT []
CMD [] CMD []
{% block kube_apiserver_amd64_footer %}{% endblock %} {% block kube_apiserver_footer %}{% endblock %}
{% block footer %}{% endblock %} {% block footer %}{% endblock %}

View File

@ -3,14 +3,16 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
ENV KUBERNETES_VERSION=v1.5.4 ENV KUBERNETES_VERSION=v1.5.4
{% if base_arch != 'x86_64' %} {% if base_arch == 'x86_64' %}
ENV KUBE_ARCH=amd64
{% elif base_arch == 'aarch64' %}
ENV KUBE_ARCH=arm64
{% else %}
RUN echo 'Kubernetes images not yet available for {{ base_arch }}' \ RUN echo 'Kubernetes images not yet available for {{ base_arch }}' \
&& /bin/false && /bin/false
{% endif %} {% endif %}
ENV KUBERNETES_DOWNLOAD_ROOT=https://storage.googleapis.com/kubernetes-release/release/${KUBERNETES_VERSION}/bin/linux/amd64 ENV KUBERNETES_DOWNLOAD_ROOT=https://storage.googleapis.com/kubernetes-release/release/${KUBERNETES_VERSION}/bin/linux/${KUBE_ARCH}
{% block kube_base_header %}{% endblock %} {% block kube_base_header %}{% endblock %}

View File

@ -3,7 +3,7 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
ENV KUBERNETES_COMPONENT=kube-controller-manager ENV KUBERNETES_COMPONENT=kube-controller-manager
{% block kube_controller_manager_amd64_header %}{% endblock %} {% block kube_controller_manager_header %}{% endblock %}
{% import "macros.j2" as macros with context %} {% import "macros.j2" as macros with context %}
@ -18,7 +18,7 @@ ENV KUBERNETES_COMPONENT=kube-controller-manager
{% endif %} {% endif %}
{{ macros.install_packages(ceph_support_packages | customizable("packages")) }} {{ macros.install_packages(ceph_support_packages | customizable("packages")) }}
{% block kube_controller_manager_amd64_install %} {% block kube_controller_manager_install %}
RUN true \ RUN true \
&& curl -L ${KUBERNETES_DOWNLOAD_ROOT}/${KUBERNETES_COMPONENT} -o /usr/bin/${KUBERNETES_COMPONENT} \ && curl -L ${KUBERNETES_DOWNLOAD_ROOT}/${KUBERNETES_COMPONENT} -o /usr/bin/${KUBERNETES_COMPONENT} \
&& chmod +x /usr/bin/${KUBERNETES_COMPONENT} && chmod +x /usr/bin/${KUBERNETES_COMPONENT}
@ -28,5 +28,5 @@ RUN true \
ENTRYPOINT [] ENTRYPOINT []
CMD [] CMD []
{% block kube_controller_manager_amd64_footer %}{% endblock %} {% block kube_controller_manager_footer %}{% endblock %}
{% block footer %}{% endblock %} {% block footer %}{% endblock %}

View File

@ -3,9 +3,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
ENV KUBERNETES_COMPONENT=kube-discovery ENV KUBERNETES_COMPONENT=kube-discovery
{% block kube_discovery_amd64_header %}{% endblock %} {% block kube_discovery_header %}{% endblock %}
{% block kube_discovery_amd64_install %} {% block kube_discovery_install %}
# To match upstream we load the binary to /usr/local/bin # To match upstream we load the binary to /usr/local/bin
RUN true \ RUN true \
&& curl -L ${KUBERNETES_DOWNLOAD_ROOT}/${KUBERNETES_COMPONENT} -o /usr/local/bin/${KUBERNETES_COMPONENT} \ && curl -L ${KUBERNETES_DOWNLOAD_ROOT}/${KUBERNETES_COMPONENT} -o /usr/local/bin/${KUBERNETES_COMPONENT} \
@ -16,5 +16,5 @@ RUN true \
ENTRYPOINT [] ENTRYPOINT []
CMD [] CMD []
{% block kube_discovery_amd64_footer %}{% endblock %} {% block kube_discovery_footer %}{% endblock %}
{% block footer %}{% endblock %} {% block footer %}{% endblock %}

View File

@ -3,9 +3,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
ENV KUBERNETES_COMPONENT=kube-proxy ENV KUBERNETES_COMPONENT=kube-proxy
{% block kube_proxy_amd64_header %}{% endblock %} {% block kube_proxy_header %}{% endblock %}
{% block kube_proxy_amd64_install %} {% block kube_proxy_install %}
RUN true \ RUN true \
&& curl -L ${KUBERNETES_DOWNLOAD_ROOT}/${KUBERNETES_COMPONENT} -o /usr/bin/${KUBERNETES_COMPONENT} \ && curl -L ${KUBERNETES_DOWNLOAD_ROOT}/${KUBERNETES_COMPONENT} -o /usr/bin/${KUBERNETES_COMPONENT} \
&& chmod +x /usr/bin/${KUBERNETES_COMPONENT} && chmod +x /usr/bin/${KUBERNETES_COMPONENT}
@ -15,5 +15,5 @@ RUN true \
ENTRYPOINT [] ENTRYPOINT []
CMD [] CMD []
{% block kube_proxy_amd64_footer %}{% endblock %} {% block kube_proxy_footer %}{% endblock %}
{% block footer %}{% endblock %} {% block footer %}{% endblock %}

View File

@ -3,9 +3,9 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
ENV KUBERNETES_COMPONENT=kube-scheduler ENV KUBERNETES_COMPONENT=kube-scheduler
{% block kube_scheduler_amd64_header %}{% endblock %} {% block kube_scheduler_header %}{% endblock %}
{% block kube_scheduler_amd64_install %} {% block kube_scheduler_install %}
RUN true \ RUN true \
&& curl -L ${KUBERNETES_DOWNLOAD_ROOT}/${KUBERNETES_COMPONENT} -o /usr/bin/${KUBERNETES_COMPONENT} \ && curl -L ${KUBERNETES_DOWNLOAD_ROOT}/${KUBERNETES_COMPONENT} -o /usr/bin/${KUBERNETES_COMPONENT} \
&& chmod +x /usr/bin/${KUBERNETES_COMPONENT} && chmod +x /usr/bin/${KUBERNETES_COMPONENT}
@ -15,5 +15,5 @@ RUN true \
ENTRYPOINT [] ENTRYPOINT []
CMD [] CMD []
{% block kube_scheduler_amd64_footer %}{% endblock %} {% block kube_scheduler_footer %}{% endblock %}
{% block footer %}{% endblock %} {% block footer %}{% endblock %}

View File

@ -0,0 +1,11 @@
---
features:
- |
Kubernetes images can be now built also for aarch64 architecture.
issues:
- |
Kubernetes images got renamed - "_amd64" suffix was dropped.
upgrade:
- |
Kubernetes images got renamed - "_amd64" suffix was dropped so upgrade path
may need special care.