diff --git a/pkg/specgen/generate/validate.go b/pkg/specgen/generate/validate.go index 14a50c3c6a..f14cbf41ec 100644 --- a/pkg/specgen/generate/validate.go +++ b/pkg/specgen/generate/validate.go @@ -30,6 +30,7 @@ func verifyContainerResourcesCgroupV1(s *specgen.SpecGenerator) ([]string, error // Cgroups V1 rootless system does not support Resource limits if rootless.IsRootless() { + s.ResourceLimits = nil return []string{"Resource limits are not supported and ignored on cgroups V1 rootless systems"}, nil }