mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-30 17:22:33 +00:00
Merge pull request #143 from kata-containers/kata-deploy-1.2-update
Kata deploy 1.2 update
This commit is contained in:
commit
98bf3ae2be
@ -18,7 +18,7 @@ spec:
|
||||
kata-containers.io/kata-runtime: cleanup
|
||||
containers:
|
||||
- name: kube-kata-cleanup
|
||||
image: katadocker/kata-deploy:1.1.0
|
||||
image: katadocker/kata-deploy
|
||||
imagePullPolicy: Always
|
||||
command: [ "sh", "-c" ]
|
||||
args:
|
||||
|
@ -16,7 +16,7 @@ spec:
|
||||
serviceAccountName: kata-label-node
|
||||
containers:
|
||||
- name: kubelet-runtime-labeler-pod
|
||||
image: katadocker/kata-deploy:1.1.0
|
||||
image: katadocker/kata-deploy
|
||||
imagePullPolicy: Always
|
||||
command: [ "sh", "-c" ]
|
||||
args:
|
||||
@ -56,7 +56,7 @@ spec:
|
||||
kata-containers.io/container-runtime: cri-o
|
||||
containers:
|
||||
- name: kube-kata
|
||||
image: katadocker/kata-deploy:1.1.0
|
||||
image: katadocker/kata-deploy
|
||||
imagePullPolicy: Always
|
||||
lifecycle:
|
||||
preStop:
|
||||
@ -77,8 +77,6 @@ spec:
|
||||
volumeMounts:
|
||||
- name: crio-conf
|
||||
mountPath: /etc/crio/
|
||||
- name: kata-conf
|
||||
mountPath: /usr/share/defaults/kata-containers/
|
||||
- name: kata-artifacts
|
||||
mountPath: /opt/kata/
|
||||
- name: dbus
|
||||
@ -89,10 +87,6 @@ spec:
|
||||
- name: crio-conf
|
||||
hostPath:
|
||||
path: /etc/crio/
|
||||
- name: kata-conf
|
||||
hostPath:
|
||||
path: /usr/share/defaults/kata-containers/
|
||||
type: DirectoryOrCreate
|
||||
- name: kata-artifacts
|
||||
hostPath:
|
||||
path: /opt/kata/
|
||||
@ -127,7 +121,7 @@ spec:
|
||||
kata-containers.io/container-runtime: containerd
|
||||
containers:
|
||||
- name: kube-kata
|
||||
image: katadocker/kata-deploy:1.1.0
|
||||
image: katadocker/kata-deploy
|
||||
imagePullPolicy: Always
|
||||
lifecycle:
|
||||
preStop:
|
||||
@ -148,8 +142,6 @@ spec:
|
||||
volumeMounts:
|
||||
- name: containerd-conf
|
||||
mountPath: /etc/containerd/
|
||||
- name: kata-conf
|
||||
mountPath: /usr/share/defaults/kata-containers/
|
||||
- name: kata-artifacts
|
||||
mountPath: /opt/kata/
|
||||
- name: dbus
|
||||
@ -161,10 +153,6 @@ spec:
|
||||
hostPath:
|
||||
path: /etc/containerd/
|
||||
type: DirectoryOrCreate
|
||||
- name: kata-conf
|
||||
hostPath:
|
||||
path: /usr/share/defaults/kata-containers/
|
||||
type: DirectoryOrCreate
|
||||
- name: kata-artifacts
|
||||
hostPath:
|
||||
path: /opt/kata/
|
||||
|
@ -1,16 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "copying kata artifacts onto host"
|
||||
cp -R /opt/kata-artifacts/bin /opt/kata/
|
||||
mkdir /opt/kata/share
|
||||
mv /opt/kata/bin/qemu /opt/kata/share/
|
||||
cp -R /opt/kata-artifacts/opt/kata/* /opt/kata/
|
||||
chmod +x /opt/kata/bin/*
|
||||
cp /opt/kata-artifacts/configuration.toml /usr/share/defaults/kata-containers/configuration.toml
|
||||
|
||||
# Update Kata configuration for /opt/kata path usage
|
||||
sed -i 's!/usr.*kata-containers/!/opt/kata/bin/!' /usr/share/defaults/kata-containers/configuration.toml
|
||||
sed -i 's!/usr/bin/!/opt/kata/bin/!' /usr/share/defaults/kata-containers/configuration.toml
|
||||
sed -i 's!qemu-lite!qemu!' /usr/share/defaults/kata-containers/configuration.toml
|
||||
|
||||
# Configure containerd to use Kata:
|
||||
echo "create containerd configuration for Kata"
|
||||
|
@ -1,17 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "copying kata artifacts onto host"
|
||||
cp -R /opt/kata-artifacts/bin /opt/kata/
|
||||
mkdir /opt/kata/share
|
||||
mv /opt/kata/bin/qemu /opt/kata/share/
|
||||
cp -R /opt/kata-artifacts/opt/kata/* /opt/kata/
|
||||
chmod +x /opt/kata/bin/*
|
||||
cp /opt/kata-artifacts/configuration.toml /usr/share/defaults/kata-containers/configuration.toml
|
||||
|
||||
# Update Kata configuration for /opt/kata path usage
|
||||
sed -i 's!/usr.*kata-containers/!/opt/kata/bin/!' /usr/share/defaults/kata-containers/configuration.toml
|
||||
sed -i 's!/usr/bin/!/opt/kata/bin/!' /usr/share/defaults/kata-containers/configuration.toml
|
||||
sed -i 's!qemu-lite!qemu!' /usr/share/defaults/kata-containers/configuration.toml
|
||||
|
||||
# Configure crio to use Kata:
|
||||
echo "Set Kata containers as default runtime in CRI-O for untrusted workloads"
|
||||
cp /etc/crio/crio.conf /etc/crio/crio.conf.bak
|
||||
sed -i '/runtime_untrusted_workload = /c\runtime_untrusted_workload = "/opt/kata/bin/kata-runtime"' /etc/crio/crio.conf
|
||||
|
@ -1,7 +1,6 @@
|
||||
#!/bin/sh
|
||||
echo "delete kata artifacts"
|
||||
rm -rf /opt/kata
|
||||
rm -rf /usr/share/defaults/kata-containers
|
||||
rm -f /etc/containerd/config.toml
|
||||
|
||||
if [ -f /etc/containerd/config.toml.bak ]; then
|
||||
|
@ -1,5 +1,4 @@
|
||||
#!/bin/sh
|
||||
echo "deleting kata artifacts"
|
||||
rm -rf /opt/kata/
|
||||
rm -rf /usr/share/defaults/kata-containers
|
||||
mv /etc/crio/crio.conf.bak /etc/crio/crio.conf
|
||||
|
Loading…
Reference in New Issue
Block a user