From c0a73b2c996369019c6d076d50e4977f1cd3b611 Mon Sep 17 00:00:00 2001 From: Mariusz Mazur Date: Fri, 26 Apr 2019 15:22:38 +0200 Subject: [PATCH] Add ENABLE_DATAVOLUMES to deploy-kubevirt --- ci/deploy-kubevirt | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ci/deploy-kubevirt b/ci/deploy-kubevirt index 9b334fa..5aeab99 100755 --- a/ci/deploy-kubevirt +++ b/ci/deploy-kubevirt @@ -5,21 +5,28 @@ set -e source $(dirname $(realpath $0))/defaults -_enable_software_emulation() { +_create_kubevirt_config() { + if [[ -n "$ENABLE_DATAVOLUMES" ]]; + then + kubectl create configmap -n kubevirt kubevirt-config --from-literal debug.useEmulation=true --from-literal feature-gates=DataVolumes || : + else kubectl create configmap -n kubevirt kubevirt-config --from-literal debug.useEmulation=true || : + fi } + + _kubernetes() { local VER=$1 if [[ -n "$USE_OPERATOR" ]]; then kubectl apply -f https://github.com/kubevirt/kubevirt/releases/download/$VER/kubevirt-operator.yaml ; - _enable_software_emulation + _create_kubevirt_config kubectl apply -f https://github.com/kubevirt/kubevirt/releases/download/$VER/kubevirt-cr.yaml ; else kubectl apply -f https://github.com/kubevirt/kubevirt/releases/download/$VER/kubevirt.yaml ; - _enable_software_emulation + _create_kubevirt_config fi }