Skip to content

Commit c8ba618

Browse files
committed
Adding support for payload multiple-stream.
The multiple-stream effort will contain multiple images considered as `machine-os` in the payload as well as multiple `driver-toolkit` images. This commit is adding some labels to the container such as the `rhel-stream` and `kernel-version`. In addition it adds a reference to the `rhel-coreos-10` image in order to specify to the payload that DTK depends on the `rhel-coreos-10` image. Signed-off-by: Yoni Bettan <yonibettan@gmail.com>
1 parent 411e7ca commit c8ba618

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

Dockerfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
FROM registry.ci.openshift.org/ocp/4.22:base-rhel9
1+
ARG BASE_IMAGE='registry.ci.openshift.org/ocp/4.22:base-rhel9'
2+
FROM ${BASE_IMAGE}
23
ARG KERNEL_VERSION=''
34
ARG RT_KERNEL_VERSION=''
45
ARG RHEL_VERSION=''
6+
ARG RHEL_STREAM='rhel-9'
57
# If RHEL_VERSION is empty, we infer it from the /etc/os-release file. This is used by OKD as we always want the latest one.
68
RUN [ "${RHEL_VERSION}" == "" ] && source /etc/os-release && RHEL_VERSION=${VERSION_ID}; echo ${RHEL_VERSION} > /etc/dnf/vars/releasever \
79
&& dnf config-manager --best --setopt=install_weak_deps=False --save
@@ -66,7 +68,10 @@ RUN if echo "${TAGS:-}" | grep -q scos > /dev/null 2>&1; then sed -i 's/rhel-cor
6668
LABEL io.k8s.description="driver-toolkit is a container with the kernel packages necessary for building driver containers for deploying kernel modules/drivers on OpenShift" \
6769
name="driver-toolkit" \
6870
io.openshift.release.operator=true \
69-
version="0.1"
71+
version="0.1" \
72+
io.openshift.os.streamclass=${RHEL_STREAM} \
73+
kernel-version=${KERNEL_VERSION} \
74+
kernel-rt-version=${RT_KERNEL_VERSION}
7075

7176
# Last layer for metadata for mapping the driver-toolkit to a specific kernel version
7277
RUN export INSTALLED_KERNEL=$(rpm -q --qf "%{VERSION}-%{RELEASE}.%{ARCH}" kernel-devel); \

manifests/image-references

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,7 @@ spec:
1010
from:
1111
kind: DockerImage
1212
name: example.com/image-reference-placeholder:rhel-coreos
13+
- name: rhel-coreos-10
14+
from:
15+
kind: DockerImage
16+
name: example.com/image-reference-placeholder:rhel-coreos-10

0 commit comments

Comments
 (0)