From 0115e61cdd5fe8c705bb0350a0d75ebebcf84c79 Mon Sep 17 00:00:00 2001 From: Changqing Li Date: Thu, 12 Jun 2025 13:59:03 +0800 Subject: [PATCH] kubernetes: rename CNI_NETWORKING_FILES Rename CNI_NETWORKING_FILES to 00_cni-containerd-net.conflist. According to the following k8s doc, k8s networking file will be used when both containerd-cni and kubernetes-cni both installed. "If there are multiple CNI configuration files in the directory, the kubelet uses the configuration file that comes first by name in lexicographic order." This commit can fix following issue: PACKAGE_CLASSES = "package_deb" do_rootfs failed with error: dpkg: error processing archive /path/to/oe-rootfs-repo/corei7-64/./kubernetes-cni_v1.32.0+git0+5fe148234f_release-r0.deb (--unpack): trying to overwrite '/etc/cni/net.d/cni-containerd-net.conflist', which is also in package containerd-cni v2.0.5-r0 Refer [1], "--no-force-overwrite" is set for dpkg, so above error occurred. [1] https://git.openembedded.org/openembedded-core/commit/?id=cb95ba079960411775c57ab864d266e15a6292d1 Signed-off-by: Changqing Li --- ...containerd-net.conflist => 00_cni-containerd-net.conflist} | 0 recipes-containers/kubernetes/kubernetes_git.bb | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) rename recipes-containers/kubernetes/kubernetes/{cni-containerd-net.conflist => 00_cni-containerd-net.conflist} (100%) diff --git a/recipes-containers/kubernetes/kubernetes/cni-containerd-net.conflist b/recipes-containers/kubernetes/kubernetes/00_cni-containerd-net.conflist similarity index 100% rename from recipes-containers/kubernetes/kubernetes/cni-containerd-net.conflist rename to recipes-containers/kubernetes/kubernetes/00_cni-containerd-net.conflist diff --git a/recipes-containers/kubernetes/kubernetes_git.bb b/recipes-containers/kubernetes/kubernetes_git.bb index fea48bca..b6eb4946 100644 --- a/recipes-containers/kubernetes/kubernetes_git.bb +++ b/recipes-containers/kubernetes/kubernetes_git.bb @@ -31,7 +31,7 @@ SRC_URI:append = " \ file://0001-cross-don-t-build-tests-by-default.patch \ file://0001-build-golang.sh-convert-remaining-go-calls-to-use.patch \ file://0001-build-hack-allow-go-1.20-building.patch \ - file://cni-containerd-net.conflist \ + file://00_cni-containerd-net.conflist \ file://k8s-init \ file://99-kubernetes.conf \ " @@ -119,7 +119,7 @@ do_install() { fi } -CNI_NETWORKING_FILES ?= "${UNPACKDIR}/cni-containerd-net.conflist" +CNI_NETWORKING_FILES ?= "${UNPACKDIR}/00_cni-containerd-net.conflist" PACKAGES =+ "kubeadm kubectl kubelet kube-proxy ${PN}-misc ${PN}-host"