-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Kata-Containers: Fix kata-containers runtime (#8068)
* Kata-containes: Fix for ubuntu and centos sometimes kata containers fail to start because of access errors to /dev/vhost-vsock and /dev/vhost-net * Kata-containers: use similar testing strategy as gvisor * Kata-Containers: adjust values for 2.2.0 defaults Make CI tests actually pass * Kata-Containers: bump to 2.2.2 to fix sandbox_cgroup_only issue
- Loading branch information
1 parent
0392055
commit b7ae4a2
Showing
10 changed files
with
287 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
roles/container-engine/kata-containers/molecule/default/files/10-mynet.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"cniVersion": "0.2.0", | ||
"name": "mynet", | ||
"type": "bridge", | ||
"bridge": "cni0", | ||
"isGateway": true, | ||
"ipMasq": true, | ||
"ipam": { | ||
"type": "host-local", | ||
"subnet": "172.19.0.0/24", | ||
"routes": [ | ||
{ | ||
"dst": "0.0.0.0/0" | ||
} | ||
] | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
roles/container-engine/kata-containers/molecule/default/files/container.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"metadata": { | ||
"name": "kata1" | ||
}, | ||
"image": { | ||
"image": "docker.io/library/hello-world:latest" | ||
}, | ||
"log_path": "kata1.0.log", | ||
"linux": {} | ||
} |
10 changes: 10 additions & 0 deletions
10
roles/container-engine/kata-containers/molecule/default/files/sandbox.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"metadata": { | ||
"name": "kata1", | ||
"namespace": "default", | ||
"attempt": 1, | ||
"uid": "hdishd83djaidwnduwk28bcsb" | ||
}, | ||
"linux": {}, | ||
"log_directory": "/tmp" | ||
} |
44 changes: 43 additions & 1 deletion
44
roles/container-engine/kata-containers/molecule/default/prepare.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,48 @@ | ||
--- | ||
- name: Prepare | ||
hosts: all | ||
gather_facts: False | ||
become: true | ||
roles: | ||
- role: kubespray-defaults | ||
- role: bootstrap-os | ||
- role: adduser | ||
user: "{{ addusers.kube }}" | ||
tasks: | ||
- include_tasks: "../../../../download/tasks/download_file.yml" | ||
vars: | ||
download: "{{ download_defaults | combine(downloads.cni) }}" | ||
|
||
- name: Prepare container runtime | ||
hosts: all | ||
become: true | ||
vars: | ||
container_manager: containerd | ||
kube_network_plugin: cni | ||
roles: | ||
- role: kubespray-defaults | ||
- role: network_plugin/cni | ||
- role: container-engine/crictl | ||
tasks: | ||
- name: Copy test container files | ||
copy: | ||
src: "{{ item }}" | ||
dest: "/tmp/{{ item }}" | ||
owner: root | ||
mode: 0644 | ||
with_items: | ||
- container.json | ||
- sandbox.json | ||
- name: Create /etc/cni/net.d directory | ||
file: | ||
path: /etc/cni/net.d | ||
state: directory | ||
owner: kube | ||
mode: 0755 | ||
- name: Setup CNI | ||
copy: | ||
src: "{{ item }}" | ||
dest: "/etc/cni/net.d/{{ item }}" | ||
owner: root | ||
mode: 0644 | ||
with_items: | ||
- 10-mynet.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.