I am new to the Kubernetes world but some time ago I developed a Kubernetes operator using OperatorSDK and Golang. I was using cluster-admin role for running the operator pod but now I want to reduce the resources the operator can work with.
It there some tool that can scan the code of the operator and generate an appropriate clusterrole? Or is there some clever way to find what resources are used by the operator?
The easiest way is probably to remove all of the permissions and then add each one back based on the errors thrown