summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2024-10-29 14:56:44 +0000
committerBruce Ashfield <bruce.ashfield@gmail.com>2024-11-15 19:50:00 +0000
commitf757566a13d5553ed937c2f7765a40daa3cf47a4 (patch)
tree8aea3a4d637405fea17dadced5bd24a907e788c2
parent38470f4f2f2c50a04ad1264f12be7f178b7d9614 (diff)
downloadmeta-virtualization-f757566a13d5553ed937c2f7765a40daa3cf47a4.tar.gz
images: container-image-host
Add some conditional distro feature checks for kubernetes flavours Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r--recipes-extended/images/container-image-host.bb25
1 files changed, 17 insertions, 8 deletions
diff --git a/recipes-extended/images/container-image-host.bb b/recipes-extended/images/container-image-host.bb
index 3a75bb43..7d88d36f 100644
--- a/recipes-extended/images/container-image-host.bb
+++ b/recipes-extended/images/container-image-host.bb
@@ -1,3 +1,6 @@
1DESCRIPTION = "A configurable container host image"
2LICENSE = "MIT"
3
1# This image is a reference implementation to create a target platform 4# This image is a reference implementation to create a target platform
2# capable of running containers. This includes kernel configuration, 5# capable of running containers. This includes kernel configuration,
3# container runtimes, tools and other support applications. 6# container runtimes, tools and other support applications.
@@ -52,35 +55,41 @@
52## k3s-host 55## k3s-host
53## k3s-node 56## k3s-node
54 57
55DESCRIPTION = "A configurable container host image"
56LICENSE = "MIT"
57
58inherit features_check 58inherit features_check
59 59
60# minimum features tested to have a working 60# minimum features tested to have a working container host
61# container host image 61# image. These will be enforced by the features_check inherit
62REQUIRED_DISTRO_FEATURES ?= " virtualization \ 62REQUIRED_DISTRO_FEATURES ?= " virtualization \
63 systemd \ 63 systemd \
64 seccomp \ 64 seccomp \
65 " 65 "
66 66
67# features that are typically enabled 67# features that are typically enabled. Note, these are not
68# enforced, but maybe added to the required distro feature
69# definition in the future.
68RECOMMENDED_DISTRO_FEATURES ?= " pam \ 70RECOMMENDED_DISTRO_FEATURES ?= " pam \
69 usrmerge \ 71 usrmerge \
70 " 72 "
71# features that are enabled for specific wworkloads 73# features that are enabled for specific wworkloads. These
74# are not enforced, except for specific configurations.
72OPTIONAL_DISTRO_FEATURES ?= " vmsep \ 75OPTIONAL_DISTRO_FEATURES ?= " vmsep \
73 k3s \ 76 k3s \
74 k8s \ 77 k8s \
75 " 78 "
76 79
80REQUIRED_DISTRO_FEATURES:append = " ${@bb.utils.contains('VIRTUAL-RUNTIME_container_orchestration','k3s-node','k3s','',d)}"
81REQUIRED_DISTRO_FEATURES:append = " ${@bb.utils.contains('VIRTUAL-RUNTIME_container_orchestration','k3s-host','k3s','',d)}"
82
83# If the image is going to be placed into a cluster, we need some randomization
84# of the host name to make it unique
77IMAGE_FEATURES[validitems] += "virt-unique-hostname" 85IMAGE_FEATURES[validitems] += "virt-unique-hostname"
78IMAGE_FEATURES[validitems] += "container-tools" 86IMAGE_FEATURES[validitems] += "container-tools"
79 87
80IMAGE_FEATURES += "ssh-server-openssh" 88IMAGE_FEATURES += "ssh-server-openssh"
81IMAGE_FEATURES += "package-management" 89IMAGE_FEATURES += "package-management"
82# IMAGE_FEATURES += "container-tools"
83IMAGE_FEATURES += "virt-unique-hostname" 90IMAGE_FEATURES += "virt-unique-hostname"
91# This may be automatically enabled in the future via a toold or debug flag
92# IMAGE_FEATURES += "container-tools"
84 93
85IMAGE_LINGUAS = " " 94IMAGE_LINGUAS = " "
86 95