mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-24 02:31:12 +00:00
kata-deploy: helm: Stop mounting /opt/kata
It's simply easier if we just use /host/opt/kata instead in our scripts, which will simplify a lot the logic of adding an INSTALLATION_PREFIX later on. Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
This commit is contained in:
parent
6ce5e62c48
commit
7be77ebee5
@ -63,8 +63,6 @@ spec:
|
||||
mountPath: /etc/crio/
|
||||
- name: containerd-conf
|
||||
mountPath: /etc/containerd/
|
||||
- name: kata-artifacts
|
||||
mountPath: /opt/kata/
|
||||
- name: host
|
||||
mountPath: /host/
|
||||
volumes:
|
||||
@ -74,10 +72,6 @@ spec:
|
||||
- name: containerd-conf
|
||||
hostPath:
|
||||
path: '{{- template "containerdConfPath" .Values }}'
|
||||
- name: kata-artifacts
|
||||
hostPath:
|
||||
path: /opt/kata/
|
||||
type: DirectoryOrCreate
|
||||
- name: host
|
||||
hostPath:
|
||||
path: /
|
||||
|
@ -57,8 +57,6 @@ spec:
|
||||
mountPath: /etc/crio/
|
||||
- name: containerd-conf
|
||||
mountPath: /etc/containerd/
|
||||
- name: kata-artifacts
|
||||
mountPath: /opt/kata/
|
||||
- name: host
|
||||
mountPath: /host/
|
||||
volumes:
|
||||
@ -68,10 +66,6 @@ spec:
|
||||
- name: containerd-conf
|
||||
hostPath:
|
||||
path: /etc/containerd/
|
||||
- name: kata-artifacts
|
||||
hostPath:
|
||||
path: /opt/kata/
|
||||
type: DirectoryOrCreate
|
||||
- name: host
|
||||
hostPath:
|
||||
path: /
|
||||
|
@ -37,6 +37,7 @@ PULL_TYPE_MAPPING="${PULL_TYPE_MAPPING:-}"
|
||||
IFS=',' read -a pull_types <<< "$PULL_TYPE_MAPPING"
|
||||
|
||||
dest_dir="/opt/kata"
|
||||
host_install_dir="/host/${dest_dir}"
|
||||
|
||||
# If we fail for any reason a message will be displayed
|
||||
die() {
|
||||
@ -239,15 +240,17 @@ function get_tdx_ovmf_path_from_distro() {
|
||||
|
||||
function install_artifacts() {
|
||||
echo "copying kata artifacts onto host"
|
||||
cp -au /opt/kata-artifacts/opt/kata/* ${dest_dir}/
|
||||
chmod +x ${dest_dir}/bin/*
|
||||
[ -d ${dest_dir}/runtime-rs/bin ] && \
|
||||
chmod +x ${dest_dir}/runtime-rs/bin/*
|
||||
|
||||
mkdir -p ${host_install_dir}
|
||||
cp -au /opt/kata-artifacts/opt/kata/* ${host_install_dir}/
|
||||
chmod +x ${host_install_dir}/bin/*
|
||||
[ -d ${host_install_dir}/runtime-rs/bin ] && \
|
||||
chmod +x ${host_install_dir}/runtime-rs/bin/*
|
||||
|
||||
local config_path
|
||||
|
||||
for shim in "${shims[@]}"; do
|
||||
config_path=$(get_kata_containers_config_path "${shim}")
|
||||
config_path="/host/$(get_kata_containers_config_path "${shim}")"
|
||||
mkdir -p "$config_path"
|
||||
|
||||
local kata_config_file="${config_path}/configuration-${shim}.toml"
|
||||
@ -304,7 +307,7 @@ function install_artifacts() {
|
||||
|
||||
# Allow Mariner to use custom configuration.
|
||||
if [ "${HOST_OS:-}" == "cbl-mariner" ]; then
|
||||
config_path="${dest_dir}/share/defaults/kata-containers/configuration-clh.toml"
|
||||
config_path="${host_install_dir}/share/defaults/kata-containers/configuration-clh.toml"
|
||||
clh_path="${dest_dir}/bin/cloud-hypervisor-glibc"
|
||||
sed -i -E "s|(valid_hypervisor_paths) = .+|\1 = [\"${clh_path}\"]|" "${config_path}"
|
||||
sed -i -E "s|(path) = \".+/cloud-hypervisor\"|\1 = \"${clh_path}\"|" "${config_path}"
|
||||
@ -483,7 +486,8 @@ function configure_containerd() {
|
||||
|
||||
function remove_artifacts() {
|
||||
echo "deleting kata artifacts"
|
||||
rm -rf ${dest_dir}/*
|
||||
|
||||
rm -rf ${host_install_dir}
|
||||
|
||||
if [[ "${CREATE_RUNTIMECLASSES}" == "true" ]]; then
|
||||
delete_runtimeclasses
|
||||
|
Loading…
Reference in New Issue
Block a user