[PATCH] k3s: Add missing IP Virtual Server (ip_vs) feature to the kernel config


Richard Neill
 

K3s (and Kubernetes) supports load balancing via IPVS, and by default rep=
orts
errors when IPVS kernel modules cannot be loaded.

This patch adds the missing reported kernel modules to the k3s recipe, an=
d
orders the kernel module list alphabetically:

* ip-vs
* ip-vs-rr
* ip-vs-wrr
* ip-vs-sh

The modules are configured by including the ip_vs kernel feature.

Signed-off-by: Richard Neill <richard.neill@...>
---
recipes-containers/k3s/k3s_git.bb | 22 +++++++++++--------
.../linux/linux-yocto/kubernetes.scc | 1 +
2 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/recipes-containers/k3s/k3s_git.bb b/recipes-containers/k3s/k=
3s_git.bb
index e2a3ffc..0b56e3c 100644
--- a/recipes-containers/k3s/k3s_git.bb
+++ b/recipes-containers/k3s/k3s_git.bb
@@ -2690,20 +2690,24 @@ RDEPENDS:${PN}-server =3D "${PN}"
RDEPENDS:${PN}-agent =3D "${PN}"

RRECOMMENDS:${PN} =3D "\
+ kernel-module-ip-vs \
+ kernel-module-ip-vs-rr \
+ kernel-module-ip-vs-sh \
+ kernel-module-ip-vs-wrr \
+ kernel-module-nfnetlink-log \
+ kernel-module-vxlan \
kernel-module-xt-addrtype \
- kernel-module-xt-nat \
- kernel-module-xt-multiport \
- kernel-module-xt-conntrack \
kernel-module-xt-comment \
- kernel-module-xt-mark \
kernel-module-xt-connmark \
- kernel-module-vxlan \
+ kernel-module-xt-conntrack \
+ kernel-module-xt-limit \
+ kernel-module-xt-mark \
kernel-module-xt-masquerade \
- kernel-module-xt-statistic \
- kernel-module-xt-physdev \
+ kernel-module-xt-multiport \
+ kernel-module-xt-nat \
kernel-module-xt-nflog \
- kernel-module-xt-limit \
- kernel-module-nfnetlink-log \
+ kernel-module-xt-physdev \
+ kernel-module-xt-statistic \
"

RCONFLICTS:${PN} =3D "kubectl"
diff --git a/recipes-kernel/linux/linux-yocto/kubernetes.scc b/recipes-ke=
rnel/linux/linux-yocto/kubernetes.scc
index 1e93b70..a94ae84 100644
--- a/recipes-kernel/linux/linux-yocto/kubernetes.scc
+++ b/recipes-kernel/linux/linux-yocto/kubernetes.scc
@@ -1,2 +1,3 @@
include docker.scc
+include cgl/cfg/net/ip_vs.scc
kconf non-hardware kubernetes.cfg
--
2.25.1

Join meta-virtualization@lists.yoctoproject.org to automatically receive all group messages.