Skip to content

Commit

Permalink
robust stack: Fix sanity check (#970)
Browse files Browse the repository at this point in the history
The previous logic selected only the latest provider,
excluding the variants that include dash (i.e -centos9).

Atm we run 1.26-centos9 instead 1.26, so the sanity check won't run.
Fix it by running it for all supported providers (1.25+).

Also fix a bug that the condition compared KUBEVIRT_PROVIDER
which is in the form k8s-x.yz with plain version i.e x.yz.

Signed-off-by: Or Shoval <[email protected]>
  • Loading branch information
oshoval authored Feb 22, 2023
1 parent bc50e16 commit e1cf770
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cluster-provision/k8s/check-cluster-up.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ function cleanup() {
make cluster-down
}

SINGLE_STACK_PROVIDER=${SINGLE_STACK_PROVIDER:-$(find ../../cluster-provision/k8s/* -maxdepth 0 -type d -printf '%f\n' | grep -v "-" | tail -1)}

export KUBEVIRTCI_GOCLI_CONTAINER=quay.io/kubevirtci/gocli:latest
# check cluster-up
(
Expand Down Expand Up @@ -88,7 +86,8 @@ export KUBEVIRTCI_GOCLI_CONTAINER=quay.io/kubevirtci/gocli:latest
hack/conformance.sh $conformance_config
fi

if [ $SINGLE_STACK_PROVIDER == $KUBEVIRT_PROVIDER ]; then
# KUBEVIRT_SINGLE_STACK is supported by k8s-1.25+
if [ $KUBEVIRT_PROVIDER != "k8s-1.24" ]; then
echo "Sanity check cluster-up of single stack cluster"
make cluster-down
export KUBEVIRT_SINGLE_STACK=true
Expand Down

0 comments on commit e1cf770

Please sign in to comment.