From ee152263bd248f5a1bfeed2ff21b4baadc1e39c5 Mon Sep 17 00:00:00 2001 From: Andrew Bays Date: Thu, 19 Dec 2024 21:01:07 +0000 Subject: [PATCH] Make 'openstack_init' target be idempotent --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 229e048..193021b 100644 --- a/Makefile +++ b/Makefile @@ -744,8 +744,8 @@ openstack_wait: ## waits openstack CSV to succeed. # creates the new initialization resource for our operators .PHONY: openstack_init openstack_init: openstack_wait - test -f ${OPERATOR_BASE_DIR}/openstack-operator/config/samples/operator_v1beta1_openstack.yaml || make openstack_repo - oc create -f ${OPERATOR_BASE_DIR}/openstack-operator/config/samples/operator_v1beta1_openstack.yaml + bash -c 'test -f ${OPERATOR_BASE_DIR}/openstack-operator/config/samples/operator_v1beta1_openstack.yaml || make openstack_repo' + oc apply -f ${OPERATOR_BASE_DIR}/openstack-operator/config/samples/operator_v1beta1_openstack.yaml oc wait openstack/openstack -n ${OPERATOR_NAMESPACE} --for condition=Ready --timeout=${TIMEOUT} .PHONY: openstack_cleanup