Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lanoue77 opened this issue Mar 5, 2025 · 0 comments
Open

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

lanoue77 opened this issue Mar 5, 2025 · 0 comments

Comments

@lanoue77
Copy link

lanoue77 commented Mar 5, 2025

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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant