-
Notifications
You must be signed in to change notification settings - Fork 376
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
minikube script for nested cgroups #3173
Merged
Merged
Conversation
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
kkourt
added
the
release-note/misc
This PR makes changes that have no direct user impact.
label
Nov 29, 2024
✅ Deploy Preview for tetragon ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
kkourt
force-pushed
the
pr/kkourt/cgroup-tracking-minikube
branch
2 times, most recently
from
November 29, 2024 12:33
2632151
to
b60815b
Compare
kevsecurity
reviewed
Dec 4, 2024
kevsecurity
reviewed
Dec 4, 2024
kevsecurity
approved these changes
Dec 4, 2024
kkourt
force-pushed
the
pr/kkourt/cgroup-tracking-minikube
branch
from
December 6, 2024 09:22
b60815b
to
258ff8a
Compare
Move applyChanges used to patch the containerd configuration file to its own file. Useful for next commit. Signed-off-by: Kornilios Kourtis <[email protected]>
kkourt
force-pushed
the
pr/kkourt/cgroup-tracking-minikube
branch
from
December 6, 2024 09:24
258ff8a
to
3a4041f
Compare
Add a command to patch crio.conf to add allowed annotations. For example: > $ ssh cat /etc/crio/crio.conf > crio.conf > $ ./tetragon-oci-hook-setup patch-crio-conf enable-annotations --config-file=crio.conf --output-file crio-patched.conf --annotations='io.kubernetes.cri-o.cgroup2-mount-hierarchy-rw' > $ diff -u crio.conf crio-patched.conf > --- crio.conf 2024-11-29 10:47:11.622015385 +0100 > +++ crio-patched.conf 2024-11-29 11:03:39.856306109 +0100 > @@ -300,6 +300,7 @@ > runtime_path = "/usr/bin/runc" > runtime_type = "oci" > runtime_root = "/run/runc" > +allowed_annotations = ["io.kubernetes.cri-o.cgroup2-mount-hierarchy-rw"] Signed-off-by: Kornilios Kourtis <[email protected]>
Example: $ minikube start --driver=kvm2 --container-runtime=crio $ ./scripts/minikube-enable-nested-cgroups.sh And now: $ kubectl run --annotations='io.kubernetes.cri-o.cgroup2-mount-hierarchy-rw=true' ubuntu --image=ubuntu --rm -it -- /bin/bash root@ubuntu:/# cat /proc/self/cgroup ## <-- inside pod 0::/ root@ubuntu:/# mkdir /sys/fs/cgroup/pizza root@ubuntu:/# echo $$ > /sys/fs/cgroup/pizza/cgroup.procs root@ubuntu:/# cat /proc/self/cgroup 0::/pizza Signed-off-by: Kornilios Kourtis <[email protected]>
kkourt
force-pushed
the
pr/kkourt/cgroup-tracking-minikube
branch
from
December 6, 2024 09:31
3a4041f
to
5788ee4
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add a script to create a minikube instance with nested cgroups supported. See commits.