From 77a25e9c7bbaf29f068eb84045aad3da73a0b020 Mon Sep 17 00:00:00 2001 From: Uli Stein Date: Fri, 15 Sep 2023 09:11:31 +0200 Subject: [PATCH 1/2] feat(linux-yocto_5.15): add kernel config for k3s disable oabi compatibility it to solve seccomp conflict enable seccomp filter secccomp filter is needed for k3s to pawn pods --- .../recipes-kernel/linux/files/k3s_kernel_adaptions.cfg | 8 ++++++++ .../recipes-kernel/linux/linux-yocto_5.15.bbappend | 3 +++ 2 files changed, 11 insertions(+) create mode 100644 layers/meta-belden-coreos-bsp/recipes-kernel/linux/files/k3s_kernel_adaptions.cfg diff --git a/layers/meta-belden-coreos-bsp/recipes-kernel/linux/files/k3s_kernel_adaptions.cfg b/layers/meta-belden-coreos-bsp/recipes-kernel/linux/files/k3s_kernel_adaptions.cfg new file mode 100644 index 0000000..86731e5 --- /dev/null +++ b/layers/meta-belden-coreos-bsp/recipes-kernel/linux/files/k3s_kernel_adaptions.cfg @@ -0,0 +1,8 @@ +#this file contains the necssary kernel adaption that k3s an containerd require +#Reference +#k3s config check: https://raw.githubusercontent.com/k3s-io/k3s/master/contrib/util/check-config.sh +#container config check: https://raw.githubusercontent.com/moby/moby/master/contrib/check-config.sh +#these scripts are provided by moby and rancher +CONFIG_OABI_COMPAT=n +CONFIG_HAVE_ARCH_SECCOMP_FILTER=y +CONFIG_SECCOMP_FILTER=y diff --git a/layers/meta-belden-coreos-bsp/recipes-kernel/linux/linux-yocto_5.15.bbappend b/layers/meta-belden-coreos-bsp/recipes-kernel/linux/linux-yocto_5.15.bbappend index 913e80a..4f72e0b 100644 --- a/layers/meta-belden-coreos-bsp/recipes-kernel/linux/linux-yocto_5.15.bbappend +++ b/layers/meta-belden-coreos-bsp/recipes-kernel/linux/linux-yocto_5.15.bbappend @@ -1,3 +1,4 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" KMACHINE:vm-x64 ?= "common-pc-64" COMPATIBLE_MACHINE:vm-x64 = "vm-x64" @@ -11,3 +12,5 @@ COMPATIBLE_MACHINE:beaglebone = "beaglebone" LINUX_VERSION:beaglebone = "5.15.54" require ${@bb.utils.contains("COMBINED_FEATURES", "efi", "linux-yocto-coreos-efi.inc", "", d)} + +SRC_URI += " file://k3s_kernel_adaptions.cfg" From af33b55ec07b3d78cd5e2e2ea2e677b226a441a3 Mon Sep 17 00:00:00 2001 From: Uli Stein Date: Wed, 21 Jun 2023 13:23:04 +0200 Subject: [PATCH 2/2] feat(k3s): image that installs the k3s-agent the changed image is layers/meta-belden-coreos-demo/recipes-core/image/cores-image-demo-k3s k3s is a orchestration tool and a slimed down version of kubernetes k3s agent is a tool to control pods the commands come a k3s server in a cluster --- .../recipes-core/images/coreos-image-demo-k3s.bb | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 layers/meta-belden-coreos-demo/recipes-core/images/coreos-image-demo-k3s.bb diff --git a/layers/meta-belden-coreos-demo/recipes-core/images/coreos-image-demo-k3s.bb b/layers/meta-belden-coreos-demo/recipes-core/images/coreos-image-demo-k3s.bb new file mode 100644 index 0000000..a90c0b0 --- /dev/null +++ b/layers/meta-belden-coreos-demo/recipes-core/images/coreos-image-demo-k3s.bb @@ -0,0 +1,6 @@ +DESCRIPTION = "An image that includes k3s-agent" + +require recipes-core/images/coreos-image-all-features.bb + +IMAGE_INSTALL += "k3s-agent" +