mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-18 07:18:27 +00:00
Merge pull request #10476 from BbolroC/switch-to-kubeadm-s390x
gha: Switch KUBERNETES from k3s to kubeadm on s390x
This commit is contained in:
5
.github/workflows/run-k8s-tests-on-zvsi.yaml
vendored
5
.github/workflows/run-k8s-tests-on-zvsi.yaml
vendored
@@ -36,7 +36,7 @@ jobs:
|
||||
- qemu-runtime-rs
|
||||
- qemu-coco-dev
|
||||
k8s:
|
||||
- k3s
|
||||
- kubeadm
|
||||
include:
|
||||
- snapshotter: devmapper
|
||||
pull-type: default
|
||||
@@ -97,9 +97,6 @@ jobs:
|
||||
echo "KBS_INGRESS=nodeport" >> $GITHUB_ENV
|
||||
if: ${{ matrix.vmm == 'qemu-coco-dev' }}
|
||||
|
||||
- name: Deploy ${{ matrix.k8s }}
|
||||
run: bash tests/integration/kubernetes/gha-run.sh deploy-k8s
|
||||
|
||||
# qemu-runtime-rs only works with overlayfs
|
||||
# See: https://github.com/kata-containers/kata-containers/issues/10066
|
||||
- name: Configure the ${{ matrix.snapshotter }} snapshotter
|
||||
|
@@ -80,21 +80,37 @@ EOF
|
||||
containerd_config_file="/var/lib/rancher/k3s/agent/etc/containerd/config.toml.tmpl"
|
||||
sudo cp /var/lib/rancher/k3s/agent/etc/containerd/config.toml "${containerd_config_file}"
|
||||
;;
|
||||
kubeadm)
|
||||
containerd_config_file="/etc/containerd/config.toml"
|
||||
;;
|
||||
*) >&2 echo "${KUBERNETES} flavour is not supported"; exit 2 ;;
|
||||
esac
|
||||
|
||||
# We're not using this with baremetal machines, so we're fine on cutting
|
||||
# corners here and just append this to the configuration file.
|
||||
cat<<EOF | sudo tee -a "${containerd_config_file}"
|
||||
# Check if the "devmapper" plugin section exists in the file
|
||||
if grep -q 'plugins."io.containerd.snapshotter.v1.devmapper"' "${containerd_config_file}"; then
|
||||
echo "devmapper section found. Updating pool_name and base_image_size..."
|
||||
sudo sed -i '/\[plugins."io.containerd.snapshotter.v1.devmapper"\]/,/\[plugins\./ {
|
||||
s/pool_name = ".*"/pool_name = "contd-thin-pool"/
|
||||
s/base_image_size = ".*"/base_image_size = "4096MB"/
|
||||
}' "${containerd_config_file}"
|
||||
else
|
||||
echo "devmapper section not found. Appending to the config file..."
|
||||
cat<<EOF | sudo tee -a "${containerd_config_file}"
|
||||
[plugins."io.containerd.snapshotter.v1.devmapper"]
|
||||
pool_name = "contd-thin-pool"
|
||||
base_image_size = "4096MB"
|
||||
EOF
|
||||
fi
|
||||
|
||||
case "${KUBERNETES}" in
|
||||
k3s)
|
||||
sudo sed -i -e 's/snapshotter = "overlayfs"/snapshotter = "devmapper"/g' "${containerd_config_file}"
|
||||
sudo systemctl restart k3s ;;
|
||||
kubeadm)
|
||||
sudo sed -i -e 's/snapshotter = "overlayfs"/snapshotter = "devmapper"/g' "${containerd_config_file}"
|
||||
sudo systemctl restart containerd ;;
|
||||
*) >&2 echo "${KUBERNETES} flavour is not supported"; exit 2 ;;
|
||||
esac
|
||||
|
||||
|
Reference in New Issue
Block a user