Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable crun support on CRI-O #6864

Merged

Conversation

electrocucaracha
Copy link
Contributor

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change
/kind bug
/kind cleanup
/kind design
/kind documentation
/kind failing-test

/kind feature

/kind flake

What this PR does / why we need it:
This change provides instructions to install and configure crun. This container runtime has lower footprint, better performance and cgroup2 support among other things.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:
The current implementation is only offered for CRI-O thru the crun_enabled configuration value.

container_manager: crio
crun_enabled: true

Once the cluster is deployed is possible to create workloads like the following:

apiVersion: v1
kind: Pod
metadata:
  name: crun-pod
spec:
  runtimeClassName: crun
  containers:
    - name: test
      image: busybox
      command: ["sleep"]
      args: ["infity"]

and the assigned worker node will show the follows:

$ ps -ef | grep crun
root       21406       1  0 16:28 ?        00:00:00 /usr/bin/conmon -b /var/run/containers/storage/overlay-containers/c1e62f2a41ede66645a2178c1eafb51a8035aff88fef4c1edc2856428d8211d1/userdata -c c1e62f2a41ede66645a2178c1eafb51a8035aff88fef4c1edc2856428d8211d1 --exit-dir /var/run/crio/exits -l /var/log/pods/default_crun-pod_deb438b6-76a8-4fd0-abda-777a922c4c70/c1e62f2a41ede66645a2178c1eafb51a8035aff88fef4c1edc2856428d8211d1.log --log-level info -n k8s_POD_crun-pod_default_deb438b6-76a8-4fd0-abda-777a922c4c70_0 -P /var/run/containers/storage/overlay-containers/c1e62f2a41ede66645a2178c1eafb51a8035aff88fef4c1edc2856428d8211d1/userdata/conmon-pidfile -p /var/run/containers/storage/overlay-containers/c1e62f2a41ede66645a2178c1eafb51a8035aff88fef4c1edc2856428d8211d1/userdata/pidfile --persist-dir /var/lib/containers/storage/overlay-containers/c1e62f2a41ede66645a2178c1eafb51a8035aff88fef4c1edc2856428d8211d1/userdata -r /usr/bin/crun --runtime-arg --root=/run/crun --socket-dir-path /var/run/crio -u c1e62f2a41ede66645a2178c1eafb51a8035aff88fef4c1edc2856428d8211d1 -s
root       21469       1  0 16:28 ?        00:00:00 /usr/bin/conmon -b /var/run/containers/storage/overlay-containers/37a3aa028967d8ae1028ed618152bdd25016f91971135985ae9b02d823e2d095/userdata -c 37a3aa028967d8ae1028ed618152bdd25016f91971135985ae9b02d823e2d095 --exit-dir /var/run/crio/exits -l /var/log/pods/default_crun-pod_deb438b6-76a8-4fd0-abda-777a922c4c70/test/0.log --log-level info -n k8s_test_crun-pod_default_deb438b6-76a8-4fd0-abda-777a922c4c70_0 -P /var/run/containers/storage/overlay-containers/37a3aa028967d8ae1028ed618152bdd25016f91971135985ae9b02d823e2d095/userdata/conmon-pidfile -p /var/run/containers/storage/overlay-containers/37a3aa028967d8ae1028ed618152bdd25016f91971135985ae9b02d823e2d095/userdata/pidfile --persist-dir /var/lib/containers/storage/overlay-containers/37a3aa028967d8ae1028ed618152bdd25016f91971135985ae9b02d823e2d095/userdata -r /usr/bin/crun --runtime-arg --root=/run/crun --socket-dir-path /var/run/crio -u 37a3aa028967d8ae1028ed618152bdd25016f91971135985ae9b02d823e2d095 -s
$ sudo crun --version
crun version 0.15
commit: 56ca95e61639510c7dbd39ff512f80f626404969
spec: 1.0.0
+SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
$ sudo crun list
NAME                                                             PID       STATUS   BUNDLE PATH                            
c1e62f2a41ede66645a2178c1eafb51a8035aff88fef4c1edc2856428d8211d1 21416     running  /run/containers/storage/overlay-containers/c1e62f2a41ede66645a2178c1eafb51a8035aff88fef4c1edc2856428d8211d1/userdata
37a3aa028967d8ae1028ed618152bdd25016f91971135985ae9b02d823e2d095 21477     running  /run/containers/storage/overlay-containers/37a3aa028967d8ae1028ed618152bdd25016f91971135985ae9b02d823e2d095/userdata

Does this PR introduce a user-facing change?:


@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 27, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @electrocucaracha. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 27, 2020
@floryut
Copy link
Member

floryut commented Oct 28, 2020

/ok-to-test
/approve

Would be nice to have a crio test using crun though.

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 28, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: electrocucaracha, floryut

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 28, 2020
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 29, 2020
Signed-off-by: Victor Morales <[email protected]>
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 29, 2020
@LuckySB
Copy link
Contributor

LuckySB commented Dec 1, 2020

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 1, 2020
@k8s-ci-robot k8s-ci-robot merged commit 4f7a760 into kubernetes-sigs:master Dec 1, 2020
@floryut floryut mentioned this pull request Dec 19, 2020
LuckySB pushed a commit to southbridgeio/kubespray that referenced this pull request Jan 17, 2021
@electrocucaracha electrocucaracha deleted the support_crio_crun branch August 24, 2021 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants