krane icon indicating copy to clipboard operation
krane copied to clipboard

Question: Generate report from YAML files

Open darox opened this issue 2 years ago • 1 comments

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!

darox avatar May 12 '22 12:05 darox

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.

marcinc avatar May 18 '22 12:05 marcinc

Closing due to inactivity

marcinc avatar Nov 29 '22 17:11 marcinc