kata-deploy: add PULL_TYPE handler for CRI-O

A new PULL_TYPE environment variable is recognized by the kata-deploy's
install script to allow it to configure CRIO-O for guest-pull image pulling
type.

The tests/integration/kubernetes/gha-run.sh change allows for testing it:
```
export PULL_TYPE=guest-pull
cd tests/integration/kubernetes
./gha-run.sh deploy-k8s
```

Fixes #9474
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
This commit is contained in:
Wainer dos Santos Moschetta
2024-04-19 14:47:11 -03:00
parent 647560539f
commit af4f9afb71
3 changed files with 35 additions and 0 deletions

View File

@@ -215,6 +215,13 @@ function deploy_kata() {
"${tools_dir}/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml"
fi
# Set the PULL_TYPE_MAPPING
if [ "${PULL_TYPE}" != "default" ]; then
yq -i \
".spec.template.spec.containers[0].env[10].value = \"${KATA_HYPERVISOR}:${PULL_TYPE}\"" \
"${tools_dir}/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml"
fi
echo "::group::Final kata-deploy.yaml that is used in the test"
cat "${tools_dir}/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml"
grep "${DOCKER_REGISTRY}/${DOCKER_REPO}:${DOCKER_TAG}" "${tools_dir}/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml" || die "Failed to setup the tests image"