sandbox: skip memory check if set to "max"
skip the memory check if the value is set to the string "max".  That
is used on cgroup v2 when no limits are present.
@@ -682,7 +682,7 @@ func AddCgroupAnnotation(ctx context.Context, g generate.Generator, mountPath, c
} else {
// strip off the newline character and convert it to an int
strMemory := strings.TrimRight(string(fileData), "\n")
- if strMemory != "" {
+ if strMemory != "" && strMemory != "max" {
memoryLimit, err := strconv.ParseInt(strMemory, 10, 64)
if err != nil {
return "", errors.Wrapf(err, "error converting cgroup memory value from string to int %q", strMemory)
