Skip to content

Commit

Permalink
CRI-O: add imagevolume test job
Browse files Browse the repository at this point in the history
Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
  • Loading branch information
saschagrunert committed Jul 23, 2024
1 parent 73d8e06 commit ec77bfe
Show file tree
Hide file tree
Showing 6 changed files with 203 additions and 6 deletions.
50 changes: 50 additions & 0 deletions config/jobs/kubernetes/sig-node/sig-node-presubmit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1295,6 +1295,56 @@ presubmits:
env:
- name: IGNITION_INJECT_GCE_SSH_PUBLIC_KEY_FILE
value: "1"
- name: pull-kubernetes-node-crio-cgrpv2-imagevolume-e2e
cluster: k8s-infra-prow-build
skip_branches:
- release-\d+\.\d+ # per-release image
annotations:
testgrid-dashboards: sig-node-cri-o, sig-node-presubmits
testgrid-tab-name: pr-crio-cgrpv2-splitfs-e2e
always_run: false
optional: true
max_concurrency: 12
labels:
preset-service-account: "true"
preset-k8s-ssh: "true"
preset-pull-kubernetes-e2e: "true"
preset-pull-kubernetes-e2e-gce: "true"
decorate: true
decoration_config:
timeout: 240m
path_alias: k8s.io/kubernetes
extra_refs:
- org: kubernetes
repo: test-infra
base_ref: master
path_alias: k8s.io/test-infra
spec:
containers:
- image: gcr.io/k8s-staging-test-infra/kubekins-e2e:v20240705-131cd74733-master
command:
- runner.sh
- /workspace/scenarios/kubernetes_e2e.py
args:
- --deployment=node
- --env=KUBE_SSH_USER=core
- --gcp-zone=us-west1-b
- '--node-test-args=--service-feature-gates="ImageVolume=true" --feature-gates="ImageVolume=true" --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\"]}"'
- --node-tests=true
- --provider=gce
- --test_args=--nodes=8 --focus="\[ImageVolume\]" --skip="\[Flaky\]|\[Slow\]|\[Serial\]"
- --timeout=180m
- --node-args=--image-config-file=/home/prow/go/src/k8s.io/test-infra/jobs/e2e_node/crio/latest/image-config-cgrpv2.yaml
resources:
limits:
cpu: 4
memory: 6Gi
requests:
cpu: 4
memory: 6Gi
env:
- name: IGNITION_INJECT_GCE_SSH_PUBLIC_KEY_FILE
value: "1"
- name: pull-kubernetes-node-crio-cgrpv2-splitfs-e2e
cluster: k8s-infra-prow-build
skip_branches:
Expand Down
4 changes: 2 additions & 2 deletions jobs/e2e_node/crio/crio_cgroupsv2.ign
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"path": "/etc/crio/crio.conf.d/20-crio.conf",
"contents": {
"compression": "gzip",
"source": "data:;base64,H4sIAAAAAAAC/7SPQWrEMAxF9z5FyH7iE8xJSjAaR8moyFKQ5UJvXzxJKbRQuuisjMX/ek8v2UgnKrDhHCptAt4M065M+X24DmNEz7GH4jGbXqvKGMJRtCZOBefAuiXGN+TeWfDWtjEspnsiWQ1SdhuuwwpcMSy4QmNPZ7cXrEn+vvPzrVO2JnM4v2kHvz/EWrXImoHjjeSheOnJMRQVcrXfkyrl5x1fzG70N+bh/h9Mx+qXO8jCaM9ifwQAAP//eNRpfPABAAA="
"source": "data:;base64,H4sIAAAAAAAC/7SP0UrFMAyG7/MUY/duT3CeREbp6bIukiYjTUXfXuomgoII4lVp+P98Xx6TkU5UYsYFKmWJ3gzDoUzpdbgN44ye5h6az9n0VFVGgLNoTZwKLsCaA+Mzcu+seG95hNX0CCSbxZDchtuwRa4IK26xsYer2wvWJH3d+fHWKVmTBa5vOKLv72Kt2sx0xxe8BHtuhKJCrvZTTqV8v+GT121+wzut/85zrP6wR1kZ7T+4bwEAAP//V7kNseQBAAA="
},
"mode": 420
},
Expand Down Expand Up @@ -68,7 +68,7 @@
"name": "selinux-install.service"
},
{
"contents": "[Unit]\nDescription=Download and install crio binaries and configurations.\nAfter=selinux-install.service\n\n[Service]\nType=oneshot\nEnvironment=\"SCRIPT_COMMIT=3e02ed6de9f516af9d8884c06ee3d709b2fa413d\"\nEnvironment=\"CRIO_COMMIT=fd87228975e28a2d53aa2960cb14520cf51f0245\"\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",
"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",
"enabled": true,
"name": "crio-install.service"
},
Expand Down
19 changes: 19 additions & 0 deletions jobs/e2e_node/crio/templates/base/20-crio-v2.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[crio.image]
signature_policy = "/etc/crio/policy.json"

[crio.runtime]
log_level = "debug"
drop_infra_ctr = false
default_runtime = "runc"

[crio.runtime.runtimes.crun]
runtime_path = "/usr/libexec/crio/crun"
monitor_path = "/usr/libexec/crio/conmon"

[crio.runtime.runtimes.runc]
runtime_path = "/usr/libexec/crio/runc"
monitor_path = "/usr/libexec/crio/conmon"

[crio.runtime.runtimes.test-handler]
runtime_path = "/usr/libexec/crio/runc"
monitor_path = "/usr/libexec/crio/conmon"
128 changes: 128 additions & 0 deletions jobs/e2e_node/crio/templates/base/root-v2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
---
variant: fcos
version: 1.4.0
kernel_arguments:
should_not_exist:
- mitigations=auto,nosmt
storage:
files:
- path: /etc/zincati/config.d/90-disable-auto-updates.toml
contents:
local: 90-disable-auto-updates.toml
mode: 0644
- path: /root/kubelet-e2e.te
contents:
local: kubelet-e2e.te
mode: 0644
- path: /etc/crio/crio.conf.d/20-crio.conf
contents:
local: 20-crio-v2.conf
mode: 0644
- path: /etc/sysctl.d/99-e2e-sysctl.conf
contents:
local: 99-e2e-sysctl.conf
mode: 0644
- path: /etc/ssh-key-secret/ssh-public
contents:
# base64 encoded "GCE_SSH_PUBLIC_KEY_FILE_CONTENT"
source: data:text/plain;base64,R0NFX1NTSF9QVUJMSUNfS0VZX0ZJTEVfQ09OVEVOVA==
mode: 0644
systemd:
units:
- name: configure-sysctl.service
enabled: true
contents: |
[Unit]
Description=Configure required sysctls.
[Service]
Type=oneshot
ExecStart=/usr/lib/systemd/systemd-sysctl
[Install]
WantedBy=multi-user.target
- name: tools-install.service
enabled: true
contents: |
[Unit]
Description=Download and install required tools.
Before=crio-install.service
After=NetworkManager-wait-online.service
[Service]
Type=oneshot
ExecStart=rpm-ostree install \
-y \
--apply-live \
--allow-inactive \
dbus-tools \
checkpolicy
[Install]
WantedBy=multi-user.target
- name: selinux-install.service
enabled: true
contents: |
[Unit]
Description=Setup SELinux policy
After=tools-install.service
[Service]
Type=oneshot
ExecStartPre=setenforce 1
ExecStartPre=checkmodule -M -m -o /root/kubelet-e2e.mod /root/kubelet-e2e.te
ExecStartPre=semodule_package -o /root/kubelet-e2e.pp -m /root/kubelet-e2e.mod
ExecStartPre=semodule -i /root/kubelet-e2e.pp
ExecStartPre=mkdir -p /var/lib/kubelet
ExecStart=chcon -R -u system_u -r object_r -t var_lib_t /var/lib/kubelet
[Install]
WantedBy=multi-user.target
- name: crio-install.service
enabled: true
contents: |
[Unit]
Description=Download and install crio binaries and configurations.
After=selinux-install.service
[Service]
Type=oneshot
Environment="SCRIPT_COMMIT=52aa3c2a31ccc9623962e9e338b6585267d6f3f4"
Environment="CRIO_COMMIT=1c04ca9768e535cf22017da6e6cee620bb3a6431"
ExecStartPre=mount /tmp /tmp -o remount,exec,suid
ExecStartPre=mount -o remount,rw /dev/sda4 /usr
ExecStartPre=bash -c '\
curl --fail --retry 5 --retry-delay 3 --silent --show-error \
https://raw.githubusercontent.com/cri-o/packaging/$SCRIPT_COMMIT/get |\
bash -s -- -t $CRIO_COMMIT'
ExecStartPre=rm -f /etc/cni/net.d/87-podman-bridge.conflist
ExecStartPre=rm -f /etc/crio/crio.conf.d/10-crio.conf
ExecStart=systemctl enable --now crio.service
Restart=on-failure
[Install]
WantedBy=multi-user.target
- name: authorized-key.service
enabled: true
contents: |
[Unit]
Description=Copy authorized keys
Before=crio-install.service
After=NetworkManager-wait-online.service
[Service]
Type=oneshot
ExecStart=/bin/sh -c '\
/usr/bin/mkdir -m 0700 -p /home/core/.ssh && \
/usr/bin/cat /etc/ssh-key-secret/ssh-public \
>> /home/core/.ssh/authorized_keys && \
/usr/bin/chown -R core:core /home/core/.ssh && \
/usr/bin/chmod 0600 /home/core/.ssh/authorized_keys'
[Install]
WantedBy=multi-user.target
6 changes: 3 additions & 3 deletions jobs/e2e_node/crio/templates/crio_cgroupsv2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ storage:
mode: 0644
- path: /etc/crio/crio.conf.d/20-crio.conf
contents:
local: 20-crio.conf
local: 20-crio-v2.conf
mode: 0644
- path: /etc/sysctl.d/99-e2e-sysctl.conf
contents:
Expand Down Expand Up @@ -87,8 +87,8 @@ systemd:
[Service]
Type=oneshot
Environment="SCRIPT_COMMIT=3e02ed6de9f516af9d8884c06ee3d709b2fa413d"
Environment="CRIO_COMMIT=fd87228975e28a2d53aa2960cb14520cf51f0245"
Environment="SCRIPT_COMMIT=52aa3c2a31ccc9623962e9e338b6585267d6f3f4"
Environment="CRIO_COMMIT=1c04ca9768e535cf22017da6e6cee620bb3a6431"
ExecStartPre=mount /tmp /tmp -o remount,exec,suid
ExecStartPre=mount -o remount,rw /dev/sda4 /usr
Expand Down
2 changes: 1 addition & 1 deletion jobs/e2e_node/crio/templates/generate
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ declare -A CONFIGURATIONS=(
["crio_cgroupsv1"]="root cgroups-v1 criu-enabled"
["crio_cgroupsv1_eventedpleg"]="root cgroups-v1 eventedpleg"
["crio_cgroupsv1_hugepages"]="root cgroups-v1 hugepages"
["crio_cgroupsv2"]="root"
["crio_cgroupsv2"]="root-v2"
["crio_cgroupsv2_swap1g"]="root swap-1G"
["crio_cgroupsv2_imagefs"]="root imagefs"
["crio_cgroupsv2_splitfs"]="root splitfs"
Expand Down

0 comments on commit ec77bfe

Please sign in to comment.