mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
3cfa76fcbf
Add `.github/workflows/cgroup2.yaml` for running Fedora on Vagrant on GitHub Actions to test cgroup2 environment. Only very basic smoke tests are executed, as Vagrant is too slow to run the entire sonobuoy. Relevant: - kubernetes-sigs/kind PR 2017 - https://github.com/rootless-containers/usernetes/blob/v20210201.0/.github/workflows/main.yaml Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
35 lines
1.1 KiB
Ruby
35 lines
1.1 KiB
Ruby
# -*- mode: ruby -*-
|
|
# vi: set ft=ruby :
|
|
|
|
# Vagrant box for testing k3s with cgroup v2.
|
|
# Invoked via k3s/.github/workflows/cgroup2.yaml .
|
|
#
|
|
# The following files need to be present in this directory:
|
|
# - k3s
|
|
# - k3s.service
|
|
Vagrant.configure("2") do |config|
|
|
config.vm.box = "fedora/33-cloud-base"
|
|
memory = 2048
|
|
cpus = 2
|
|
config.vm.provider :virtualbox do |v|
|
|
v.memory = memory
|
|
v.cpus = cpus
|
|
end
|
|
config.vm.provider :libvirt do |v|
|
|
v.memory = memory
|
|
v.cpus = cpus
|
|
end
|
|
config.vm.provision "install-k3s", type: "shell", run: "once" do |sh|
|
|
sh.inline = <<~SHELL
|
|
set -eux -o pipefail
|
|
install -m 755 /vagrant/k3s /usr/local/bin
|
|
cp -f /vagrant/k3s.service /etc/systemd/system/k3s.service
|
|
touch /etc/systemd/system/k3s.service.env
|
|
systemctl daemon-reload
|
|
systemctl enable --now k3s.service || { systemctl status --full --no-pager k3s.service ; exit 1; }
|
|
|
|
curl -fsSL https://github.com/vmware-tanzu/sonobuoy/releases/download/v0.20.0/sonobuoy_0.20.0_linux_amd64.tar.gz | tar xzvC /usr/local/bin sonobuoy
|
|
SHELL
|
|
end
|
|
end
|