Add support for resource limits to play kube

Signed-off-by: Jordan Christiansen <xordspar0@gmail.com>
This commit is contained in:
Jordan Christiansen
2020-09-28 13:57:58 -05:00
parent cec240375d
commit a413d4d77f
3 changed files with 172 additions and 4 deletions

View File

@ -612,6 +612,15 @@ func SkipIfRootlessCgroupsV1(reason string) {
}
}
func SkipIfUnprevilegedCPULimits() {
info := GetHostDistributionInfo()
if isRootless() &&
info.Distribution == "fedora" &&
(info.Version == "31" || info.Version == "32") {
ginkgo.Skip("Rootless Fedora doesn't have permission to set CPU limits before version 33")
}
}
func SkipIfRootless(reason string) {
checkReason(reason)
if os.Geteuid() != 0 {