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