Red Hat Bugzilla – Bug 1477955
Creating a rolebinding doesn't find the local role due to missing policybinding
Last modified: 2017-08-03 11:51:02 EDT
Created attachment 1308676 [details]
for reproduction, workaround commented out
Description of problem:
When creating a SA, (local) Role and a (local) RoleBinding, creation of the RoleBinding fails since it is not able to find the PolicyBinding.
Version-Release number of selected component (if applicable):
Create Resources in an empty project.
Steps to Reproduce:
1. Switch to fresh project "myproject" with user "system:admin"
2. cat rb.yaml
- kind: ServiceAccount
3. oc create -f rb.yaml
serviceaccount "operator" created
role "xrole" created
Error from server (NotFound): error when creating "rb.yaml": policybinding "myproject:default" not found
PolicyBinding is generated
RoleBinding is created
It works if the PolicyBinding is created before the RoleBinding:
*** This bug has been marked as a duplicate of bug 1477956 ***