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.
parent e7ad6e60
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment