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 29, 2023
1 parent 91d3a4e commit e7aedf8
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": "1500m", "memory": "1200M"}, "requests": {"cpu": "100m", "memory": "60M"}}}}}' --type merge

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

Expand Down

0 comments on commit e7aedf8

Please sign in to comment.