From 74209ce9a9e7ae1a8a193dbc14ccb88d1682f77c Mon Sep 17 00:00:00 2001 From: Praveen Kumar Date: Tue, 3 Jan 2023 19:37:46 +0530 Subject: [PATCH] Use openshift version as image tag for dnsmasq/route-controller if present We started to create images for dnsmasq and route-controller as part of patched KAO/KCMO images and those images are tagged with openshift version. It is good to tag dnsmasq and route-controller image also with openshift version if present otherwise use latest. Also using the same base image as the openshift release have to avoid extra layer for bundle. --- createdisk.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/createdisk.sh b/createdisk.sh index 17fa247c..942a9eb1 100755 --- a/createdisk.sh +++ b/createdisk.sh @@ -57,12 +57,17 @@ fi prepare_qemu_guest_agent api.${CRC_VM_NAME}.${BASE_DOMAIN} +image_tag="latest" +if podman manifest inspect quay.io/crcont/dnsmasq:${OPENSHIFT_VERSION} >/dev/null 2>&1; then + image_tag=${OPENSHIFT_VERSION} +fi + # Add gvisor-tap-vsock and crc-dnsmasq services ${SSH} core@api.${CRC_VM_NAME}.${BASE_DOMAIN} 'sudo bash -x -s' < /etc/systemd/system/gvisor-tap-vsock.service touch /var/srv/dnsmasq.conf - podman create --ip 10.88.0.8 --name crc-dnsmasq -v /var/srv/dnsmasq.conf:/etc/dnsmasq.conf -p 53:53/udp --privileged quay.io/crcont/dnsmasq:latest + podman create --ip 10.88.0.8 --name crc-dnsmasq -v /var/srv/dnsmasq.conf:/etc/dnsmasq.conf -p 53:53/udp --privileged quay.io/crcont/dnsmasq:${image_tag} podman generate systemd --restart-policy=no crc-dnsmasq > /etc/systemd/system/crc-dnsmasq.service systemctl daemon-reload systemctl enable gvisor-tap-vsock.service @@ -72,7 +77,7 @@ EOF cat crio-wipe.service | ${SSH} core@api.${CRC_VM_NAME}.${BASE_DOMAIN} "sudo tee -a /etc/systemd/system/crio-wipe.service" # Preload routes controller -${SSH} core@api.${CRC_VM_NAME}.${BASE_DOMAIN} -- 'sudo crictl pull quay.io/crcont/routes-controller:latest' +${SSH} core@api.${CRC_VM_NAME}.${BASE_DOMAIN} -- "sudo crictl pull quay.io/crcont/routes-controller:${image_tag}" if [ "${ARCH}" == "aarch64" ]; then # aarch64 support is mainly used on Apple M1 machines which can't run a rhel8 kernel