Skip to content

Commit 74209ce

Browse files
committed
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.
1 parent 0566be4 commit 74209ce

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

createdisk.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,17 @@ fi
5757

5858
prepare_qemu_guest_agent api.${CRC_VM_NAME}.${BASE_DOMAIN}
5959

60+
image_tag="latest"
61+
if podman manifest inspect quay.io/crcont/dnsmasq:${OPENSHIFT_VERSION} >/dev/null 2>&1; then
62+
image_tag=${OPENSHIFT_VERSION}
63+
fi
64+
6065
# Add gvisor-tap-vsock and crc-dnsmasq services
6166
${SSH} core@api.${CRC_VM_NAME}.${BASE_DOMAIN} 'sudo bash -x -s' <<EOF
6267
podman create --name=gvisor-tap-vsock --privileged --net=host -v /etc/resolv.conf:/etc/resolv.conf -it quay.io/crcont/gvisor-tap-vsock:latest
6368
podman generate systemd --restart-policy=no gvisor-tap-vsock > /etc/systemd/system/gvisor-tap-vsock.service
6469
touch /var/srv/dnsmasq.conf
65-
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
70+
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}
6671
podman generate systemd --restart-policy=no crc-dnsmasq > /etc/systemd/system/crc-dnsmasq.service
6772
systemctl daemon-reload
6873
systemctl enable gvisor-tap-vsock.service
@@ -72,7 +77,7 @@ EOF
7277
cat crio-wipe.service | ${SSH} core@api.${CRC_VM_NAME}.${BASE_DOMAIN} "sudo tee -a /etc/systemd/system/crio-wipe.service"
7378

7479
# Preload routes controller
75-
${SSH} core@api.${CRC_VM_NAME}.${BASE_DOMAIN} -- 'sudo crictl pull quay.io/crcont/routes-controller:latest'
80+
${SSH} core@api.${CRC_VM_NAME}.${BASE_DOMAIN} -- "sudo crictl pull quay.io/crcont/routes-controller:${image_tag}"
7681

7782
if [ "${ARCH}" == "aarch64" ]; then
7883
# aarch64 support is mainly used on Apple M1 machines which can't run a rhel8 kernel

0 commit comments

Comments
 (0)