@@ -29,40 +29,30 @@ setup() {
2929 sed -i -e " s|quay.io/kata-containers/kata-deploy:latest|${DOCKER_REGISTRY} /${DOCKER_REPO} :${DOCKER_TAG} |g" " tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml"
3030
3131 # Enable debug for Kata Containers
32- yq write -i \
33- " tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml" \
34- ' spec.template.spec.containers[0].env[1].value' \
35- --tag ' !!str' " true"
32+ yq -i \
33+ ' .spec.template.spec.containers[0].env[1].value = "true"' \
34+ " tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml"
3635 # Create the runtime class only for the shim that's being tested
37- yq write -i \
38- " tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml" \
39- ' spec.template.spec.containers[0].env[2].value' \
40- " ${KATA_HYPERVISOR} "
36+ yq -i \
37+ " .spec.template.spec.containers[0].env[2].value = \" ${KATA_HYPERVISOR} \" " \
38+ " tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml"
4139 # Set the tested hypervisor as the default `kata` shim
42- yq write -i \
43- " tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml" \
44- ' spec.template.spec.containers[0].env[3].value' \
45- " ${KATA_HYPERVISOR} "
40+ yq -i \
41+ " .spec.template.spec.containers[0].env[3].value = \" ${KATA_HYPERVISOR} \" " \
42+ " tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml"
4643 # Let the `kata-deploy` script take care of the runtime class creation / removal
47- yq write -i \
48- " tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml" \
49- ' spec.template.spec.containers[0].env[4].value' \
50- --tag ' !!str' " true"
44+ yq -i \
45+ ' .spec.template.spec.containers[0].env[4].value = "true"' \
46+ " tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml"
5147 # Let the `kata-deploy` create the default `kata` runtime class
52- yq write -i \
53- " tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml" \
54- ' spec.template.spec.containers[0].env[5].value' \
55- --tag ' !!str' " true"
48+ yq -i \
49+ ' .spec.template.spec.containers[0].env[5].value = "true"' \
50+ " tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml"
5651
5752 if [ " ${KATA_HOST_OS} " = " cbl-mariner" ]; then
58- yq write -i \
59- " tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml" \
60- ' spec.template.spec.containers[0].env[+].name' \
61- " HOST_OS"
62- yq write -i \
63- " tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml" \
64- ' spec.template.spec.containers[0].env[-1].value' \
65- " ${KATA_HOST_OS} "
53+ yq -i \
54+ " .spec.template.spec.containers[0].env += [{\" name\" : \" HOST_OS\" , \" value\" : \" ${KATA_HOST_OS} \" }]" \
55+ " tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml"
6656 fi
6757
6858 echo " ::group::Final kata-deploy.yaml that is used in the test"
@@ -144,25 +134,21 @@ teardown() {
144134 kubectl -n kube-system wait --timeout=10m --for=delete -l name=kata-deploy pod
145135
146136 # Let the `kata-deploy` script take care of the runtime class creation / removal
147- yq write -i \
148- " tools/packaging/kata-deploy/kata-cleanup/base/kata-cleanup.yaml" \
149- ' spec.template.spec.containers[0].env[4].value' \
150- --tag ' !!str' " true"
137+ yq -i \
138+ ' .spec.template.spec.containers[0].env[4].value = "true"' \
139+ " tools/packaging/kata-deploy/kata-cleanup/base/kata-cleanup.yaml"
151140 # Create the runtime class only for the shim that's being tested
152- yq write -i \
153- " tools/packaging/kata-deploy/kata-cleanup/base/kata-cleanup.yaml" \
154- ' spec.template.spec.containers[0].env[2].value' \
155- " ${KATA_HYPERVISOR} "
141+ yq -i \
142+ " .spec.template.spec.containers[0].env[2].value = \" ${KATA_HYPERVISOR} \" " \
143+ " tools/packaging/kata-deploy/kata-cleanup/base/kata-cleanup.yaml"
156144 # Set the tested hypervisor as the default `kata` shim
157- yq write -i \
158- " tools/packaging/kata-deploy/kata-cleanup/base/kata-cleanup.yaml" \
159- ' spec.template.spec.containers[0].env[3].value' \
160- " ${KATA_HYPERVISOR} "
145+ yq -i \
146+ " .spec.template.spec.containers[0].env[3].value = \" ${KATA_HYPERVISOR} \" " \
147+ " tools/packaging/kata-deploy/kata-cleanup/base/kata-cleanup.yaml"
161148 # Let the `kata-deploy` create the default `kata` runtime class
162- yq write -i \
163- " tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml" \
164- ' spec.template.spec.containers[0].env[5].value' \
165- --tag ' !!str' " true"
149+ yq -i \
150+ ' .spec.template.spec.containers[0].env[5].value = "true"' \
151+ " tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml"
166152
167153 sed -i -e " s|quay.io/kata-containers/kata-deploy:latest|${DOCKER_REGISTRY} /${DOCKER_REPO} :${DOCKER_TAG} |g" " tools/packaging/kata-deploy/kata-cleanup/base/kata-cleanup.yaml"
168154 cat " tools/packaging/kata-deploy/kata-cleanup/base/kata-cleanup.yaml"
0 commit comments