kata-containers / kata-containers

Kata Containers is an open source project and community working to build a standard implementation of lightweight Virtual Machines (VMs) that feel and perform like containers, but provide the workload isolation and security advantages of VMs. https://katacontainers.io/
Apache License 2.0
5.2k stars 1.02k forks source link

tests: need better solution for installing the Kata tools without downloading the entire Kata tarball too #8864

Open danmihai1 opened 6 months ago

danmihai1 commented 6 months ago

https://github.com/kata-containers/kata-containers/pull/8857 uses the entire Kata tarball to install the genpolicy tool. Tests should be able to install just the tools, or just the Kata genpolicy tool.

Not sure if these other tests would benefit from this test feature too:

workflows/run-metrics.yaml: run: bash tests/metrics/gha-run.sh install-kata kata-artifacts workflows/run-kata-monitor-tests.yaml: run: bash tests/functional/kata-monitor/gha-run.sh install-kata kata-artifacts workflows/run-runk-tests.yaml: run: bash tests/integration/runk/gha-run.sh install-kata kata-artifacts workflows/run-cri-containerd-tests-ppc64le.yaml: run: bash tests/integration/cri-containerd/gha-run.sh install-kata kata-artifacts workflows/basic-ci-amd64.yaml: run: bash tests/integration/cri-containerd/gha-run.sh install-kata kata-artifacts workflows/basic-ci-amd64.yaml: run: bash tests/stability/gha-run.sh install-kata kata-artifacts workflows/basic-ci-amd64.yaml: run: bash tests/integration/nydus/gha-run.sh install-kata kata-artifacts workflows/basic-ci-amd64.yaml: run: bash tests/integration/runk/gha-run.sh install-kata kata-artifacts workflows/basic-ci-amd64.yaml: run: bash tests/functional/tracing/gha-run.sh install-kata kata-artifacts workflows/basic-ci-amd64.yaml: run: bash tests/integration/docker/gha-run.sh install-kata kata-artifacts workflows/basic-ci-amd64.yaml: run: bash tests/integration/nerdctl/gha-run.sh install-kata kata-artifacts workflows/run-cri-containerd-tests-s390x.yaml: run: bash tests/integration/cri-containerd/gha-run.sh install-kata kata-artifacts

wainersm commented 6 months ago

When I looked at #8857 I had this same idea, have a separated tarball for the tools that perhaps shouldn't be installed in the cluster so decreasing the size of the kata-deploy payload.

Looking at the amd64 build workflow, we have shipped agent, agent-opa, agent-ctl (development tool, afaik) and now genpolicy as part of the payload. Filtering them out in the loop will not include those binaries on the payload; and perhaps the same kata-deploy-merge-builds.sh script could be used to generate a kata-static-tools.tgz