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.
This commit is contained in:
Mikkel Oscar Lyderik Larsen
2017-11-26 20:32:49 +01:00
parent e7ad6e6008
commit 3836857229

View File

@@ -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