Paul Bourke d0f84b491c Allow full customisation of kube image binaries
The location of the binaries in these images can be overridden by
setting ENV in the header blocks, but if an operator wants to use a
different install method all together (e.g. rpm), these blocks will
allow that.

Also import the macros in kube-base to allow their use in overrides.

Change-Id: I3e52e315f0103d8a1c95d4489fa3841900fdff75
2017-02-22 12:23:39 +00:00

33 lines
991 B
Django/Jinja

FROM {{ namespace }}/{{ image_prefix }}kube-base:{{ tag }}
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'] %}
{% set ceph_support_packages = [
'ceph-common'
] %}
{% elif base_distro in ['ubuntu', 'debian'] %}
{% set ceph_support_packages = [
'ceph-common'
] %}
{% endif %}
{{ macros.install_packages(ceph_support_packages | customizable("packages")) }}
{% block kube_controller_manager_amd64_install %}
RUN true \
&& curl -L ${KUBERNETES_DOWNLOAD_ROOT}/${KUBERNETES_COMPONENT} -o /usr/bin/${KUBERNETES_COMPONENT} \
&& chmod +x /usr/bin/${KUBERNETES_COMPONENT}
{% endblock %}
# Clear any customisation by Kolla to entrypoint & command
ENTRYPOINT []
CMD []
{% block kube_controller_manager_amd64_footer %}{% endblock %}
{% block footer %}{% endblock %}