Patch add insecure registries
@@ -22,6 +22,7 @@ set -ex pipefail
DOCKER_TAG=${DOCKER_TAG:-devel}
source hack/common.sh
+# shellcheck disable=SC1090
source cluster-up/cluster/$KUBEVIRT_PROVIDER/provider.sh
source hack/config.sh
@@ -44,7 +45,10 @@ function _deploy_infra_for_tests() {
function _ensure_cdi_deployment() {
# enable featuregate
- _kubectl patch cdi ${cdi_namespace} --type merge -p '{"spec": {"config": {"featureGates": [ "HonorWaitForFirstConsumer" ]}}}'
+ _kubectl patch cdi ${cdi_namespace:?} --type merge -p '{"spec": {"config": {"featureGates": [ "HonorWaitForFirstConsumer" ]}}}'
+
+ # add insecure registries
+ _kubectl patch cdi ${cdi_namespace} --type merge -p '{"spec": {"config": {"insecureRegistries": [ "registry:5000", "fakeregistry:5000" ]}}}'
# Configure uploadproxy override for virtctl imageupload
host_port=$(${KUBEVIRT_PATH}cluster-up/cli.sh ports uploadproxy | xargs)
@@ -62,7 +66,7 @@ _kubectl apply -f - <<EOF
apiVersion: v1
kind: Namespace
metadata:
- name: ${namespace}
+ name: ${namespace:?}
EOF
if [[ "$KUBEVIRT_STORAGE" == "rook-ceph" ]]; then
