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 namespace verification #101

Closed
kong62 opened this issue Nov 5, 2019 · 3 comments
Closed

add namespace verification #101

kong62 opened this issue Nov 5, 2019 · 3 comments

Comments

@kong62
Copy link

kong62 commented Nov 5, 2019

cat 1.yaml
apiVersion: rbacmanager.reactiveops.io/v1beta1
kind: RBACDefinition
metadata:
name: joe-access
rbacBindings:

  • name: joe
    subjects:
    • kind: User
      name: joe@example.com
      roleBindings:
    • namespace: api
      clusterRole: view
    • namespace: web
      clusterRole: edit

kubectl apply -f 1.yaml
rbacdefinition.rbacmanager.reactiveops.io/joe-access created

kubectl logs -f -n rbac-manager rbac-manager-696c985976-55kv6
time="2019-11-05T02:21:34Z" level=info msg=----------------------------------
time="2019-11-05T02:21:34Z" level=info msg="rbac-manager 0.8.3 running"
time="2019-11-05T02:21:34Z" level=info msg=----------------------------------
time="2019-11-05T02:21:34Z" level=info msg="Registering components"
time="2019-11-05T02:21:34Z" level=info msg="Watching resources related to RBAC Definitions"
time="2019-11-05T02:21:34Z" level=info msg="Watching RBAC Definitions"
time="2019-11-05T02:26:24Z" level=info msg="Reconciling RBACDefinition joe-access"
time="2019-11-05T02:26:24Z" level=info msg="Creating Role Binding: joe-access-joe-view"
time="2019-11-05T02:26:24Z" level=error msg="Error creating Role Binding: namespaces "api" not found"
time="2019-11-05T02:26:24Z" level=info msg="Creating Role Binding: joe-access-joe-edit"
time="2019-11-05T02:26:24Z" level=error msg="Error creating Role Binding: namespaces "web" not found"

@sudermanjr
Copy link
Member

@kong62 Thanks for the issue. Can you please describe what your desired behavior would look like? Would you prefer that the rbacDefinition is rejected by the API when you create it? Could this possibly be additional validation like what is requested in #99 ?

@kong62
Copy link
Author

kong62 commented Nov 12, 2019

@sudermanjr This problem occurs when I create RBACDefinition, but my namespace does not exist, I think this problem should be verified, if the namespace does not exist, RBACDefinition does not allow creation

@sudermanjr
Copy link
Member

Opened #103 to track this request

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

2 participants