-
Notifications
You must be signed in to change notification settings - Fork 116
cannot create events in namespace: no RBAC policy matched #83
Comments
Adding permissions to the events resource in the relevant role files (deploy/letsencrypt-*/single-namespace/role.yaml) fixes this. - apiGroups:
- ""
resources:
- events
verbs:
- create
- update
- patch |
I looked into this after posting the original issue, and I think I know why they didn't include that in the role. The default 'admin' rbac role only allows admins to view events. rbac only allows you to assign roles when you have all the privileges in the role, which means admins can't assign a role that involves creating or editing events. In order to make the role change above work, you need a cluster admin to assign the role for you (which doesn't scale well), or have cluster admins edit the default admin role to allow for event creation. Given this, I'd like to change this to request that openshift-acme not log the event creation error when its in a single namespace deployment, and to document the lack of single namespace events. |
From top of my head I don't see a reason why the project admin doesn't have permission to create namespace level events, might worth to poke the default permissions first with kube/openshift. |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
/remove-lifecycle stale |
@tnozicka any news about that? I can confirm the bug. |
I looked into this a few months ago. IIRC, the upstream kubernetes code does not include creating/editing events in the default admin role, which has the side effect of not allowing users with the admin role to grant that access to another user. |
This is just cosmetic for the single namespace deployment, as @seandilda investigated there is no fix to allow emitting those events, without privilege escalation. It doesn't affect route handling, just an error in the logs. Nice to fix, but not high prio though. |
While running a single namespace deploy in OKD 3.11, I received this error:
The text was updated successfully, but these errors were encountered: