diff options
author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2024-10-29 14:56:44 +0000 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2024-11-15 19:50:00 +0000 |
commit | f757566a13d5553ed937c2f7765a40daa3cf47a4 (patch) | |
tree | 8aea3a4d637405fea17dadced5bd24a907e788c2 | |
parent | 38470f4f2f2c50a04ad1264f12be7f178b7d9614 (diff) | |
download | meta-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.bb | 25 |
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 @@ | |||
1 | DESCRIPTION = "A configurable container host image" | ||
2 | LICENSE = "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 | ||
55 | DESCRIPTION = "A configurable container host image" | ||
56 | LICENSE = "MIT" | ||
57 | |||
58 | inherit features_check | 58 | inherit 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 |
62 | REQUIRED_DISTRO_FEATURES ?= " virtualization \ | 62 | REQUIRED_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. | ||
68 | RECOMMENDED_DISTRO_FEATURES ?= " pam \ | 70 | RECOMMENDED_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. | ||
72 | OPTIONAL_DISTRO_FEATURES ?= " vmsep \ | 75 | OPTIONAL_DISTRO_FEATURES ?= " vmsep \ |
73 | k3s \ | 76 | k3s \ |
74 | k8s \ | 77 | k8s \ |
75 | " | 78 | " |
76 | 79 | ||
80 | REQUIRED_DISTRO_FEATURES:append = " ${@bb.utils.contains('VIRTUAL-RUNTIME_container_orchestration','k3s-node','k3s','',d)}" | ||
81 | REQUIRED_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 | ||
77 | IMAGE_FEATURES[validitems] += "virt-unique-hostname" | 85 | IMAGE_FEATURES[validitems] += "virt-unique-hostname" |
78 | IMAGE_FEATURES[validitems] += "container-tools" | 86 | IMAGE_FEATURES[validitems] += "container-tools" |
79 | 87 | ||
80 | IMAGE_FEATURES += "ssh-server-openssh" | 88 | IMAGE_FEATURES += "ssh-server-openssh" |
81 | IMAGE_FEATURES += "package-management" | 89 | IMAGE_FEATURES += "package-management" |
82 | # IMAGE_FEATURES += "container-tools" | ||
83 | IMAGE_FEATURES += "virt-unique-hostname" | 90 | IMAGE_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 | ||
85 | IMAGE_LINGUAS = " " | 94 | IMAGE_LINGUAS = " " |
86 | 95 | ||