Skip to content

Commit

Permalink
Disable DataVolume GC by default in cluster-deploy
Browse files Browse the repository at this point in the history
Prevent DV-related CI failures in the next kubevirt-bot kubevirtci
bump PR (with bump-cdi), due to:
kubevirt/containerized-data-importer#2754

Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
  • Loading branch information
arnongilboa authored and VirrageS committed Nov 17, 2023
1 parent 5915b15 commit a4bf1d4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions hack/cluster-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ set -ex pipefail

DOCKER_TAG=${DOCKER_TAG:-devel}
KUBEVIRT_DEPLOY_CDI=${KUBEVIRT_DEPLOY_CDI:-true}
CDI_DV_GC=${CDI_DV_GC:-0}
CDI_DV_GC_DEFAULT=0
CDI_DV_GC=${CDI_DV_GC:--1}

source hack/common.sh
# shellcheck disable=SC1090
Expand Down Expand Up @@ -57,8 +58,8 @@ function _ensure_cdi_deployment() {
override="https://127.0.0.1:$host_port"
_kubectl patch cdi ${cdi_namespace} --type merge -p '{"spec": {"config": {"uploadProxyURLOverride": "'"$override"'"}}}'

# Enable succeeded DataVolume garbage collection
if [[ $CDI_DV_GC != "0" ]]; then
# Configure DataVolume garbage collection
if [[ $CDI_DV_GC != $CDI_DV_GC_DEFAULT ]]; then
_kubectl patch cdi ${cdi_namespace} --type merge -p '{"spec": {"config": {"dataVolumeTTLSeconds": '"$CDI_DV_GC"'}}}'
fi
}
Expand Down

0 comments on commit a4bf1d4

Please sign in to comment.