Skip to content

Commit

Permalink
fix: enable ssd SC for all tests
Browse files Browse the repository at this point in the history
Set requests and limits for CDI
all these changes should help with solving issue, when
import of datavolume is not working

Signed-off-by: Karel Simon <ksimon@redhat.com>
  • Loading branch information
ksimon1 committed Aug 30, 2023
1 parent 91d3a4e commit 4a2aadb
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions automation/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,13 @@ export KUBEVIRT_VERSION=$(latest_version "kubevirt")
# Latest released CDI version
export CDI_VERSION=$(latest_version "containerized-data-importer")

# switch to faster storage class for widows tests (slower storage class is causing timeouts due
# to not able to copy whole windows disk into cluster)
if [[ ! "$(oc get storageclass | grep -q 'ssd-csi (default)')" ]] && [[ $TARGET =~ windows.* ]]; then
oc annotate storageclass ssd-csi storageclass.kubernetes.io/is-default-class=true --overwrite
oc annotate storageclass standard-csi storageclass.kubernetes.io/is-default-class- --overwrite
fi

oc annotate storageclass ssd-csi storageclass.kubernetes.io/is-default-class=true --overwrite
oc annotate storageclass standard-csi storageclass.kubernetes.io/is-default-class- --overwrite


# Start CPU manager only for templates which require it.
if [[ $TARGET =~ rhel7.* ]] || [[ $TARGET =~ rhel8.* ]] || [[ $TARGET =~ fedora.* ]] || [[ $TARGET =~ windows2.* ]]; then
if [[ $TARGET =~ rhel.* ]] || [[ $TARGET =~ fedora.* ]] || [[ $TARGET =~ windows2.* ]]; then
oc label machineconfigpool worker custom-kubelet=enabled
oc create -f - <<EOF
---
Expand Down Expand Up @@ -188,7 +186,7 @@ echo "Deploying CDI"
oc apply -f https://github.com/kubevirt/containerized-data-importer/releases/download/$CDI_VERSION/cdi-operator.yaml
oc apply -f https://github.com/kubevirt/containerized-data-importer/releases/download/$CDI_VERSION/cdi-cr.yaml

oc patch cdi cdi -n cdi --patch '{"spec": {"config": {"dataVolumeTTLSeconds": -1}}}' --type merge
oc patch cdi cdi -n cdi --patch '{"spec":{"config":{"podResourceRequirements": {"limits": {"cpu": "2000m", "memory": "2000M"}, "requests": {"cpu": "600m", "memory": "300M"}}}}}' --type merge

oc wait --for=condition=Available --timeout=${timeout}s CDI/cdi -n cdi

Expand Down

0 comments on commit 4a2aadb

Please sign in to comment.