From 948627785a024c93b3f60093501dd3ddb30eaa01 Mon Sep 17 00:00:00 2001 From: Nestor Acuna Blanco Date: Fri, 13 Sep 2024 15:12:14 +0200 Subject: [PATCH] fix: replace legacy template validor with ssp-operator The template validator code has been moved to the ssp-operator repository. As a result, we need to deploy the SSP Operator to ensure that the templates do not contain any errors in the validation rules. Signed-off-by: Nestor Acuna Blanco --- .gitignore | 1 - automation/test.sh | 13 ++++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index dec4cf68..97a91642 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,3 @@ common-templates*.yaml releases.json ssp-operator-deploy-key virtctl -kubevirt-template-validator/ diff --git a/automation/test.sh b/automation/test.sh index b94f3b79..2c808433 100755 --- a/automation/test.sh +++ b/automation/test.sh @@ -200,14 +200,13 @@ EOF if [ "${CLUSTERENV}" == "$ocenv" ] then - export VALIDATOR_VERSION=$(curl -s https://api.github.com/repos/kubevirt/kubevirt-template-validator/releases | \ + # Deploy ssp-operator + export SSP_VERSION=$(curl -s https://api.github.com/repos/kubevirt/ssp-operator/releases | \ jq '.[] | select(.prerelease==false) | .tag_name' | sort -V | tail -n1 | tr -d '"') - - git clone -b ${VALIDATOR_VERSION} --depth 1 https://github.com/kubevirt/kubevirt-template-validator kubevirt-template-validator - VALIDATOR_DIR="kubevirt-template-validator/cluster/ocp4" - sed -i 's/RELEASE_TAG/'$VALIDATOR_VERSION'/' ${VALIDATOR_DIR}/service.yaml - oc apply -n kubevirt -f ${VALIDATOR_DIR} - oc wait --for=condition=Available --timeout=${timeout}s deployment/virt-template-validator -n $namespace + oc apply -f https://github.com/kubevirt/ssp-operator/releases/download/${SSP_VERSION}/ssp-operator.yaml + oc apply -f https://github.com/kubevirt/ssp-operator/releases/download/${SSP_VERSION}/olm-crds.yaml + oc apply -f https://github.com/kubevirt/ssp-operator/releases/download/${SSP_VERSION}/olm-ssp-operator.clusterserviceversion.yaml + oc wait --for=condition=Available --timeout=${timeout}s deployment/ssp-operator -n $namespace # Apply templates echo "Deploying templates" oc apply -n $namespace -f dist/templates