Grant PSP permissions to all serviceaccounts in e2e, not just default

This commit is contained in:
Jordan Liggitt 2021-05-25 16:27:33 -04:00
parent d8e9f93358
commit f871475a5e

View File

@ -177,7 +177,13 @@ func CreatePrivilegedPSPBinding(kubeClient clientset.Interface, namespace string
Kind: rbacv1.ServiceAccountKind,
Namespace: namespace,
Name: "default",
})
},
rbacv1.Subject{
Kind: rbacv1.GroupKind,
APIGroup: rbacv1.GroupName,
Name: "system:serviceaccounts:" + namespace,
},
)
ExpectNoError(err)
ExpectNoError(e2eauth.WaitForNamedAuthorizationUpdate(kubeClient.AuthorizationV1(),
serviceaccount.MakeUsername(namespace, "default"), namespace, "use", podSecurityPolicyPrivileged,