krane
krane copied to clipboard
Question: Generate report from YAML files
Short issue description
Generate report from YAML files
Krane version: v0.1.0-82-g83ae20a OS (Linux/Mac/Windows..): Linux Kubernetes version: Files Kubernetes distribution (e.g. GKE, EKS, ...): Files
How can we reproduce the issue?
I'd like to generate a report form YAML files, but it's not 100% clear how it works. Do I have to put all roles, rolebindings, psp into files called roles, rolebindings and psp? What if I don't have any psp? Thank you!
Hi @darox. You need to store all rbac related objects in files as follows (note: skip file extensions):
Role
objects => roles
file
RoleBinding
=> rolebindings
ClusterRole
=> clusterroles
ClusterRoleBinding
=> clusterrolebindings
For the time being the tool expects psp
file to exist (this issue will be addressed in the near future btw), however, if you don't use PSP then you can work around that by creating psp
file with the following content:
{
"items": []
}
Once you placed all your files locally in some directory you should be able to run the report with krane report --dir /path/to/dir
. Hope this helps.
Closing due to inactivity