Skip to content

Add new ParseCgroupFileUnified method for k8s usage #4497

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

Conversation

dims
Copy link
Contributor

@dims dims commented Oct 31, 2024

In order to get k8s to drop usage of BOTH cgroups implementations in opencontainers/runc AND containerd/cgroups, we have to review what is being used in k8s from the latter. One thing that popped up is the following method defined in containerd/cgroups:

https://github.com/containerd/cgroups/blob/main/utils.go#L96-L98

Which is used here:

https://github.com/kubernetes/kubernetes/blob/69e30cd642be6eedaf320c98845f853ff52eff65/pkg/kubelet/kuberuntime/kuberuntime_container_linux.go#L355

Please do advise if there is a better way to do the same using existing methods here or we can add a new method in this PR that adjusts the existing implementation a bit to return the additional unified path.

Test case and code is adapted from containerd/cgroups:

@dims
Copy link
Contributor Author

dims commented Oct 31, 2024

xref: kubernetes/kubernetes#128157

@dims dims force-pushed the add-new-ParseCgroupFileUnified-for-k8s-usage branch from ffa4d1a to 917583f Compare October 31, 2024 15:33
@dims dims changed the title [WIP] Add new ParseCgroupFileUnified method for k8s usage Add new ParseCgroupFileUnified method for k8s usage Oct 31, 2024
@kolyshkin
Copy link
Contributor

@dims please take a look at kubernetes/kubernetes#128506

@dims
Copy link
Contributor Author

dims commented Nov 2, 2024

@kolyshkin Looks like that will work!

/close

@dims dims closed this Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants