chore: some cleanup, new tools script to check cgroup memory limits

This commit is contained in:
Stefan Reimer 2021-04-14 16:06:29 +02:00
parent f9dbcee502
commit 1adb15dd20
3 changed files with 10 additions and 1 deletions

1
.gitignore vendored
View File

@ -8,3 +8,4 @@
# Breaks Helm V3 dependencies in Argo # Breaks Helm V3 dependencies in Argo
Chart.lock Chart.lock
kubezero-repo.???

@ -1 +0,0 @@
Subproject commit 25b8ebe3cc2af88643a4674a63e651e9c31245cb

9
scripts/get_cgroup_limits.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
NAME=$1
POD_ID="$(crictl pods --name $NAME -q)"
CGROUP_PATH=$(crictl inspectp -o=json $POD_ID | jq -rc .info.runtimeSpec.linux.cgroupsPath)
echo -n "cgroup memory limit in bytes for $NAME: "
cat /sys/fs/cgroup/memory/$(dirname $CGROUP_PATH)/memory.limit_in_bytes