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

rbac-tool who-can create <custom_resource> fails with memory budget exceeded (1.3 GB usage) #78

Open
gberche-orange opened this issue Mar 1, 2023 · 1 comment

Comments

@gberche-orange
Copy link

What happened:

Running the following command within a k8s container fails:

$ rbac-tool who-can create  mysqlinstances.database.orange.com
[...]
Failed to run program - memory budget exceeded (6:24)
|        {  .Verb     in [Verb, "*"] and 
| .......................^

within htop, I see 6 processes with VIRT to 1.3 GB prior to the crash

What you expected to happen:

  • rbac-tool taking longer to produce output but not not crash
  • a stack trace is displayed to helm diagnostic

How to reproduce it (as minimally and precisely as possible):

  • an openshift cluster with a large number of crds

Anything else we need to know?:

$ rbac-tool who-can create  mysqlinstances.database.orange.com -v 9
[...]
I0301 11:09:54.444305    1881 subject_permissions.go:72] {Kind:ServiceAccount APIGroup: Name:deployer [...]
Failed to run program - memory budget exceeded (6:24)
 |        {  .Verb     in [Verb, "*"] and 
 | .......................^

Environment:

  • Kubernetes version (use kubectl version):
  • Cloud provider or configuration:
  • Install tools:
  • Others:
@gberche-orange
Copy link
Author

gberche-orange commented Jul 28, 2023

Workaround: use https://github.com/aquasecurity/kubectl-who-can

kubectl krew install who-can
kubectl who-can create  mysqlinstances.database.orange.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants