Skip to content

Commit

Permalink
Merge pull request kubevirt#9921 from arnongilboa/disable_dv_gc_clust…
Browse files Browse the repository at this point in the history
…er_deploy

Disable DataVolume GC by default in cluster-deploy
  • Loading branch information
kubevirt-bot authored Jun 22, 2023
2 parents 3513428 + e47cd8f commit 5f2707a
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 5f2707a

Please sign in to comment.