Module runtime

Source

ConstantsΒ§

DEFAULT_DOCKER_ENV_PATH πŸ”’
DEFAULT_IN_CONTAINER_ENV_VARIABLE πŸ”’
DEFAULT_KUBERNETES_SECRETS_PATH πŸ”’
DEFAULT_LINUX_IDENTIFIER πŸ”’

FunctionsΒ§

cgroup_exists πŸ”’
If cgroup exists or is enabled in kernel, returnb true, else false.
get_resource
is_controller_activated
Given a certain controller, checks if it is enabled. For cgroup v1, existence of directory with controller name is checked in cgroup default root hierarchy. e.g if directory β€œ/sys/fs/cgroup”/cpuβ€œ exists then CPU controller is enabled. For cgroup v2, check the controller list path for the controller name.
is_linux_machine πŸ”’
is_running_in_container πŸ”’
checks if is running in a docker container by checking for docker env file, or if it is running in a kubernetes pod.