diff --git a/test/e2e/framework/psp_util.go b/test/e2e/framework/psp_util.go index cd281f00d54..30ba939095d 100644 --- a/test/e2e/framework/psp_util.go +++ b/test/e2e/framework/psp_util.go @@ -113,7 +113,9 @@ func CreatePrivilegedPSPBinding(f *Framework, namespace string) { psp := PrivilegedPSP(podSecurityPolicyPrivileged) psp, err = f.ClientSet.ExtensionsV1beta1().PodSecurityPolicies().Create(psp) - ExpectNoError(err, "Failed to create PSP %s", podSecurityPolicyPrivileged) + if !apierrs.IsAlreadyExists(err) { + ExpectNoError(err, "Failed to create PSP %s", podSecurityPolicyPrivileged) + } if IsRBACEnabled(f) { // Create the Role to bind it to the namespace. @@ -126,7 +128,9 @@ func CreatePrivilegedPSPBinding(f *Framework, namespace string) { Verbs: []string{"use"}, }}, }) - ExpectNoError(err, "Failed to create PSP role") + if !apierrs.IsAlreadyExists(err) { + ExpectNoError(err, "Failed to create PSP role") + } } })