Does this work properly for pod resources suggested by Kubernetes?
If it works normally, does automemlimit work without being affected by the resource with just the code of the example regardless of the size of the resource? I'm currently using it by setting it in the environment variable, but I'm not sure yet because it's been a while since the latest version.
Hi @sjy-dv!
Yes, it works well in k8s environments that use cgroups for resource management; mostly, they use docker or containerd as a container runtime, and both are supported. Once you import automemlimit, it will set GOMEMLIMIT automatically using cgroups memory limit, corresponding to your containers.resources.limits.memory.
+ You can monitor its behavior by setting env var to AUTOMEMLIMIT_DEBUG=true.