18db649943
This commit implements kuryr-daemon support when KURYR_K8S_CONTAINERIZED_DEPLOYMENT=True. It's done by: * CNI docker image installs Kuryr-Kubernetes pip package and adds exectution of kuryr-daemon into entrypoint script. * Hosts /proc and /var/run/openvswitch are mounted into the CNI container. * Code is changed to use /host_proc instead of /proc when in a container (it's impossible to mount host's /proc into container's /proc). Implements: blueprint cni-split-exec-daemon Change-Id: I9155a2cba28f578cee129a4c40066209f7ab543d
27 lines
872 B
Docker
27 lines
872 B
Docker
FROM centos:7
|
|
LABEL authors="Antoni Segura Puimedon<toni@kuryr.org>, Vikas Choudhary<vichoudh@redhat.com>"
|
|
|
|
COPY . /opt/kuryr-kubernetes
|
|
|
|
RUN yum install -y epel-release https://rdoproject.org/repos/rdo-release.rpm \
|
|
&& yum install -y --setopt=tsflags=nodocs python-pip iproute bridge-utils openvswitch \
|
|
&& yum install -y --setopt=tsflags=nodocs gcc python-devel git \
|
|
&& cd /opt/kuryr-kubernetes \
|
|
&& pip install --no-cache-dir . \
|
|
&& rm -fr .git \
|
|
&& yum -y history undo last
|
|
|
|
COPY kuryr-cni /kuryr-cni
|
|
COPY kuryr-cni-bin /kuryr-cni-bin
|
|
COPY cni_ds_init /usr/bin/cni_ds_init
|
|
|
|
ARG CNI_CONFIG_DIR_PATH=/etc/cni/net.d
|
|
ENV CNI_CONFIG_DIR_PATH ${CNI_CONFIG_DIR_PATH}
|
|
ARG CNI_BIN_DIR_PATH=/opt/cni/bin
|
|
ENV CNI_BIN_DIR_PATH ${CNI_BIN_DIR_PATH}
|
|
ARG CNI_DAEMON=False
|
|
ENV CNI_DAEMON ${CNI_DAEMON}
|
|
|
|
VOLUME [ "/sys/fs/cgroup" ]
|
|
ENTRYPOINT [ "cni_ds_init" ]
|