Add header/footer blocks to the kube images

Allow operators to customise these using the usual Kolla mechanisms.

Change-Id: I59d5eae43fb12f8301b26f5b693c104fca635762
This commit is contained in:
Paul Bourke 2017-02-20 16:09:11 +00:00 committed by Paul Bourke (pbourke)
parent 796e92035c
commit 0133fd1b1a
6 changed files with 29 additions and 0 deletions

View File

@ -3,6 +3,8 @@ MAINTAINER {{ maintainer }}
ENV KUBERNETES_COMPONENT=kube-apiserver
{% block kube_apiserver_amd64_header %}{% endblock %}
RUN true \
&& curl -L ${KUBERNETES_DOWNLOAD_ROOT}/${KUBERNETES_COMPONENT} -o /usr/bin/${KUBERNETES_COMPONENT} \
&& chmod +x /usr/bin/${KUBERNETES_COMPONENT}
@ -10,3 +12,6 @@ RUN true \
# Clear any customisation by Kolla to entrypoint & command
ENTRYPOINT []
CMD []
{% block kube_apiserver_amd64_footer %}{% endblock %}
{% block footer %}{% endblock %}

View File

@ -4,3 +4,7 @@ MAINTAINER {{ maintainer }}
ENV KUBERNETES_VERSION=v1.5.1
ENV KUBERNETES_DOWNLOAD_ROOT=https://storage.googleapis.com/kubernetes-release/release/${KUBERNETES_VERSION}/bin/linux/amd64
{% block kube_base_header %}{% endblock %}
{% block kube_base_footer %}{% endblock %}

View File

@ -3,6 +3,8 @@ MAINTAINER {{ maintainer }}
ENV KUBERNETES_COMPONENT=kube-controller-manager
{% block kube_controller_manager_amd64_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}
@ -23,3 +25,6 @@ RUN true \
# Clear any customisation by Kolla to entrypoint & command
ENTRYPOINT []
CMD []
{% block kube_controller_manager_amd64_footer %}{% endblock %}
{% block footer %}{% endblock %}

View File

@ -3,6 +3,8 @@ MAINTAINER {{ maintainer }}
ENV KUBERNETES_COMPONENT=kube-discovery
{% block kube_discovery_amd64_header %}{% endblock %}
# To match upstream we load the binary to /usr/local/bin
RUN true \
&& curl -L ${KUBERNETES_DOWNLOAD_ROOT}/${KUBERNETES_COMPONENT} -o /usr/local/bin/${KUBERNETES_COMPONENT} \
@ -11,3 +13,6 @@ RUN true \
# Clear any customisation by Kolla to entrypoint & command
ENTRYPOINT []
CMD []
{% block kube_discovery_amd64_footer %}{% endblock %}
{% block footer %}{% endblock %}

View File

@ -3,6 +3,8 @@ MAINTAINER {{ maintainer }}
ENV KUBERNETES_COMPONENT=kube-proxy
{% block kube_proxy_amd64_header %}{% endblock %}
RUN true \
&& curl -L ${KUBERNETES_DOWNLOAD_ROOT}/${KUBERNETES_COMPONENT} -o /usr/bin/${KUBERNETES_COMPONENT} \
&& chmod +x /usr/bin/${KUBERNETES_COMPONENT}
@ -10,3 +12,6 @@ RUN true \
# Clear any customisation by Kolla to entrypoint & command
ENTRYPOINT []
CMD []
{% block kube_proxy_amd64_footer %}{% endblock %}
{% block footer %}{% endblock %}

View File

@ -3,6 +3,8 @@ MAINTAINER {{ maintainer }}
ENV KUBERNETES_COMPONENT=kube-scheduler
{% block kube_scheduler_amd64_header %}{% endblock %}
RUN true \
&& curl -L ${KUBERNETES_DOWNLOAD_ROOT}/${KUBERNETES_COMPONENT} -o /usr/bin/${KUBERNETES_COMPONENT} \
&& chmod +x /usr/bin/${KUBERNETES_COMPONENT}
@ -10,3 +12,6 @@ RUN true \
# Clear any customisation by Kolla to entrypoint & command
ENTRYPOINT []
CMD []
{% block kube_scheduler_amd64_footer %}{% endblock %}
{% block footer %}{% endblock %}