Skip to content

Commit

Permalink
fix: replace legacy template validor with ssp-operator
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
nestoracunablanco committed Sep 16, 2024
1 parent 112da40 commit 9486277
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ common-templates*.yaml
releases.json
ssp-operator-deploy-key
virtctl
kubevirt-template-validator/
13 changes: 6 additions & 7 deletions automation/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9486277

Please sign in to comment.