Merge pull request #57107 from liggitt/fix-e2e-panic

Automatic merge from submit-queue (batch tested with PRs 56386, 57204, 55692, 57107, 57177). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Check ns setup error during e2e

If namespace create fails during e2e setup, don't panic

/assign @tallclair 

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2017-12-17 04:19:44 -08:00 committed by GitHub
commit 45b5c0ec42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -378,7 +378,7 @@ func (f *Framework) CreateNamespace(baseName string, labels map[string]string) (
f.namespacesToDelete = append(f.namespacesToDelete, ns)
}
if !f.SkipPrivilegedPSPBinding {
if err == nil && !f.SkipPrivilegedPSPBinding {
CreatePrivilegedPSPBinding(f, ns.Name)
}