From 0133fd1b1ab45b73994bf3bd680cc6133ad81c3e Mon Sep 17 00:00:00 2001 From: Paul Bourke Date: Mon, 20 Feb 2017 16:09:11 +0000 Subject: [PATCH] Add header/footer blocks to the kube images Allow operators to customise these using the usual Kolla mechanisms. Change-Id: I59d5eae43fb12f8301b26f5b693c104fca635762 --- docker/kube/kube-apiserver-amd64/Dockerfile.j2 | 5 +++++ docker/kube/kube-base/Dockerfile.j2 | 4 ++++ docker/kube/kube-controller-manager-amd64/Dockerfile.j2 | 5 +++++ docker/kube/kube-discovery-amd64/Dockerfile.j2 | 5 +++++ docker/kube/kube-proxy-amd64/Dockerfile.j2 | 5 +++++ docker/kube/kube-scheduler-amd64/Dockerfile.j2 | 5 +++++ 6 files changed, 29 insertions(+) diff --git a/docker/kube/kube-apiserver-amd64/Dockerfile.j2 b/docker/kube/kube-apiserver-amd64/Dockerfile.j2 index 9edd42a5e6..ab23dcfa22 100644 --- a/docker/kube/kube-apiserver-amd64/Dockerfile.j2 +++ b/docker/kube/kube-apiserver-amd64/Dockerfile.j2 @@ -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 %} diff --git a/docker/kube/kube-base/Dockerfile.j2 b/docker/kube/kube-base/Dockerfile.j2 index db183171b3..be5a40c0c2 100644 --- a/docker/kube/kube-base/Dockerfile.j2 +++ b/docker/kube/kube-base/Dockerfile.j2 @@ -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 %} diff --git a/docker/kube/kube-controller-manager-amd64/Dockerfile.j2 b/docker/kube/kube-controller-manager-amd64/Dockerfile.j2 index 713778c8e1..2523244262 100644 --- a/docker/kube/kube-controller-manager-amd64/Dockerfile.j2 +++ b/docker/kube/kube-controller-manager-amd64/Dockerfile.j2 @@ -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 %} diff --git a/docker/kube/kube-discovery-amd64/Dockerfile.j2 b/docker/kube/kube-discovery-amd64/Dockerfile.j2 index 37e5d14dc6..6816891dc5 100644 --- a/docker/kube/kube-discovery-amd64/Dockerfile.j2 +++ b/docker/kube/kube-discovery-amd64/Dockerfile.j2 @@ -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 %} diff --git a/docker/kube/kube-proxy-amd64/Dockerfile.j2 b/docker/kube/kube-proxy-amd64/Dockerfile.j2 index 7eafe8fcdb..898d6705ac 100644 --- a/docker/kube/kube-proxy-amd64/Dockerfile.j2 +++ b/docker/kube/kube-proxy-amd64/Dockerfile.j2 @@ -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 %} diff --git a/docker/kube/kube-scheduler-amd64/Dockerfile.j2 b/docker/kube/kube-scheduler-amd64/Dockerfile.j2 index 7009b396f5..8a6043a508 100644 --- a/docker/kube/kube-scheduler-amd64/Dockerfile.j2 +++ b/docker/kube/kube-scheduler-amd64/Dockerfile.j2 @@ -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 %}