Skip to content

Commit

Permalink
Enable the use of non-csi HPP in testing lanes
Browse files Browse the repository at this point in the history
This commit modifies several scripts to allow the usage of classic HPP as the default SC in tests.

This allows us to test our non-populator flow with a non-csi provisioner.

Signed-off-by: Alvaro Romero <alromero@redhat.com>
  • Loading branch information
alromeros committed Jun 1, 2023
1 parent e7aa9c0 commit 8281407
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 2 deletions.
25 changes: 25 additions & 0 deletions automation/non-csi-hpp.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash
#
# This file is part of the KubeVirt project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Copyright 2023 Red Hat, Inc.
#

set -ex
export TARGET=k8s-1.26-centos9
export KUBEVIRT_STORAGE=hpp
export HPP_CLASSIC=true
export CDI_E2E_SKIP=Destructive
automation/test.sh
13 changes: 12 additions & 1 deletion cluster-sync/ephemeral_provider.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,18 @@ function configure_hpp() {
_kubectl apply -f https://github.com/kubevirt/hostpath-provisioner-operator/releases/download/$HPP_RELEASE/storageclass-wffc-legacy-csi.yaml
echo "Waiting for hostpath provisioner to be available"
_kubectl wait hostpathprovisioners.hostpathprovisioner.kubevirt.io/hostpath-provisioner --for=condition=Available --timeout=480s
_kubectl patch storageclass hostpath-csi -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
}

function configure_hpp_classic() {
# Configure hpp and default to classic non-csi hostpath-provisioner
configure_hpp
_kubectl patch storageclass hostpath-provisioner -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
}

function configure_hpp_csi() {
# Configure hpp and default to hostpath-csi
configure_hpp
_kubectl patch storageclass hostpath-csi -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
}

function configure_nfs() {
Expand Down
6 changes: 5 additions & 1 deletion cluster-sync/kubevirtci/provider.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ function configure_storage() {
fi
elif [[ $KUBEVIRT_STORAGE == "hpp" ]] ; then
echo "Installing hostpath provisioner storage"
configure_hpp
if [[ $HPP_CLASSIC == "true" ]] ; then
configure_hpp_classic
else
configure_hpp_csi
fi
elif [[ $KUBEVIRT_STORAGE == "nfs" ]] ; then
echo "Installing NFS CSI dynamic storage"
configure_nfs_csi
Expand Down

0 comments on commit 8281407

Please sign in to comment.