Skip to content

Commit 1a406c5

Browse files
committed
CRI-O: add imagevolume test job
Signed-off-by: Sascha Grunert <[email protected]>
1 parent 73d8e06 commit 1a406c5

File tree

6 files changed

+359
-0
lines changed

6 files changed

+359
-0
lines changed
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
{
2+
"ignition": {
3+
"version": "3.3.0"
4+
},
5+
"kernelArguments": {
6+
"shouldNotExist": [
7+
"mitigations=auto,nosmt"
8+
]
9+
},
10+
"storage": {
11+
"files": [
12+
{
13+
"path": "/etc/zincati/config.d/90-disable-auto-updates.toml",
14+
"contents": {
15+
"compression": "",
16+
"source": "data:,%5Bupdates%5D%0Aenabled%20%3D%20false%0A"
17+
},
18+
"mode": 420
19+
},
20+
{
21+
"path": "/root/kubelet-e2e.te",
22+
"contents": {
23+
"compression": "gzip",
24+
"source": "data:;base64,H4sIAAAAAAAC/6RRy07DMBC8+ytG4gwCjkT9lsp1BrTKxjbOWhWK+u+ItiFpE07scWcf83B9aqsSXT1QaY98JV6enhvnCj+rFGJ0uJZ9ZUKy+YNy2FtzC4SPkmpetevAsrd+DUgUWx9J0bzEn5UZCeqHAa0UjJAUTBEKvREpM+JYxIjT/fi7KDHC58zYTguaQofe58tmoW9RGH1P1KgSu/nYybmH3bKufHHT3Dmvmo4TNmt9++f7++cLX7YZLAcWNC6mbdq10vcb7B8aZ3yK+nz+nEjjvgMAAP//f1Vw5EkCAAA="
25+
},
26+
"mode": 420
27+
},
28+
{
29+
"path": "/etc/crio/crio.conf.d/20-crio.conf",
30+
"contents": {
31+
"compression": "gzip",
32+
"source": "data:;base64,H4sIAAAAAAAC/7SP0UrFMAyG7/MUY/duT3CeREbp6bIukiYjTUXfXuomgoII4lVp+P98Xx6TkU5UYsYFKmWJ3gzDoUzpdbgN44ye5h6az9n0VFVGgLNoTZwKLsCaA+Mzcu+seG95hNX0CCSbxZDchtuwRa4IK26xsYer2wvWJH3d+fHWKVmTBa5vOKLv72Kt2sx0xxe8BHtuhKJCrvZTTqV8v+GT121+wzut/85zrP6wR1kZ7T+4bwEAAP//V7kNseQBAAA="
33+
},
34+
"mode": 420
35+
},
36+
{
37+
"path": "/etc/sysctl.d/99-e2e-sysctl.conf",
38+
"contents": {
39+
"compression": "gzip",
40+
"source": "data:;base64,H4sIAAAAAAAC/2SQvU7DQBCEez/FSG7BduKf4Eh0NBR06dH6bo1P8d1F3r3EvD2KCJFQqpW+LWbmy/EezMIkjCMvgefi5OynpxUU7B/SaWGy8nzFGuFpdT75AofJCZwgMFu2GOOS5Tg5Cz47oy4GKIvKEwY2lIQh36LsLS5uniGsoBvCxVnGG4+UZj2QHOWD1izHQMIWMcA7n0LyiCN0YmGcaU4sRZZjXXjcY1I9yb4sv5xOaShM9OUt7X5N9N5pWVM1Vp1pNrTth11XjdyZ2tKu3fZmbPuW25eaqOqyHIeJYX9L3QJBC0NjxBwv18HXNo+Ti+y/zNdm0zd11WSPQu+vnwAAAP//xE8bG4oBAAA="
41+
},
42+
"mode": 420
43+
},
44+
{
45+
"path": "/etc/ssh-key-secret/ssh-public",
46+
"contents": {
47+
"source": "data:text/plain;base64,R0NFX1NTSF9QVUJMSUNfS0VZX0ZJTEVfQ09OVEVOVA=="
48+
},
49+
"mode": 420
50+
}
51+
]
52+
},
53+
"systemd": {
54+
"units": [
55+
{
56+
"contents": "[Unit]\nDescription=Configure required sysctls.\n\n[Service]\nType=oneshot\nExecStart=/usr/lib/systemd/systemd-sysctl\n\n[Install]\nWantedBy=multi-user.target\n",
57+
"enabled": true,
58+
"name": "configure-sysctl.service"
59+
},
60+
{
61+
"contents": "[Unit]\nDescription=Download and install required tools.\nBefore=crio-install.service\nAfter=NetworkManager-wait-online.service\n\n[Service]\nType=oneshot\nExecStart=rpm-ostree install \\\n -y \\\n --apply-live \\\n --allow-inactive \\\n dbus-tools \\\n checkpolicy\n\n[Install]\nWantedBy=multi-user.target\n",
62+
"enabled": true,
63+
"name": "tools-install.service"
64+
},
65+
{
66+
"contents": "[Unit]\nDescription=Setup SELinux policy\nAfter=tools-install.service\n\n[Service]\nType=oneshot\nExecStartPre=setenforce 1\nExecStartPre=checkmodule -M -m -o /root/kubelet-e2e.mod /root/kubelet-e2e.te\nExecStartPre=semodule_package -o /root/kubelet-e2e.pp -m /root/kubelet-e2e.mod\nExecStartPre=semodule -i /root/kubelet-e2e.pp\nExecStartPre=mkdir -p /var/lib/kubelet\nExecStart=chcon -R -u system_u -r object_r -t var_lib_t /var/lib/kubelet\n\n[Install]\nWantedBy=multi-user.target\n",
67+
"enabled": true,
68+
"name": "selinux-install.service"
69+
},
70+
{
71+
"contents": "[Unit]\nDescription=Download and install crio binaries and configurations.\nAfter=selinux-install.service\n\n[Service]\nType=oneshot\nEnvironment=\"SCRIPT_COMMIT=52aa3c2a31ccc9623962e9e338b6585267d6f3f4\"\nEnvironment=\"CRIO_COMMIT=1c04ca9768e535cf22017da6e6cee620bb3a6431\"\n\nExecStartPre=mount /tmp /tmp -o remount,exec,suid\nExecStartPre=mount -o remount,rw /dev/sda4 /usr\nExecStartPre=bash -c '\\\n curl --fail --retry 5 --retry-delay 3 --silent --show-error \\\n https://raw.githubusercontent.com/cri-o/packaging/$SCRIPT_COMMIT/get |\\\n bash -s -- -t $CRIO_COMMIT'\nExecStartPre=rm -f /etc/cni/net.d/87-podman-bridge.conflist\nExecStartPre=rm -f /etc/crio/crio.conf.d/10-crio.conf\nExecStart=systemctl enable --now crio.service\nRestart=on-failure\n\n[Install]\nWantedBy=multi-user.target\n",
72+
"enabled": true,
73+
"name": "crio-install.service"
74+
},
75+
{
76+
"contents": "[Unit]\nDescription=Copy authorized keys\nBefore=crio-install.service\nAfter=NetworkManager-wait-online.service\n\n[Service]\nType=oneshot\nExecStart=/bin/sh -c '\\\n /usr/bin/mkdir -m 0700 -p /home/core/.ssh \u0026\u0026 \\\n /usr/bin/cat /etc/ssh-key-secret/ssh-public \\\n \u003e\u003e /home/core/.ssh/authorized_keys \u0026\u0026 \\\n /usr/bin/chown -R core:core /home/core/.ssh \u0026\u0026 \\\n /usr/bin/chmod 0600 /home/core/.ssh/authorized_keys'\n\n[Install]\nWantedBy=multi-user.target\n",
77+
"enabled": true,
78+
"name": "authorized-key.service"
79+
}
80+
]
81+
}
82+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
images:
2+
fedora:
3+
image_family: fedora-coreos-stable
4+
project: fedora-coreos-cloud
5+
metadata: "user-data</home/prow/go/src/k8s.io/test-infra/jobs/e2e_node/crio/crio_cgroupsv2_imagevolume.ign"
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[crio.image]
2+
signature_policy = "/etc/crio/policy.json"
3+
4+
[crio.runtime]
5+
log_level = "debug"
6+
drop_infra_ctr = false
7+
default_runtime = "runc"
8+
9+
[crio.runtime.runtimes.crun]
10+
runtime_path = "/usr/libexec/crio/crun"
11+
monitor_path = "/usr/libexec/crio/conmon"
12+
13+
[crio.runtime.runtimes.runc]
14+
runtime_path = "/usr/libexec/crio/runc"
15+
monitor_path = "/usr/libexec/crio/conmon"
16+
17+
[crio.runtime.runtimes.test-handler]
18+
runtime_path = "/usr/libexec/crio/runc"
19+
monitor_path = "/usr/libexec/crio/conmon"
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
---
2+
variant: fcos
3+
version: 1.4.0
4+
kernel_arguments:
5+
should_not_exist:
6+
- mitigations=auto,nosmt
7+
storage:
8+
files:
9+
- path: /etc/zincati/config.d/90-disable-auto-updates.toml
10+
contents:
11+
local: 90-disable-auto-updates.toml
12+
mode: 0644
13+
- path: /root/kubelet-e2e.te
14+
contents:
15+
local: kubelet-e2e.te
16+
mode: 0644
17+
- path: /etc/crio/crio.conf.d/20-crio.conf
18+
contents:
19+
local: 20-crio-v2.conf
20+
mode: 0644
21+
- path: /etc/sysctl.d/99-e2e-sysctl.conf
22+
contents:
23+
local: 99-e2e-sysctl.conf
24+
mode: 0644
25+
- path: /etc/ssh-key-secret/ssh-public
26+
contents:
27+
# base64 encoded "GCE_SSH_PUBLIC_KEY_FILE_CONTENT"
28+
source: data:text/plain;base64,R0NFX1NTSF9QVUJMSUNfS0VZX0ZJTEVfQ09OVEVOVA==
29+
mode: 0644
30+
systemd:
31+
units:
32+
- name: configure-sysctl.service
33+
enabled: true
34+
contents: |
35+
[Unit]
36+
Description=Configure required sysctls.
37+
38+
[Service]
39+
Type=oneshot
40+
ExecStart=/usr/lib/systemd/systemd-sysctl
41+
42+
[Install]
43+
WantedBy=multi-user.target
44+
45+
- name: tools-install.service
46+
enabled: true
47+
contents: |
48+
[Unit]
49+
Description=Download and install required tools.
50+
Before=crio-install.service
51+
After=NetworkManager-wait-online.service
52+
53+
[Service]
54+
Type=oneshot
55+
ExecStart=rpm-ostree install \
56+
-y \
57+
--apply-live \
58+
--allow-inactive \
59+
dbus-tools \
60+
checkpolicy
61+
62+
[Install]
63+
WantedBy=multi-user.target
64+
65+
- name: selinux-install.service
66+
enabled: true
67+
contents: |
68+
[Unit]
69+
Description=Setup SELinux policy
70+
After=tools-install.service
71+
72+
[Service]
73+
Type=oneshot
74+
ExecStartPre=setenforce 1
75+
ExecStartPre=checkmodule -M -m -o /root/kubelet-e2e.mod /root/kubelet-e2e.te
76+
ExecStartPre=semodule_package -o /root/kubelet-e2e.pp -m /root/kubelet-e2e.mod
77+
ExecStartPre=semodule -i /root/kubelet-e2e.pp
78+
ExecStartPre=mkdir -p /var/lib/kubelet
79+
ExecStart=chcon -R -u system_u -r object_r -t var_lib_t /var/lib/kubelet
80+
81+
[Install]
82+
WantedBy=multi-user.target
83+
84+
- name: crio-install.service
85+
enabled: true
86+
contents: |
87+
[Unit]
88+
Description=Download and install crio binaries and configurations.
89+
After=selinux-install.service
90+
91+
[Service]
92+
Type=oneshot
93+
Environment="SCRIPT_COMMIT=52aa3c2a31ccc9623962e9e338b6585267d6f3f4"
94+
Environment="CRIO_COMMIT=1c04ca9768e535cf22017da6e6cee620bb3a6431"
95+
96+
ExecStartPre=mount /tmp /tmp -o remount,exec,suid
97+
ExecStartPre=mount -o remount,rw /dev/sda4 /usr
98+
ExecStartPre=bash -c '\
99+
curl --fail --retry 5 --retry-delay 3 --silent --show-error \
100+
https://raw.githubusercontent.com/cri-o/packaging/$SCRIPT_COMMIT/get |\
101+
bash -s -- -t $CRIO_COMMIT'
102+
ExecStartPre=rm -f /etc/cni/net.d/87-podman-bridge.conflist
103+
ExecStartPre=rm -f /etc/crio/crio.conf.d/10-crio.conf
104+
ExecStart=systemctl enable --now crio.service
105+
Restart=on-failure
106+
107+
[Install]
108+
WantedBy=multi-user.target
109+
110+
- name: authorized-key.service
111+
enabled: true
112+
contents: |
113+
[Unit]
114+
Description=Copy authorized keys
115+
Before=crio-install.service
116+
After=NetworkManager-wait-online.service
117+
118+
[Service]
119+
Type=oneshot
120+
ExecStart=/bin/sh -c '\
121+
/usr/bin/mkdir -m 0700 -p /home/core/.ssh && \
122+
/usr/bin/cat /etc/ssh-key-secret/ssh-public \
123+
>> /home/core/.ssh/authorized_keys && \
124+
/usr/bin/chown -R core:core /home/core/.ssh && \
125+
/usr/bin/chmod 0600 /home/core/.ssh/authorized_keys'
126+
127+
[Install]
128+
WantedBy=multi-user.target
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
---
2+
variant: fcos
3+
version: 1.4.0
4+
kernel_arguments:
5+
should_not_exist:
6+
- mitigations=auto,nosmt
7+
storage:
8+
files:
9+
- path: /etc/zincati/config.d/90-disable-auto-updates.toml
10+
contents:
11+
local: 90-disable-auto-updates.toml
12+
mode: 0644
13+
- path: /root/kubelet-e2e.te
14+
contents:
15+
local: kubelet-e2e.te
16+
mode: 0644
17+
- path: /etc/crio/crio.conf.d/20-crio.conf
18+
contents:
19+
local: 20-crio-v2.conf
20+
mode: 0644
21+
- path: /etc/sysctl.d/99-e2e-sysctl.conf
22+
contents:
23+
local: 99-e2e-sysctl.conf
24+
mode: 0644
25+
- path: /etc/ssh-key-secret/ssh-public
26+
contents:
27+
# base64 encoded "GCE_SSH_PUBLIC_KEY_FILE_CONTENT"
28+
source: data:text/plain;base64,R0NFX1NTSF9QVUJMSUNfS0VZX0ZJTEVfQ09OVEVOVA==
29+
mode: 0644
30+
systemd:
31+
units:
32+
- name: configure-sysctl.service
33+
enabled: true
34+
contents: |
35+
[Unit]
36+
Description=Configure required sysctls.
37+
38+
[Service]
39+
Type=oneshot
40+
ExecStart=/usr/lib/systemd/systemd-sysctl
41+
42+
[Install]
43+
WantedBy=multi-user.target
44+
- name: tools-install.service
45+
enabled: true
46+
contents: |
47+
[Unit]
48+
Description=Download and install required tools.
49+
Before=crio-install.service
50+
After=NetworkManager-wait-online.service
51+
52+
[Service]
53+
Type=oneshot
54+
ExecStart=rpm-ostree install \
55+
-y \
56+
--apply-live \
57+
--allow-inactive \
58+
dbus-tools \
59+
checkpolicy
60+
61+
[Install]
62+
WantedBy=multi-user.target
63+
- name: selinux-install.service
64+
enabled: true
65+
contents: |
66+
[Unit]
67+
Description=Setup SELinux policy
68+
After=tools-install.service
69+
70+
[Service]
71+
Type=oneshot
72+
ExecStartPre=setenforce 1
73+
ExecStartPre=checkmodule -M -m -o /root/kubelet-e2e.mod /root/kubelet-e2e.te
74+
ExecStartPre=semodule_package -o /root/kubelet-e2e.pp -m /root/kubelet-e2e.mod
75+
ExecStartPre=semodule -i /root/kubelet-e2e.pp
76+
ExecStartPre=mkdir -p /var/lib/kubelet
77+
ExecStart=chcon -R -u system_u -r object_r -t var_lib_t /var/lib/kubelet
78+
79+
[Install]
80+
WantedBy=multi-user.target
81+
- name: crio-install.service
82+
enabled: true
83+
contents: |
84+
[Unit]
85+
Description=Download and install crio binaries and configurations.
86+
After=selinux-install.service
87+
88+
[Service]
89+
Type=oneshot
90+
Environment="SCRIPT_COMMIT=52aa3c2a31ccc9623962e9e338b6585267d6f3f4"
91+
Environment="CRIO_COMMIT=1c04ca9768e535cf22017da6e6cee620bb3a6431"
92+
93+
ExecStartPre=mount /tmp /tmp -o remount,exec,suid
94+
ExecStartPre=mount -o remount,rw /dev/sda4 /usr
95+
ExecStartPre=bash -c '\
96+
curl --fail --retry 5 --retry-delay 3 --silent --show-error \
97+
https://raw.githubusercontent.com/cri-o/packaging/$SCRIPT_COMMIT/get |\
98+
bash -s -- -t $CRIO_COMMIT'
99+
ExecStartPre=rm -f /etc/cni/net.d/87-podman-bridge.conflist
100+
ExecStartPre=rm -f /etc/crio/crio.conf.d/10-crio.conf
101+
ExecStart=systemctl enable --now crio.service
102+
Restart=on-failure
103+
104+
[Install]
105+
WantedBy=multi-user.target
106+
- name: authorized-key.service
107+
enabled: true
108+
contents: |
109+
[Unit]
110+
Description=Copy authorized keys
111+
Before=crio-install.service
112+
After=NetworkManager-wait-online.service
113+
114+
[Service]
115+
Type=oneshot
116+
ExecStart=/bin/sh -c '\
117+
/usr/bin/mkdir -m 0700 -p /home/core/.ssh && \
118+
/usr/bin/cat /etc/ssh-key-secret/ssh-public \
119+
>> /home/core/.ssh/authorized_keys && \
120+
/usr/bin/chown -R core:core /home/core/.ssh && \
121+
/usr/bin/chmod 0600 /home/core/.ssh/authorized_keys'
122+
123+
[Install]
124+
WantedBy=multi-user.target

jobs/e2e_node/crio/templates/generate

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ declare -A CONFIGURATIONS=(
3434
["crio_cgroupsv2_splitfs"]="root splitfs"
3535
["crio_cgroupsv2_hugepages"]="root hugepages"
3636
["crio_cgroupsv2_userns"]="root userns crun-enabled"
37+
["crio_cgroupsv2_imagevolume"]="root-v2"
3738
)
3839

3940
CONTAINER_RUNTIME=$(which podman 2>/dev/null) ||

0 commit comments

Comments
 (0)