Zun: add zun-cni-daemon image

Zun-cni-daemon is a new process for implementing CNI plugin for Zun.
It will be used by CRI runtime to connect podsandbox to neutron.
This image is based on the zun base image and includes additional
packages such as openvswitch.

Needed-By: https://review.opendev.org/#/c/708213/
Change-Id: Ic82c59a5e78078b4fea10df9d30b35da14cad922
changes/73/708273/18
Hongbin Lu 3 years ago
parent fe8820be56
commit 39820c4abb
  1. 40
      docker/zun/zun-cni-daemon/Dockerfile.j2
  2. 1
      docker/zun/zun-cni-daemon/zun_sudoers
  3. 5
      releasenotes/notes/add-zun-cni-daemon-image-842bf6d7ba804dda.yaml

@ -0,0 +1,40 @@
FROM {{ namespace }}/{{ image_prefix }}zun-base:{{ tag }}
{% block labels %}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"
{% endblock %}
{% block zun_cni_daemon_header %}{% endblock %}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/false
{% elif install_type == 'source' %}
{% if base_package_type == 'rpm' %}
{% set zun_cni_daemon_packages = [
'openvswitch'
] %}
{% elif base_package_type == 'deb' %}
{% set zun_cni_daemon_packages = [
'bridge-utils',
'openvswitch-switch'
] %}
{% endif %}
{{ macros.install_packages(zun_cni_daemon_packages | customizable("packages")) }}
{% endif %}
COPY zun_sudoers /etc/sudoers.d/kolla_zun_sudoers
RUN chmod 750 /etc/sudoers.d \
&& chmod 640 /etc/sudoers.d/kolla_zun_sudoers
{% block zun_cni_daemon_footer %}{% endblock %}
{% block footer %}{% endblock %}

@ -0,0 +1 @@
zun ALL=(root) NOPASSWD: /var/lib/kolla/venv/bin/zun-rootwrap /etc/zun/rootwrap.conf *

@ -0,0 +1,5 @@
---
features:
- |
Add support for building ``zun-cni-daemon``. This is a new daemon
for implementing CNI plugin for Zun.
Loading…
Cancel
Save