diff options
author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2021-12-10 09:02:58 -0500 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2021-12-10 09:02:58 -0500 |
commit | ee1e169f0b9e2c9bb252c79086f4fac82ca210d9 (patch) | |
tree | 67000fe3e13ced432a618eb191220756ed3a6316 | |
parent | dbd37caa6d48772b87426450fb6b816c11acc68a (diff) | |
download | meta-virtualization-ee1e169f0b9e2c9bb252c79086f4fac82ca210d9.tar.gz |
kubernetes: update to 1.23.x series
Bumbing kubernetes to the latest release branch (now that our go
compiler meets the minium standards).
We also add a networking configuration similar to the k3s one, but
named appropriately so that CNI will read and do basic configuration.
We also add some missing rdepends that were preventing the controller
node from fully initializing.
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r-- | recipes-containers/kubernetes/kubernetes/cni-containerd-net.conflist | 24 | ||||
-rw-r--r-- | recipes-containers/kubernetes/kubernetes_git.bb | 32 |
2 files changed, 50 insertions, 6 deletions
diff --git a/recipes-containers/kubernetes/kubernetes/cni-containerd-net.conflist b/recipes-containers/kubernetes/kubernetes/cni-containerd-net.conflist new file mode 100644 index 00000000..ca434d6f --- /dev/null +++ b/recipes-containers/kubernetes/kubernetes/cni-containerd-net.conflist | |||
@@ -0,0 +1,24 @@ | |||
1 | { | ||
2 | "cniVersion": "0.4.0", | ||
3 | "name": "containerd-net", | ||
4 | "plugins": [ | ||
5 | { | ||
6 | "type": "bridge", | ||
7 | "bridge": "cni0", | ||
8 | "isGateway": true, | ||
9 | "ipMasq": true, | ||
10 | "promiscMode": true, | ||
11 | "ipam": { | ||
12 | "type": "host-local", | ||
13 | "subnet": "10.88.0.0/16", | ||
14 | "routes": [ | ||
15 | { "dst": "0.0.0.0/0" } | ||
16 | ] | ||
17 | } | ||
18 | }, | ||
19 | { | ||
20 | "type": "portmap", | ||
21 | "capabilities": {"portMappings": true} | ||
22 | } | ||
23 | ] | ||
24 | } | ||
diff --git a/recipes-containers/kubernetes/kubernetes_git.bb b/recipes-containers/kubernetes/kubernetes_git.bb index 63e41724..82edadd6 100644 --- a/recipes-containers/kubernetes/kubernetes_git.bb +++ b/recipes-containers/kubernetes/kubernetes_git.bb | |||
@@ -5,15 +5,15 @@ applications across multiple hosts, providing basic mechanisms for deployment, \ | |||
5 | maintenance, and scaling of applications. \ | 5 | maintenance, and scaling of applications. \ |
6 | " | 6 | " |
7 | 7 | ||
8 | PV = "v1.22.2+git${SRCREV_kubernetes}" | 8 | PV = "v1.23.1+git${SRCREV_kubernetes}" |
9 | SRCREV_kubernetes = "a82c1e722590eb1b94f9c7dcba51be67bf37a4e2" | 9 | SRCREV_kubernetes = "dd1b0a124713105e94ed58ffc2115ee8c1fd9f72" |
10 | SRCREV_kubernetes-release = "7c1aa83dac555de6f05500911467b70aca4949f0" | 10 | SRCREV_kubernetes-release = "7c1aa83dac555de6f05500911467b70aca4949f0" |
11 | PE = "1" | 11 | PE = "1" |
12 | 12 | ||
13 | BBCLASSEXTEND = "devupstream:target" | 13 | BBCLASSEXTEND = "devupstream:target" |
14 | LIC_FILES_CHKSUM:class-devupstream = "file://src/import/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" | 14 | LIC_FILES_CHKSUM:class-devupstream = "file://src/import/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" |
15 | DEFAULT_PREFERENCE:class-devupstream = "-1" | 15 | DEFAULT_PREFERENCE:class-devupstream = "-1" |
16 | SRC_URI:class-devupstream = "git://github.com/kubernetes/kubernetes.git;branch=master;name=kubernetes;protocol=https \ | 16 | SRC_URI:classedevupstream = "git://github.com/kubernetes/kubernetes.git;branch=master;name=kubernetes;protocol=https \ |
17 | git://github.com/kubernetes/release;branch=master;name=kubernetes-release;destsuffix=git/release;protocol=https \ | 17 | git://github.com/kubernetes/release;branch=master;name=kubernetes-release;destsuffix=git/release;protocol=https \ |
18 | " | 18 | " |
19 | SRCREV_kubernetes:class-devupstream = "d2f6eb6339de25cef04850b6d9be8335d52324cd" | 19 | SRCREV_kubernetes:class-devupstream = "d2f6eb6339de25cef04850b6d9be8335d52324cd" |
@@ -22,7 +22,7 @@ PV:class-devupstream = "v1.23-alpha+git${SRCPV}" | |||
22 | 22 | ||
23 | SRCREV_FORMAT ?= "kubernetes_release" | 23 | SRCREV_FORMAT ?= "kubernetes_release" |
24 | 24 | ||
25 | SRC_URI = "git://github.com/kubernetes/kubernetes.git;branch=release-1.22;name=kubernetes;protocol=https \ | 25 | SRC_URI = "git://github.com/kubernetes/kubernetes.git;branch=release-1.23;name=kubernetes;protocol=https \ |
26 | git://github.com/kubernetes/release;branch=master;name=kubernetes-release;destsuffix=git/release;protocol=https" | 26 | git://github.com/kubernetes/release;branch=master;name=kubernetes-release;destsuffix=git/release;protocol=https" |
27 | 27 | ||
28 | SRC_URI:append = " \ | 28 | SRC_URI:append = " \ |
@@ -30,6 +30,7 @@ SRC_URI:append = " \ | |||
30 | file://0001-cross-don-t-build-tests-by-default.patch \ | 30 | file://0001-cross-don-t-build-tests-by-default.patch \ |
31 | file://0001-build-golang.sh-convert-remaining-go-calls-to-use.patch \ | 31 | file://0001-build-golang.sh-convert-remaining-go-calls-to-use.patch \ |
32 | file://0001-Makefile.generated_files-Fix-race-issue-for-installi.patch \ | 32 | file://0001-Makefile.generated_files-Fix-race-issue-for-installi.patch \ |
33 | file://cni-containerd-net.conflist \ | ||
33 | " | 34 | " |
34 | 35 | ||
35 | DEPENDS += "rsync-native \ | 36 | DEPENDS += "rsync-native \ |
@@ -45,6 +46,7 @@ GO_IMPORT = "import" | |||
45 | inherit systemd | 46 | inherit systemd |
46 | inherit go | 47 | inherit go |
47 | inherit goarch | 48 | inherit goarch |
49 | inherit cni_networking | ||
48 | 50 | ||
49 | COMPATIBLE_HOST = '(x86_64.*|arm.*|aarch64.*)-linux' | 51 | COMPATIBLE_HOST = '(x86_64.*|arm.*|aarch64.*)-linux' |
50 | 52 | ||
@@ -100,6 +102,8 @@ do_install() { | |||
100 | install -m 0644 ${WORKDIR}/git/release/cmd/kubepkg/templates/latest/deb/kubeadm/10-kubeadm.conf ${D}${systemd_unitdir}/system/kubelet.service.d/ | 102 | install -m 0644 ${WORKDIR}/git/release/cmd/kubepkg/templates/latest/deb/kubeadm/10-kubeadm.conf ${D}${systemd_unitdir}/system/kubelet.service.d/ |
101 | } | 103 | } |
102 | 104 | ||
105 | CNI_NETWORKING_FILES ?= "${WORKDIR}/cni-containerd-net.conflist" | ||
106 | |||
103 | PACKAGES =+ "kubeadm kubectl kubelet kube-proxy ${PN}-misc" | 107 | PACKAGES =+ "kubeadm kubectl kubelet kube-proxy ${PN}-misc" |
104 | 108 | ||
105 | ALLOW_EMPTY:${PN} = "1" | 109 | ALLOW_EMPTY:${PN} = "1" |
@@ -111,9 +115,9 @@ INSANE_SKIP:${PN}-misc += "ldflags already-stripped" | |||
111 | RDEPENDS:${PN} += "kubeadm \ | 115 | RDEPENDS:${PN} += "kubeadm \ |
112 | kubectl \ | 116 | kubectl \ |
113 | kubelet \ | 117 | kubelet \ |
114 | cni" | 118 | kubernetes-cni" |
115 | 119 | ||
116 | RDEPENDS:kubeadm = "kubelet kubectl" | 120 | RDEPENDS:kubeadm = "kubelet kubectl cri-tools conntrack-tools" |
117 | FILES:kubeadm = "${bindir}/kubeadm ${systemd_unitdir}/system/kubelet.service.d/*" | 121 | FILES:kubeadm = "${bindir}/kubeadm ${systemd_unitdir}/system/kubelet.service.d/*" |
118 | 122 | ||
119 | RDEPENDS:kubelet = "iptables socat util-linux ethtool iproute2 ebtables iproute2-tc" | 123 | RDEPENDS:kubelet = "iptables socat util-linux ethtool iproute2 ebtables iproute2-tc" |
@@ -127,5 +131,21 @@ FILES:kubectl = "${bindir}/kubectl" | |||
127 | FILES:kube-proxy = "${bindir}/kube-proxy" | 131 | FILES:kube-proxy = "${bindir}/kube-proxy" |
128 | FILES:${PN}-misc = "${bindir}" | 132 | FILES:${PN}-misc = "${bindir}" |
129 | 133 | ||
134 | RRECOMMENDS:${PN} = "\ | ||
135 | kernel-module-xt-addrtype \ | ||
136 | kernel-module-xt-nat \ | ||
137 | kernel-module-xt-multiport \ | ||
138 | kernel-module-xt-conntrack \ | ||
139 | kernel-module-xt-comment \ | ||
140 | kernel-module-xt-mark \ | ||
141 | kernel-module-xt-connmark \ | ||
142 | kernel-module-vxlan \ | ||
143 | kernel-module-xt-masquerade \ | ||
144 | kernel-module-xt-statistic \ | ||
145 | kernel-module-xt-physdev \ | ||
146 | kernel-module-xt-nflog \ | ||
147 | kernel-module-xt-limit \ | ||
148 | kernel-module-nfnetlink-log \ | ||
149 | " | ||
130 | 150 | ||
131 | deltask compile_ptest_base | 151 | deltask compile_ptest_base |