From 3836857229cff769c4e522079faba0a949841c0c Mon Sep 17 00:00:00 2001 From: Mikkel Oscar Lyderik Larsen Date: Sun, 26 Nov 2017 20:32:49 +0100 Subject: [PATCH] e2e: Only create PSP if RBAC is enabled Using PSP in e2e tests depend on RBAC being enabled in the cluster and thus PSP should only be used when RBAC is. --- test/e2e/framework/psp_util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/framework/psp_util.go b/test/e2e/framework/psp_util.go index d3938c90e83..bb8d0dadc9b 100644 --- a/test/e2e/framework/psp_util.go +++ b/test/e2e/framework/psp_util.go @@ -97,7 +97,7 @@ var ( ) func CreatePrivilegedPSPBinding(f *Framework, namespace string) { - if !IsPodSecurityPolicyEnabled(f) { + if !IsPodSecurityPolicyEnabled(f) || !IsRBACEnabled(f) { return } // Create the privileged PSP & role