Skip to content

Commit 1a36b1d

Browse files
authored
Merge pull request #34909 from bitoku/update-crio
Test a new cri-o version with canary job
2 parents a02f34e + 56cecf9 commit 1a36b1d

File tree

7 files changed

+298
-0
lines changed

7 files changed

+298
-0
lines changed

config/jobs/kubernetes/sig-node/sig-node-presubmit.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1624,6 +1624,62 @@ presubmits:
16241624
- --skip-regex=\[Flaky\]|\[Slow\]|\[Serial\]|\[Feature:InPlacePodVerticalScaling\]|\[Feature:UserNamespacesSupport]|\[Feature:PodLifecycleSleepActionAllowZero\]|\[Feature:UserNamespacesPodSecurityStandards\]|\[Feature:KubeletCredentialProviders\]|\[Feature:LockContention\]|\[Feature:SCTPConnectivity\]|\[Feature:PodLevelResources\]
16251625
- '--test-args=--container-runtime-endpoint=unix:///var/run/crio/crio.sock --container-runtime-process-name=/usr/local/bin/crio --container-runtime-pid-file= --kubelet-flags="--cgroup-driver=systemd --cgroups-per-qos=true --cgroup-root=/ --runtime-cgroups=/system.slice/crio.service --kubelet-cgroups=/system.slice/kubelet.service" --extra-log="{\"name\": \"crio.log\", \"journalctl\": [\"-u\", \"crio\"]}"'
16261626
- --image-config-file=/home/prow/go/src/k8s.io/test-infra/jobs/e2e_node/crio/latest/image-config-cgroupv2.yaml
1627+
- name: pull-kubernetes-node-crio-cgrpv2-e2e-canary
1628+
cluster: k8s-infra-prow-build
1629+
# explicitly needs /test pull-kubernetes-node-crio-cgrpv2-e2e-canary to run
1630+
always_run: false
1631+
# if at all it is run and fails, don't block the PR
1632+
optional: true
1633+
branches:
1634+
# TODO(releng): Remove once repo default branch has been renamed
1635+
- master
1636+
- main
1637+
decorate: true
1638+
path_alias: k8s.io/kubernetes
1639+
extra_refs:
1640+
- org: kubernetes
1641+
repo: test-infra
1642+
base_ref: master
1643+
path_alias: k8s.io/test-infra
1644+
decoration_config:
1645+
timeout: 180m
1646+
labels:
1647+
preset-service-account: "true"
1648+
preset-k8s-ssh: "true"
1649+
preset-pull-kubernetes-e2e: "true"
1650+
preset-pull-kubernetes-e2e-gce: "true"
1651+
annotations:
1652+
testgrid-dashboards: sig-node-cri-o, sig-node-presubmits
1653+
testgrid-tab-name: pr-crio-cgrpv2-gce-e2e-canary
1654+
spec:
1655+
containers:
1656+
- image: gcr.io/k8s-staging-test-infra/kubekins-e2e:v20250527-1b2b10e804-master
1657+
resources:
1658+
limits:
1659+
cpu: 4
1660+
memory: 6Gi
1661+
requests:
1662+
cpu: 4
1663+
memory: 6Gi
1664+
env:
1665+
- name: KUBE_SSH_USER
1666+
value: core
1667+
- name: IGNITION_INJECT_GCE_SSH_PUBLIC_KEY_FILE
1668+
value: "1"
1669+
command:
1670+
- runner.sh
1671+
args:
1672+
- kubetest2
1673+
- noop
1674+
- --test=node
1675+
- --
1676+
- --repo-root=.
1677+
- --gcp-zone=us-west1-b
1678+
- --parallelism=8
1679+
- --focus-regex=\[NodeConformance\]|\[Feature:.+\]|\[Feature\]
1680+
- --skip-regex=\[Flaky\]|\[Slow\]|\[Serial\]|\[Feature:InPlacePodVerticalScaling\]|\[Feature:UserNamespacesSupport]|\[Feature:PodLifecycleSleepActionAllowZero\]|\[Feature:UserNamespacesPodSecurityStandards\]|\[Feature:KubeletCredentialProviders\]|\[Feature:LockContention\]|\[Feature:SCTPConnectivity\]|\[Feature:PodLevelResources\]
1681+
- '--test-args=--container-runtime-endpoint=unix:///var/run/crio/crio.sock --container-runtime-process-name=/usr/local/bin/crio --container-runtime-pid-file= --kubelet-flags="--cgroup-driver=systemd --cgroups-per-qos=true --cgroup-root=/ --runtime-cgroups=/system.slice/crio.service --kubelet-cgroups=/system.slice/kubelet.service" --extra-log="{\"name\": \"crio.log\", \"journalctl\": [\"-u\", \"crio\"]}"'
1682+
- --image-config-file=/home/prow/go/src/k8s.io/test-infra/jobs/e2e_node/crio/latest/image-config-cgroupv2-canary.yaml
16271683
- name: pull-crio-cgroupv1-node-e2e-features
16281684
cluster: k8s-infra-prow-build
16291685
# explicitly needs /test pull-crio-cgroupv1-node-e2e-features to run

jobs/e2e_node/crio/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,10 @@ the instance.
6767
To change the version of CRI-O being used for a single ignition file, just copy
6868
[env.yaml](./templates/base/env.yaml) and adapt
6969
[`./templates/generate`](./templates/generate) accordingly.
70+
71+
Make sure the specified cri-o version is uploaded to
72+
`https://storage.googleapis.com/cri-o/artifacts/cri-o.amd64.{{ CRIO_COMMIT }}.tar.gz`,
73+
otherwise the tests should fail.
74+
75+
You can test the cri-o version change by changing [env-canary.yaml](./templates/base/env-canary.yaml)
76+
and run `pull-kubernetes-node-crio-cgrpv2-e2e-canary`.
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
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+
"path": "/etc/systemd/system.conf.d/10-env.conf",
53+
"contents": {
54+
"compression": "",
55+
"source": "data:,%5BManager%5D%0ADefaultEnvironment%3D%22CRIO_SCRIPT_COMMIT%3Dc54e56dea6a3175198e3bd9b306f681a67c48a09%22%0ADefaultEnvironment%3D%22CRIO_COMMIT%3Dc5c41f21fa802d1c19a4114e88ecd91a270e3a15%22%0A"
56+
},
57+
"mode": 420
58+
}
59+
]
60+
},
61+
"systemd": {
62+
"units": [
63+
{
64+
"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",
65+
"enabled": true,
66+
"name": "configure-sysctl.service"
67+
},
68+
{
69+
"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",
70+
"enabled": true,
71+
"name": "tools-install.service"
72+
},
73+
{
74+
"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",
75+
"enabled": true,
76+
"name": "selinux-install.service"
77+
},
78+
{
79+
"contents": "[Unit]\nDescription=Download and install crio binaries and configurations.\nAfter=selinux-install.service\n\n[Service]\nType=oneshot\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/$CRIO_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\nExecStartPre=mv /etc/cni/net.d/10-crio-bridge.conflist.disabled /etc/cni/net.d/10-crio-bridge.conflist\nExecStart=systemctl enable --now crio.service\nRestart=on-failure\n\n[Install]\nWantedBy=multi-user.target\n",
80+
"enabled": true,
81+
"name": "crio-install.service"
82+
},
83+
{
84+
"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",
85+
"enabled": true,
86+
"name": "authorized-key.service"
87+
}
88+
]
89+
}
90+
}
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_cgroupv2_canary.ign"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
storage:
3+
files:
4+
- path: /etc/systemd/system.conf.d/10-env.conf
5+
mode: 0644
6+
contents:
7+
inline: |
8+
[Manager]
9+
DefaultEnvironment="CRIO_SCRIPT_COMMIT=c54e56dea6a3175198e3bd9b306f681a67c48a09"
10+
DefaultEnvironment="CRIO_COMMIT=c5c41f21fa802d1c19a4114e88ecd91a270e3a15"
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
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.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+
- path: /etc/systemd/system.conf.d/10-env.conf
31+
mode: 0644
32+
contents:
33+
inline: |
34+
[Manager]
35+
DefaultEnvironment="CRIO_SCRIPT_COMMIT=c54e56dea6a3175198e3bd9b306f681a67c48a09"
36+
DefaultEnvironment="CRIO_COMMIT=c5c41f21fa802d1c19a4114e88ecd91a270e3a15"
37+
systemd:
38+
units:
39+
- name: configure-sysctl.service
40+
enabled: true
41+
contents: |
42+
[Unit]
43+
Description=Configure required sysctls.
44+
45+
[Service]
46+
Type=oneshot
47+
ExecStart=/usr/lib/systemd/systemd-sysctl
48+
49+
[Install]
50+
WantedBy=multi-user.target
51+
- name: tools-install.service
52+
enabled: true
53+
contents: |
54+
[Unit]
55+
Description=Download and install required tools.
56+
Before=crio-install.service
57+
After=NetworkManager-wait-online.service
58+
59+
[Service]
60+
Type=oneshot
61+
ExecStart=rpm-ostree install \
62+
-y \
63+
--apply-live \
64+
--allow-inactive \
65+
dbus-tools \
66+
checkpolicy
67+
68+
[Install]
69+
WantedBy=multi-user.target
70+
- name: selinux-install.service
71+
enabled: true
72+
contents: |
73+
[Unit]
74+
Description=Setup SELinux policy
75+
After=tools-install.service
76+
77+
[Service]
78+
Type=oneshot
79+
ExecStartPre=setenforce 1
80+
ExecStartPre=checkmodule -M -m -o /root/kubelet-e2e.mod /root/kubelet-e2e.te
81+
ExecStartPre=semodule_package -o /root/kubelet-e2e.pp -m /root/kubelet-e2e.mod
82+
ExecStartPre=semodule -i /root/kubelet-e2e.pp
83+
ExecStartPre=mkdir -p /var/lib/kubelet
84+
ExecStart=chcon -R -u system_u -r object_r -t var_lib_t /var/lib/kubelet
85+
86+
[Install]
87+
WantedBy=multi-user.target
88+
- name: crio-install.service
89+
enabled: true
90+
contents: |
91+
[Unit]
92+
Description=Download and install crio binaries and configurations.
93+
After=selinux-install.service
94+
95+
[Service]
96+
Type=oneshot
97+
ExecStartPre=mount /tmp /tmp -o remount,exec,suid
98+
ExecStartPre=mount -o remount,rw /dev/sda4 /usr
99+
ExecStartPre=bash -c '\
100+
curl --fail --retry 5 --retry-delay 3 --silent --show-error \
101+
https://raw.githubusercontent.com/cri-o/packaging/$CRIO_SCRIPT_COMMIT/get |\
102+
bash -s -- -t $CRIO_COMMIT'
103+
ExecStartPre=rm -f /etc/cni/net.d/87-podman-bridge.conflist
104+
ExecStartPre=rm -f /etc/crio/crio.conf.d/10-crio.conf
105+
ExecStartPre=mv /etc/cni/net.d/10-crio-bridge.conflist.disabled /etc/cni/net.d/10-crio-bridge.conflist
106+
ExecStart=systemctl enable --now crio.service
107+
Restart=on-failure
108+
109+
[Install]
110+
WantedBy=multi-user.target
111+
- name: authorized-key.service
112+
enabled: true
113+
contents: |
114+
[Unit]
115+
Description=Copy authorized keys
116+
Before=crio-install.service
117+
After=NetworkManager-wait-online.service
118+
119+
[Service]
120+
Type=oneshot
121+
ExecStart=/bin/sh -c '\
122+
/usr/bin/mkdir -m 0700 -p /home/core/.ssh && \
123+
/usr/bin/cat /etc/ssh-key-secret/ssh-public \
124+
>> /home/core/.ssh/authorized_keys && \
125+
/usr/bin/chown -R core:core /home/core/.ssh && \
126+
/usr/bin/chmod 0600 /home/core/.ssh/authorized_keys'
127+
128+
[Install]
129+
WantedBy=multi-user.target

jobs/e2e_node/crio/templates/generate

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ declare -A CONFIGURATIONS=(
2929
["crio_cgroupv1_eventedpleg"]="root env cgroupv1 eventedpleg"
3030
["crio_cgroupv1_hugepages"]="root env cgroupv1 hugepages"
3131
["crio_cgroupv2"]="root env"
32+
["crio_cgroupv2_canary"]="root env-canary"
3233
["crio_cgroupv2_drop_infra_ctr"]="root env drop-infra-ctr"
3334
["crio_cgroupv2_swap1g"]="root env swap-1G"
3435
["crio_cgroupv2_imagefs"]="root env imagefs"

0 commit comments

Comments
 (0)