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
No known key found for this signature in database
GPG Key ID: 50AD98B2A0D8D4EF

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