All of lore.kernel.org
 help / color / mirror / Atom feed
From: Raphael Pavlidis <raphael.pavlidis@gmail.com>
To: buildroot@buildroot.org
Cc: Anisse Astier <anisse@astier.eu>,
	Raphael Pavlidis <raphael.pavlidis@gmail.com>
Subject: [Buildroot] [PATCH v3 1/1] package/cni-plugins: new package
Date: Sun,  4 Sep 2022 14:53:59 +0200	[thread overview]
Message-ID: <20220904125359.18844-1-raphael.pavlidis@gmail.com> (raw)
In-Reply-To: <20220616163309.5271-1-raphael.pavlidis@gmail.com>

cni-plugins contains some reference networking plugins, maintained by
the CNI team.

Signed-off-by: Raphael Pavlidis <raphael.pavlidis@gmail.com>
---
Changes v2 -> v3:
  - DEVELOPERS: add Raphael Pavlids for cni-plugins

Changes v1 -> v2:
  - change BR2_PACKAGE_CNI_PLUGINS from config to menuconfig
  - turn on all plugins by default

 DEVELOPERS                           |   3 +
 package/Config.in                    |   1 +
 package/cni-plugins/Config.in        | 108 +++++++++++++++++++++++++++
 package/cni-plugins/cni-plugins.hash |   3 +
 package/cni-plugins/cni-plugins.mk   |  77 +++++++++++++++++++
 5 files changed, 192 insertions(+)
 create mode 100644 package/cni-plugins/Config.in
 create mode 100644 package/cni-plugins/cni-plugins.hash
 create mode 100644 package/cni-plugins/cni-plugins.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index d2bd0d809a..208330881c 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2506,6 +2506,9 @@ F:	support/testing/tests/package/test_python_jmespath.py
 F:	support/testing/tests/package/test_python_rsa.py
 F:	support/testing/tests/package/test_python_s3transfer.py
 
+N:	Raphael Pavlidis <raphael.pavlidis@gmail.com>
+F:	package/cni-plugins/
+
 N:	Refik Tuzakli <tuzakli.refik@gmail.com>
 F:	package/freescale-imx/
 F:	package/paho-mqtt-cpp/
diff --git a/package/Config.in b/package/Config.in
index d1c098c48f..00e9a5a99f 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1812,6 +1812,7 @@ menu "Networking"
 	source "package/bluez5_utils-headers/Config.in"
 	source "package/c-ares/Config.in"
 	source "package/cgic/Config.in"
+	source "package/cni-plugins/Config.in"
 	source "package/cppzmq/Config.in"
 	source "package/curlpp/Config.in"
 	source "package/czmq/Config.in"
diff --git a/package/cni-plugins/Config.in b/package/cni-plugins/Config.in
new file mode 100644
index 0000000000..9ce13f4bbe
--- /dev/null
+++ b/package/cni-plugins/Config.in
@@ -0,0 +1,108 @@
+menuconfig BR2_PACKAGE_CNI_PLUGINS
+	bool "cni-plugins"
+	depends on BR2_PACKAGE_HOST_GO_TARGET_ARCH_SUPPORTS
+	depends on BR2_PACKAGE_HOST_GO_TARGET_CGO_LINKING_SUPPORTS
+	help
+	  Some reference and example networking plugins, maintained by the CNI team.
+
+	  https://github.com/containernetworking/plugins
+
+if BR2_PACKAGE_CNI_PLUGINS
+
+config BR2_PACKAGE_CNI_PLUGINS_BRIDGE
+	bool "bridge"
+	default y
+	help
+	  Creates a bridge, adds the host and the container to it.
+
+config BR2_PACKAGE_CNI_PLUGINS_IPVLAN
+	bool "ipvlan"
+	default y
+	help
+	  Adds an ipvlan interface in the container.
+
+config BR2_PACKAGE_CNI_PLUGINS_LOOPBACK
+	bool "loopback"
+	default y
+	help
+	  Set the state of loopback interface to up.
+
+config BR2_PACKAGE_CNI_PLUGINS_MACVLAN
+	bool "macvlan"
+	default y
+	help
+	  Creates a new MAC address, forwards all traffic to that to the container.
+
+config BR2_PACKAGE_CNI_PLUGINS_PTP
+	bool "ptp"
+	default y
+	help
+	  Creates a veth pair.
+
+config BR2_PACKAGE_CNI_PLUGINS_VLAN
+	bool "vlan"
+	default y
+	help
+	  Creates a veth pair.
+
+config BR2_PACKAGE_CNI_PLUGINS_HOST_DEVICE
+	bool "host-device"
+	default y
+	help
+	  Move an already-existing device into a container.
+
+config BR2_PACKAGE_CNI_PLUGINS_DHCP
+	bool "dhcp"
+	default y
+	help
+	  Runs a daemon on the host to make DHCP requests on behalf of the
+	  container.
+
+config BR2_PACKAGE_CNI_PLUGINS_HOST_LOCAL
+	bool "host-local"
+	default y
+	help
+	  Maintains a local database of allocated IPs.
+
+config BR2_PACKAGE_CNI_PLUGINS_STATIC
+	bool "static"
+	default y
+	help
+	  Allocate a single static IPv4/IPv6 address to container. It's useful in
+	  debugging purpose.
+
+config BR2_PACKAGE_CNI_PLUGINS_TUNING
+	bool "tuning"
+	default y
+	help
+	  Tweaks sysctl parameters of an existing interface.
+
+config BR2_PACKAGE_CNI_PLUGINS_PORTMAP
+	bool "portmap"
+	default y
+	help
+	  An iptables-based portmapping plugin. Maps ports from the host's address
+	  space to the container.
+
+config BR2_PACKAGE_CNI_PLUGINS_BANDWIDTH
+	bool "bandwidth"
+	default y
+	help
+	  Allows bandwidth-limiting through use of traffic control tbf
+	  (ingress/egress).
+
+config BR2_PACKAGE_CNI_PLUGINS_SBR
+	bool "sbr"
+	default y
+	help
+	  A plugin that configures source based routing for an interface (from which
+	  it is chained).
+
+config BR2_PACKAGE_CNI_PLUGINS_FIREWALL
+	bool "firewall"
+	default y
+	help
+	  A firewall plugin which uses iptables or firewalld to add rules to allow
+	  traffic to/from the container.
+
+endif # BR2_PACKAGE_CNI_PLUGINS
diff --git a/package/cni-plugins/cni-plugins.hash b/package/cni-plugins/cni-plugins.hash
new file mode 100644
index 0000000000..c987e1ff45
--- /dev/null
+++ b/package/cni-plugins/cni-plugins.hash
@@ -0,0 +1,3 @@
+# Locally computed:
+sha256  c86c44877c47f69cd23611e22029ab26b613f620195b76b3ec20f589367a7962  cni-plugins-1.1.1.tar.gz
+sha256  b40930bbcf80744c86c46a12bc9da056641d722716c378f5659b9e555ef833e1  LICENSE
diff --git a/package/cni-plugins/cni-plugins.mk b/package/cni-plugins/cni-plugins.mk
new file mode 100644
index 0000000000..02abcd283c
--- /dev/null
+++ b/package/cni-plugins/cni-plugins.mk
@@ -0,0 +1,77 @@
+################################################################################
+#
+# cni-plugins
+#
+################################################################################
+
+CNI_PLUGINS_VERSION = 1.1.1
+CNI_PLUGINS_SITE = $(call github,containernetworking,plugins,v$(CNI_PLUGINS_VERSION))
+CNI_PLUGINS_LICENSE = Apache-2.0
+CNI_PLUGINS_LICENSE_FILES = LICENSE
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_BRIDGE),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/main/bridge
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_IPVLAN),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/main/ipvlan
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_LOOPBACK),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/main/loopback
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_MACVLAN),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/main/macvlan
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_PTP),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/main/ptp
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_VLAN),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/main/vlan
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_HOST_DEVICE),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/main/host-device
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_DHCP),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/ipam/dhcp
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_HOST_LOCAL),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/ipam/host-local
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_STATIC),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/ipam/static
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_TUNING),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/meta/tuning
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_PORTMAP),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/meta/portmap
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_BANDWIDTH),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/meta/bandwidth
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_SBR),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/meta/sbr
+endif
+
+ifeq ($(BR2_PACKAGE_CNI_PLUGINS_FIREWALL),y)
+CNI_PLUGINS_BUILD_TARGETS += plugins/meta/firewall
+endif
+
+define CNI_PLUGINS_INSTALL_TARGET_CMDS
+	$(INSTALL) -d  $(TARGET_DIR)/usr/libexec/cni
+	$(INSTALL) -D -m 0755 $(@D)/bin/* $(TARGET_DIR)/usr/libexec/cni/
+endef
+
+$(eval $(golang-package))
-- 
2.35.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2022-09-04 12:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-16  8:43 [Buildroot] [PATCH v1 1/1] package/cni-plugins: new package Raphael Pavlidis via buildroot
2022-06-16 16:33 ` [Buildroot] [PATCH v2 " Raphael Pavlidis via buildroot
2022-09-04 12:53   ` Raphael Pavlidis [this message]
2022-09-04 19:06     ` [Buildroot] [PATCH v3 " Christian Stewart via buildroot
2022-09-10 18:33       ` Raphael Pavlidis
2023-02-07  9:03     ` Yann E. MORIN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220904125359.18844-1-raphael.pavlidis@gmail.com \
    --to=raphael.pavlidis@gmail.com \
    --cc=anisse@astier.eu \
    --cc=buildroot@buildroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.