From 3298be2d67f55db92a657789e8151f9a3256e21a Mon Sep 17 00:00:00 2001 From: James Gu Date: Thu, 2 Sep 2021 19:28:55 +0000 Subject: [PATCH] Allow one single qcow2 image in qcow bundle Allow one image for both controller and worker nodes without having to override site manifests Change-Id: Ia8000051026de1897ccf487877711459a88c8ce8 --- manifests/function/baremetal-operator/ironic.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/manifests/function/baremetal-operator/ironic.yaml b/manifests/function/baremetal-operator/ironic.yaml index ebdeb5f91..10d418e71 100644 --- a/manifests/function/baremetal-operator/ironic.yaml +++ b/manifests/function/baremetal-operator/ironic.yaml @@ -63,7 +63,11 @@ spec: command: - sh - -c - - "cp /qcows/*.qcow2 /qcows/*.qcow2.md5sum /shared/html/images/" + - | + cp /qcows/*.qcow2 /qcows/*.qcow2.md5sum /shared/html/images/ + [ -f /qcows/control-plane.qcow2 ] && cp -n /qcows/control-plane.qcow2 /shared/html/images/data-plane.qcow2 + [ -f /qcows/control-plane.qcow2.md5sum ] && cp -n /qcows/control-plane.qcow2.md5sum /shared/html/images/data-plane.qcow2.md5sum + [ -f /shared/html/images/data-plane.qcow2.md5sum ] && sed -i 's/control-plane.qcow2/data-plane.qcow2/g' /shared/html/images/data-plane.qcow2.md5sum image: "quay.io/airshipit/qcow-bundle:latest-ubuntu_focal" imagePullPolicy: Always volumeMounts: