origin icon indicating copy to clipboard operation
origin copied to clipboard

add-role-to-user add a cluster role instead of a role

Open lanoue77 opened this issue 9 months ago • 1 comments

When adding a local role to a user or a group the command tries to add a cluster role instead.

Version

Client Version: 4.17.0-202501081137.p0.gae1bd9e.assembly.stream.el9-ae1bd9e Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3 Server Version: 4.17.14 Kubernetes Version: v1.30.7

Steps To Reproduce
  1. Create a role
  2. oc policy add-role-to-user
Current Result
oc adm policy add-role-to-user test userTest
Warning: role 'test' not found
clusterrole.rbac.authorization.k8s.io/test added: "userTest"
Expected Result
oc adm policy add-role-to-user test userTest
role.rbac.authorization.k8s.io/test added: "userTest"

lanoue77 avatar Mar 05 '25 19:03 lanoue77

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

openshift-bot avatar Jun 04 '25 09:06 openshift-bot

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten /remove-lifecycle stale

openshift-bot avatar Jul 05 '25 00:07 openshift-bot

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen. Mark the issue as fresh by commenting /remove-lifecycle rotten. Exclude this issue from closing again by commenting /lifecycle frozen.

/close

openshift-bot avatar Aug 04 '25 08:08 openshift-bot

@openshift-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen. Mark the issue as fresh by commenting /remove-lifecycle rotten. Exclude this issue from closing again by commenting /lifecycle frozen.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

openshift-ci[bot] avatar Aug 04 '25 08:08 openshift-ci[bot]